-
Notifications
You must be signed in to change notification settings - Fork 83
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
Overhaul Biological Assemblies #278
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bring Improved Assembly Reading
Returns a dictionary with a key: value pair of assembly id: transformations.
Converts a dictionary to a numpy array with a row for each symmetry operation for each chain in the structure. This can then be directly used for creating an object that will store the require symmetry operation information inside of Blender.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #278 +/- ##
==========================================
+ Coverage 56.25% 60.56% +4.30%
==========================================
Files 15 19 +4
Lines 1943 2206 +263
==========================================
+ Hits 1093 1336 +243
- Misses 850 870 +20
☔ View full report in Codecov by Sentry. |
BradyAJohnston
added a commit
that referenced
this pull request
Sep 14, 2023
Overhaul Biological Assemblies Brings work from @padix-key in #148 to properly support more biological assemblies. Fixes errors in #109.
BradyAJohnston
added a commit
that referenced
this pull request
Sep 14, 2023
Overhaul Biological Assemblies Brings work from @padix-key in #148 to properly support more biological assemblies. Fixes errors in #109.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This finally brings in the improved biological assembly information from #148 to main. This enables multiple biological assemblies to be shown, as well as properly supporting assemblies where not every chain is involved in every single transformation.
Previous implementations I have stored arbitrary data using individual node groups. While this worked well with smaller structures. Because the symmetry operations are applied on a chain-by-chain basis, this dramatically increases the number of operations that are required and dramatically slows down the creation of the node groups.
The data is now stored on a data object, inside of a new collection
MN_data
which is a collection inside ofMolecularNodes
collection. This collection also allows for storing other arbitrary data sets on objects for use inside of Geometry Nodes.Assembly Data Object
The data object currently has the following attributes:
position
: translation of the symmetry operationassembly_rotation
: rotation of the symmetry operationassembly_id
: which biological assembly this symmetry operation belongs tochain_id
: which chain this symmetry operation acts uponFor this to work properly, the structure has to first be split into instances based on the
chain_id
. This is done by the newMOL_utils_split_{name}
node which separates the geometry based on thechain_id
and then combines them as instances. This node can be slow on larger structures, but is currently the only way to have the symmetry operations only be applied to their relevant chains.Inside the user-facing assembly node, the geometry is split into instances, then these instances are instanced on their symmetry operations based on the data object.
Scaling the rotation and translations, as well as choosing the biological assembly are all exposed on the user-facing node.
The assembly can be applied to any of the styles, as long as the resulting styles conain
chain_id
attributes.