This is a repository containing the experiments to validate the FlashMD method. It contains
various subfolders to reproduce different parts of the experiments, each with its own
readme.txt file.

In order to reproduce the results, three steps are necessary: data generation, training, and simulations.
To run them, it is necessary to set up a basic Python environment (including pip), and to install three
libraries, which are all provided in this archive: metatrain, i-pi and skipmd.

For example, you can install metatrain with
cd metatrain
python -m pip install .
and similarly for the other two libraries.
We also include a modified version of metatrain to train the uncertainty models. This version
is in the metatrain_uq folder and can be installed in the same way.


1 - Data generation

Three datasets of molecular dynamics trajectories were used to train the models. The first one is the
universal dataset generated using the PET-MAD MLIP ("universal_dataset/" subfolder), the second one
is the water dataset generated using the PET-MAD MLIP ("water_dataset/" subfolder), and the third one
is the water dataset generated using the q-TIP4P/f empirical force field ("water_qtip4pf_dataset/" subfolder).

2 - Training

The three datasets were then used to train FlashMD models, using the metatrain library. The training scripts
and option files can be found in the "universal_train/", "water_train" and "water_qtip4pf_train/"
subfolders, respectively. The checkpoints generated during training can be exported for MD using the script
in the export/ folder. Once exported, the trained models should be moved to the "models/" subfolder so they
can be found by the molecular dynamics scripts.

3 - Molecular dynamics

The molecular dynamics experiments for the three classes of FlashMD models are contained in the "universal/",
"water/" and "water_qtip4pf/" subfolders, respectively.

Extra - Further material

The "ablation/" subfolder contains code to reproduce the ablation studies, the "argon/" subfolder contains
dataset generation and training instructions for the argon benchmark, the "uq/" subfolder contains scripts
to analyze the uncertainties of the models with uncertainty quantification, and the "plotting/" subfolder
contains code that was used to plot the results. In the various subfolders, we also provide the final
results that are needed by the plotting notebook.

Note: the "atomistic toolbox" (https://github.com/lab-cosmo/toolbox) needs to be cloned in the same directory
as flashmd-experiments/ (i.e. outside of the root directory of this repository) and compiled in order to
execute some of the processing scripts for the molecular dynamics simulations
