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

[ENHANCEMENT] A mock trajectory object for performance tests #279

Closed MBartkowiakSTFC closed 3 months ago

MBartkowiakSTFC commented 9 months ago

Is your feature request related to a problem? Please describe. We are planning a batch test of all the analysis runs, in order to check how they scale with the number of atoms and number of frames. Instead of running multiple MD simulations to generate the input, we could also create a mock trajectory which will always return coordinates, giving the trajectory an arbitrary length.

Describe the solution you'd like A new class which imitates the API of Trajectory should be implemented. The chemical composition will be defined in the constructor call. Then a number of position frames will be pre-generated, and the trajectory will cycle through them in a modulo division style, incrementing their time step.

Describe alternatives you've considered Another way would have been to generate the coordinates on the fly each time, but this will make the generation slower and obscure the problems with the performance of the analysis itself.

Additional context N/A

MBartkowiakSTFC commented 3 months ago

The mock trajectory works for basic cases, and has its own unit tests.