refactor/viewdock/docking-data-attr #188
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactor: Update ViewDock Registered Session Saving Attribute Names
This PR ensures that the ViewDock bundle uses its own uniquely named session attributes, avoiding confusion or conflicts with the legacy ViewDockX bundle.
Previously, ViewDock reused the
viewdockx_data
attribute originally registered as a session-saving attribute on structures by ViewDockX, making it unclear which bundle owned or created the data. This update changes all internal and registered uses of that attribute toviewdock_data
, clearly marking it as owned by ViewDock. The atom-level attributes"mol2_type"
and"charge"
are now also registered under"ViewDock"
instead of"ViewDockX"
.🔁 Backwards Compatibility
Sessions created with ViewDockX will still work—for old sessions, ViewDock adds its own docking data attribute while preserving the old one, ensuring both bundles can continue to function independently without interfering with each other’s state. The atom-level attributes remain fully compatible with old sessions. The ViewDock bundle does not re-register them if they exist from ViewDockX, since their names and data types are unchanged, but they function identically in both bundles. Only the source bundle name for registration differs. This helps clarify in new sessions that ViewDock—not ViewDockX—is responsible for handling these attributes when active.
Note: If the ViewDockX bundle were, for some reason, to update the data types it registers for the atom-level attributes
"mol2_type"
and"charge"
, the ViewDock bundle would raise achimerax.core.attributes.RegistrationConflict
. The current assumption is that the ViewDockX bundle will either be removed or never updated again.