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
23 stars 5 forks source link

Split trajectory frames into chunks #602

Closed MBartkowiakSTFC closed 1 week ago

MBartkowiakSTFC commented 2 weeks ago

Description of work Trajectory arrays such as positions, velocities and charges are now split into fixed-size chunks within a single time step.

closes #596

Note: the changes in this PR will break the scripts in MDANSE-Examples. The scripts should be updated around the time of the next release.

Fixes

  1. Changed chunking in TrajectoryWriter. The arrays are padded to ensure that their size is a multiple of the chunk size.
  2. Added chunk size as a parameter to OutputTrajectoryConfigurator.
  3. Added chunk size to OutputTrajectoryWidget.
  4. Replaced test trajectories in unit tests with chunked ones.
  5. Updated test inputs to inlcude the new parameter.

To test Convert a trajectory using the protos branch. Run Dynamic Coherent/Incoherent Structure Factor analysis on this trajectory and time both runs. Repeat the same steps using this branch. Compare the results and the timing. Expected results: DCSF will slow down by ca. 5%, DISF will speed up by ca. 25%, the results should not change.