ISISNeutronMuon / MDANSE

MDANSE: Molecular Dynamics Analysis for Neutron Scattering Experiments
https://www.isis.stfc.ac.uk/Pages/MDANSEproject.aspx
GNU General Public License v3.0
21 stars 5 forks source link

[BUG] Trajectories with many atoms take too long to load #323

Closed MBartkowiakSTFC closed 7 months ago

MBartkowiakSTFC commented 8 months ago

Description of the error While there are no problems loading trajectories with many frames, having many atoms in a frame is problematic. On a modern computer is takes 10 minutes to load a trajectory with 256000 atoms.

Describe the expected result This should have taken a few seconds.

Describe the actual result I took 10 minutes to load the trajectory, then another 10 to put it into the 3D viewer. After that, moving to the next frame in the 3D viewer would take 2-3 seconds per frame.

Suggested fix I expect that the problem is caused by the ChemicalSystem instance which creates an instance of Atom for every atom in the trajectory. This will have to be removed.

Additional details There may be some overhead of creating a Configuration out of atom coordinates. This should be investigated once the Atom class has been removed.

ChiCheng45 commented 7 months ago

The trajectory loading times have been reduced in #346. The issue was mostly due to slow loading of atom data and the slow implementation of the bonding calculations.

Closed by #346