-
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
Adds support for importing CellPack models #283
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #283 +/- ##
==========================================
- Coverage 66.60% 66.48% -0.12%
==========================================
Files 21 24 +3
Lines 2530 3076 +546
==========================================
+ Hits 1685 2045 +360
- Misses 845 1031 +186
☔ View full report in Codecov by Sentry. |
@corredD would you want to have a look at this? I kept putting off going back to your PR (#121) because I wanted to first integrate the better handling of biological assemblies and instancing of larger structures. I finished implementing that in #278. With the overhauled biological assembly parsing, it now opens some cellpack models without too much trouble. The above image is tested on the I ended up moving completely away from instancing on geometry that was originally implemented in your PR, as Blender is planning on removing that entirely possibly in 4.0 or in a later version in favor of instancing through points / geomtry nodes. If you were willing, having parsing of the colors and other attributes from the |
Looks great, except for one protein that should not be at the surface. You can see the model here for comparison : https://molstar.org/dev/me/ |
Thanks for the info @corredD and glad you'd like to still contribute. I have fixed the instancing (some of the ordering was slightly out) and have set it up to create a per-molecule color (currently generated randomly). They should take on the colors automatically now. I have just added a 'Sun' light, then used some nodes to slice through it based on the In the initial node tree, the 'proportion' will reduce the number of instances randomly (to make the scene less heavy). I added a compare, separate XYZ and position nodes to get the sliced selection. I'll try and improve the defaults to make it a bit more useful as well. |
still breaks at higher counts of chains, unsure why it's running away. rotations etc definitely still aren't working properly but it's getting there
@corredD I did a bunch of cleanup and refactoring and I was pretty happy with how it was handling everything. Thanks for the assistance in getting it all working. Happy with how it is currently for initial support. The next things to add would be using the custom color palettes and adding other specific attributes that could be useful. |
Imports CellPack models that are stored as
.cif
files. Creates a data storage object which stores all of the required rotation / translation operations, and creates a collection which contains an object for each protein. The collection can then be used as instances for instancing on the data object to create the assembled model.