BradyAJohnston / MolecularNodes

Toolbox for molecular animations in Blender, powered by Geometry Nodes.
https://bradyajohnston.github.io/MolecularNodes/
GNU General Public License v3.0
882 stars 83 forks source link

Bug with Default Selection in MD Trajectory #174

Closed kimjoyc closed 1 year ago

kimjoyc commented 1 year ago

Describe the bug Blender crashes when some molecular dynamics trajectories are loaded through MolecularNodes with an import filter.

To Reproduce Load the DNA system with the default import filter and attach the prmtop and dcd files from the molecular-nodes-bug repository link below located in the Additional context section. Please refer to the repository to reproduce the bug for all test cases.

The test case below involves a bond conflict with DNA where selection of resid 20 that leads to crashing, due to partial molecule selection unaccounted for in the atoms indices versus the bond indices.

Case 5 - Blender Crashes Make the following choices when importing:

Expected behavior Expect Blender to not crash and to load the trajectory.

Error Codes Please include associated error codes that are shown in the python console when the error occurs.

To view the python console on Windows, Window -> Toggle System Console, on Mac you must start Blender from the terminal.

Blender is crashing with exit code 139 and is found by going into Blender environment running ./blender executable on the terminal then following one of the test cases to make it crash. Then error is retraced with echo $? that yields 139. The Exit Code 139 means that the there is a SIGSEGV from Blender. It is most likely due to the bond conflicts relative to the all the atoms present.

# paste error codes from python console here

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

molecular-nodes-bug repository link below: https://github.com/janash/molecular-nodes-bug

Note: There is an incoming PR fix for the bug.

BradyAJohnston commented 1 year ago

Thanks for the info on the bug! I've had a look through https://github.com/janash/molecular-nodes-bug and using the supplied code (and what was in your PRs) certainly fixes the problems.

There has now been two PRs that have been opened and then closed before I could review them. Is there something I can do to help out with the creation of a PR? The solution seems to work, so I'm pretty happy to review and merge.

kimjoyc commented 1 year ago

I have opened a new PR today. Needed to edit and fix it.

https://github.com/BradyAJohnston/MolecularNodes/pull/177