Plot Energies/Forces/... over time
What feature would you like to see added? For the investigation of ML based trajectories it can be interesting to be able to look at properties such as energy, forces, densities or velocities over time. This might become handy if a ML trajectory explodes. Because MDSuite has access to all this properties it should be possible to visualize them.
Describe how this feature would work/possible implementations I'd propose an implementation similar to the calculators. Something like
experiment.visualize(property="energy", smoothing=0.2, start=0, stop=-1, step=1)
# property could also be list, in case for force_x, force_y, force_z ?
experiment.visualize.energy(smoothing=0.)
I would also like to be able to export that data easily into numpy arrays, so we could either add that directly as function or use the existing properties database for that (but it might not be sensible to store the data in SQL and H5Py simultaneously)
Additional context
- Because MDSuite should know all the units it should be possible to label the axis correctly.
- How should we handle properties like forces, have
force_x, force_y, force_zandforcegives the magnitude?
This is a great idea, not only for the ML potentials, but also for for any benchmark of a potential as you always want to ensure you get the correct density.
I would be interested in having a calculator to do this sort of thing, or adding it to a visualisation module. My argument for a calculator is that we can compute things like average temp or density. It would also reduce confusion with the visualiser that we are implementing for the atoms.
Additional Notes In the cases of vectored properties, it is probably rare that we want to visualise them in a time series at the same time. We could consider making volumes or heat maps, which would definitely come under visualisers as this is the direction we want to take with things like spatial distribution functions, but this requires additional discussion.
Implementation I would suggest we start by having a scalar value calculator which studies scalars such as density, volume, force magnitude, and so on. This could go in the calculator package and have the exact parameters you suggested with perhaps some additional methods for computing values.
In the case of vector fields and multi-dimensional plotting, we should consider adding a visualisation module for these things and putting some effort into studying how we can best represent them.
How did this go?
exp.analyse_time_series.Energies() should work fine.
I haven't implemented anything exceeding the energies.
Maybe a better thing here is to have some profiling module. We could have a binning or plotting argument that could handle lots of stuff. I would also include particle density profiles here too. @PythonFZ
I like the idea, how could this look like?
We could have something like this, where we summarize all possible profiles in a module and raise an error if the given property is not available?
project.experiments.Exp01.profile(mds.profiling.Energy)
How should the profile command be called. We could go for the general approach and call them plot and bin(<>, n_bins=...) or we could have something specific. I would like to avoid .profile.plot() because I think that might be to deeply nested.
A possible alternative would be
profiling = mds.profiling.plot(mds.profiling.Energy)
project.experiments.NaCl_example_data.execute_operation(profiling)
which could help with the seperation of concerns and would be similar to the calculator restructure.
The actual modules might be called differently.