DOI: 10.5281/zenodo.14922167
title: Simulation data and code for "Optimal Rejection-Free Path Sampling"

description: This repository contains the main data of the paper "Optimal Rejection-Free Path Sampling," and the source code for generating/appending the independent RFPS-AIMMD and AIMMD runs.

Due to size constraints, the data has been split into separate repositories. The following repositories contain the trajectory files generated by the runs:

all the WQ runs: 10.5281/zenodo.14830317chignolin, fps0: 10.5281/zenodo.14826023chignolin, fps1: 10.5281/zenodo.14830200chignolin, fps2: 10.5281/zenodo.14830224chignolin, tps0: 10.5281/zenodo.14830251chignolin, tps1: 10.5281/zenodo.14830270chignolin, tps2: 10.5281/zenodo.14830280

The trajectory files are not required for running the main analysis, as all necessary information for machine learning and path reweighting is contained in the "PatEnsemble" object files stored in this repository. However, these trajectories are essential for projecting the path ensemble estimate onto an arbitrary set of collective variables.

To reconstruct the full dataset, please merge all the data folders you find in the supplemental repositories.

Data structure and content

analysis (code for analyzing the data and generating the figures of the|         paper)|- figures.ipynb (Jupyter notebook for the analysis)|- figures (the figures created by the Jupyter notebook)   |- ...

data (all the AIMMD and reference runs, plus general info about the|     simulated systems)|- chignolin   |- *.py: (code for generating/appending AIMMD runs on a Workstation or   |         HPC cluster via Slurm; see the "src" folder below)   |- run.gro (full system positions in the native conformation)   |- mol.pdb (only the peptide positions in the native conformation)   |- topol.top (the system's topology for the GROMACS MD engine)   |- charmmm22star.ff (force field parameter files)   |- run.mdp (GROMACS MD parameters when appending a simulation)   |- randomvelocities.mdp (GROMACS MD parameters when initializing a   |                        simulation with random velocities)   |- signature.npy, r0.npy (parameters for defining the fraction of native   |                         contacts involved in the folded/unfolded states   |                         definition; used by params.py function   |                         "states_function")   |- dmax.npy, dmin.npy (parameters for defining the feature representation   |                      of the AIMMD NN model; used by params.py   |                      function "descriptors_function")   |- equilibrium (reference long equilibrium trajectory files; only the      |            peptide positions are saved!)      |- run0.xtc, ..., run3.xtc   |- validation      |- validation.xtc (the validation SPs all together in an XTC file)      |- validation.npy (for each SP, collects the cumulative shooting results                         after 10 two-way shooting simulations)   |- fps0 (the first AIMMD-RFPS independent run)      |- equilibriumA (the free simulations around A, already processed      |             in PathEnsemble files)         |- traj000001.h5         |- traj000001.tpr (for running the simulation; in that case, please         |                  retrieve all the trajectory files in the right         |                  supplemental repository first)         |- traj000001.cpt (for appending the simulation; in that case, please         |                  retrieve all the trajectory files in the right         |                  supplemental repository first)         |- traj000002.h5 (in case of re-initialization)         |- ...      |- equilibriumB (the free simulations around B, ...)         |- ...      |- shots0         |- chain.h5 (the path sampling chain)         |- pool.h5 (the selection pool, containing the frames from which         |           shooting points are currently selected from)      |- params.py (file containing the states and descriptors definitions,      |             the NN fit function, and the AIMMD runs hyperparameters;      |             if can be modified to allow for RFPS-AIMMD or the original      |             algorithm AIMMD runs)      |- initial.trr (the initial transition for path sampling)      |- manager.log (reports info about the run)      |- network<step_number>.h5 (NN weights of the model at different path      |                           sampling steps)   |- fps1, fps2 (the other RFPS-AIMMD runs)   |- tps0 (the first AIMMD-TPS, or "standard" AIMMD, run)      |- ...      |- shots0         |- ...         |- chain_weights.npy (weights of the trials in TPS; only the trials         |                     with non zero weight had been accepted)   |- tps1, tps2 (the other AIMMD runs, with TPS for the shooting simulations)|- wq (Wolfe-Quapp 2D system)   |- *.py: (code for generating/appending AIMMD runs on a Workstation or   |         HPC cluster via Slurm)   |- run.gro (dummy gro file produced for compatibility reasons)   |- integrator.py (custom MD engine)   |- equilibrium (reference long simulation)      |- transition000001.xtc (extracted from reference long simulation)      |- transition000002.xtc      |- ...      |- transitions.h5 (PathEnsemble file with all the transitions)   |- reference      |- grid_X.npy, grid_Y.npy (X, Y grid for 2D plots)      |- grid_V.npy (PES projected on the grid)      |- grid_committor_relaxation.npy (true committor on the grid solved      |                                 with the relaxation method on the      |                                 backward Kolmogorov equation; the      |                                 code for doing this is in utils.py)      |- grid_boltzmann_distribution.npy (Boltzmann distribution on the grid)      |- pe.h5 (equilibrium distribution processed as a PathEnsemble file)      |- tpe.h5 (TPE distribution processed as a PathEnsemble file)      |- ...   |- uniform_tps (reference TPS run with uniform SP selection)      |- chain.h5 (PathEnsemble file containin all the accepted paths      |            with their correct weight)   |- fps0, ..., fps9 (the independent AIMMD-RFPS runs)      |- ...   |- tps0, ..., tps9 (the independent AIMMD-TPS, or "standard" AIMMD runs)

src (code for generating/appending AIMMD runs on a Workstation or HPC|    cluster via Slurm)|- generate.py (on a Workstation: initializes the processes; on an HPC|               cluster: creates the sh file for submitting a job)|- slurm_options.py (to customize and use in case of running on HPC)|- manager.py (controls SP selection; reweights the paths)|- shooter.py (performs path sampling simulations)|- equilibrium.py (performs free simulations)|- pathensemble.py (code of the PathEnsemble class)|- utils.py (auxiliary functions for data production and analysis)

Running/appending AIMMD runs

* To initialize a new RFPS-AIMMD (or AIMMD) run for the systems of this paper:

1. Create a "run directory" folder (same depth as "fps0")

2. Copy "initial.trr" and "params.py" from another AIMMD run folder. It is possible to change "params.py" to customize the run.

3. (On a Workstation) call:

python generate.py <run_directory> <nsteps> <n> <nA> <nB>

where nsteps is the final number of path sampling steps for the run, n the number of independent path sampling chains, nA the number of independent free simulators around A, and nB that of free simulators around B.

4. (On a HPC cluster) call:

python generate.py <run_directory> <nsteps> <n> <nA> <nB> -s slurm_options.pysbatch .<run_directory>_job.sh

* To append to an existing RFPS-AIMMD or AIMMD run

1. Merge the supplemental repository with the trajectory files into this one.

2. Just call again (on a Workstation)

python generate.py <run_directory> <nsteps> <n> <nA> <nB>

or (on a HPC cluster)

sbatch .<run_directory>_job.sh

after updating the "nsteps" parameters.

* To run enhanced sampling for a new system: please keep the data structure as close as possible to the original. Different names for the files can generate incompatibilities. We are currently trying to make it easier.

Reproducing the analysis

Run the analysis/figures.ipynb notebook. Some groups of cells have to be run multiple times after changing the parameters in the preamble.