8000 refactor/viewdock/docking-data-attr by pRottinghuis · Pull Request #188 · RBVI/ChimeraX · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor/viewdock/docking-data-attr #188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

pRottinghuis
Copy link
Contributor

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 to viewdock_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 a chimerax.core.attributes.RegistrationConflict. The current assumption is that the ViewDockX bundle will either be removed or never updated again.

The ViewDock tool registers session saving attributes for various objects. Rename all viewdockx references with viewdock.

Note: If opening new docking results from an old ViewDockX session file, this will result in 2 docking data attributes: one called "viewdockx_data" which was left over from VDX and another called "viewdock_data" which was registered by the new VD. The "charge" and "mol2_type" attributes on Atom objects will not be re-registered and will still appear as though registered by ViewDockX. These attributes are defined with the same name and data types for ViewDock and can be used safely by the ViewDock bunle.
@e-pettersen e-pettersen merged commit 23b5d04 into RBVI:develop May 21, 2025
4 checks passed
@pRottinghuis pRottinghuis deleted the refactor/viewdock/docking-data-attr branch May 23, 2025 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0