MD
- mlptrain.sampling.md.run_mlp_md(configuration: mlptrain.Configuration, mlp: MLPotential, temp: float, dt: float, interval: int, pressure: float | None = None, compress: float | None = None, init_temp: float | None = None, fbond_energy: dict | None = None, bbond_energy: dict | None = None, bias: 'mlptrain.Bias' | 'mlptrain.PlumedBias' | None = None, restart_files: List[str] | None = None, copied_substrings: Sequence[str] | None = None, kept_substrings: Sequence[str] | None = None, **kwargs) mlptrain.Trajectory
Run molecular dynamics on a system using a MLP to predict energies and forces and ASE to drive dynamics. The function is executed in a temporary directory. Note that NPT simulations are currently only implemented in production runs and not in active learning.
directory. Note that NPT simulations are currently only implemented in production runs and not in active learning.
- Parameters:
mlp – Machine learnt potential
temp – Temperature in K to initialise velocities and to run NVT MD, if temp=0 then will run NVE
init_temp – (float | None) Initial temperature to initialise momenta with. If None then will be set to temp
dt – (float) Time-step in fs
interval – (int) Interval between saving the geometry
pressure – pressure in bar to run Berendsen NPT MD, temperature and pressure must also be specified in order to run NPT dynamics.
compress – compressibility in bar^-1 to run Berendsen NPT MD, temperature and pressure must also be specified in order to run NPT dynamics.
bbond_energy – (dict | None) Additional energy to add to a breaking bond. e.g. bbond_energy={(0, 1), 0.1} Adds 0.1 eV to the ‘bond’ between atoms 0 and 1 as velocities shared between the atoms in the breaking bond direction
fbond_energy – (dict | None) As bbond_energy but in the direction to form a bond
bias – (mlptrain.Bias | mlptrain.PlumedBias) mlp-train constrain to use in the dynamics
restart_files – List of files which are needed for restarting the simulation
kept_substrings – List of substrings with which files are copied back from the temporary directory e.g. ‘.json’, ‘trajectory_1.traj’
copied_substrings – List of substrings with which files are copied to the temporary directory. Files required for MLPs are added to the list automatically
- Keyword Arguments:
constraints – (List) List of ASE constraints to use in the dynamics e.g. [ase.constraints.Hookean(a1, a2, k, rt)]
write_plumed_setup – (bool) If True saves the PLUMED input file as plumed_setup.dat
- Return type:
(mlptrain.Trajectory)