BradyAJohnston / MolecularNodes

Toolbox for molecular animations in Blender, powered by Geometry Nodes.
https://bradyajohnston.github.io/MolecularNodes/
MIT License
798 stars 81 forks source link

'Live' MDAnlaysis session loses connection upon object name change #475

Open BradyAJohnston opened 1 month ago

BradyAJohnston commented 1 month ago

If you change the name of a trajectory that has been imported via MDAnalysis, the connection between the object and the Universe it is related to is lost if the name of the object is changed.

I believe this is because the list of AtomGroups are stored on the scene level, with reference to each object that is associated with the atom group. I believe we should change this so that each object / topology object has a reference to the universe that it is related to. The atomgroups / universes are in the list, and can be removed / deleted when an object is deleted. This also fixes the problem of not being able to 'look up' the universe that an object is getting its coordinates from. Currently you have to loop through all of the atom groups / universes and check for the names of objects. This then breaks if the objects themselves are renamed (which is often done), leading to the current problem.