Molecular Dynamics
Running a plain MD simulation with the internal dynamics module.
Table of contents
The --dynamics runtype
--dynamics (alias --dyn) runs a straightforward molecular dynamics simulation with the internal MD module, a velocity Verlet integrator driving the same calculators as every other runtype. It is the same engine that the metadynamics of the conformational search is built on, here without any bias potential.
The settings live in a [dynamics] block of a TOML input file:
crest input.tomlcrest struc.xyz --dynamics --gfn2, which uses the MD defaults: 20 ps at a 5 fs time step, Berendsen thermostat, SHAKE enabled.
# Molecular dynamics simulation
input = "struc.xyz"
runtype = "dynamics"
threads = 4
[calculation]
[[calculation.level]]
method = "gfn2"
[dynamics]
length = 2.0 # simulation length in ps
tstep = 2.0 # time step in fs
dump = 100.0 # write a snapshot every 100 fs
temp = 300.0 # target temperature in K
shake = 2 # constrain bonds (2 = all bonds)
─────────────── Molecular Dynamics Settings ──────────────
Simulation type : NVT
MD time (length) : 2.00 ps
dt (timetep) : 2.00 fs
temperature : 300.00 K
max steps : 1000
block length (av.) : 2500
dumpstep(trj) /fs : 100.00 (50)
# deg. of freedom : 25
thermostat : Berendsen
SHAKE constraint : true
# SHAKE bonds : 11 (all bonds)
hydrogen mass /u : 2.00000
──────────────────────────────────────────────────────────
[ ... ]
average properties
------------------------------------------
<Epot> -14.53223496 Eh
<Ekin> 0.01111890 Eh
<Etot> -14.52111606 Eh
<T> 280.89 K
Tvar 5362.51 K²
σ(T) 73.23 K
------------------------------------------
normal MD termination
MD run completed successfully
Trajectory written to crest_dynamics.trj.xyz
The settings block echoes what the simulation will actually do, which is worth reading before a long run: the 2 ps length at a 2 fs time step gives 1000 steps, and the 100 fs dump interval means every 50th step is written. Setting a target temperature implies a thermostat, so the simulation type is reported as NVT.
At the end, block averages of the potential, kinetic and total energy are printed together with the mean temperature and its fluctuation. The trajectory is written to crest_dynamics.trj.xyz, and a crest_0.mdrestart file holds the final state.
crest_dynamics.trj before CREST 3.1 and now carries an explicit .xyz extension, matching the convention of the other trajectory outputs.Simulation settings
The keys of the [dynamics] block:
| Key | Meaning |
|---|---|
length (length_ps) | total simulation time in ps |
tstep | time step in fs |
dump | interval for writing trajectory snapshots, in fs |
temp (t, temperature) | target temperature in K; setting it enables the thermostat |
thermostat | thermostat algorithm, see below |
shake | bond constraints: 0/false off, 1 X–H bonds, 2 all bonds |
hmass | hydrogen mass in u, for hydrogen mass repartitioning |
SHAKE removes the fastest vibrations from the integration, which is what allows a 2 fs step to be used at all. With shake = 2 the printout confirms how many bonds were constrained. Increasing hmass (hydrogen mass repartitioning) permits even larger steps.
tstep or enable shake.Thermostats
CREST 3.1
CREST 3.1 adds two stochastic thermostats alongside the existing Berendsen one, selected with the thermostat key:
| Value | Algorithm | Notes |
|---|---|---|
berendsen | Berendsen weak coupling | the default; efficient, but does not reproduce the exact canonical ensemble |
langevin (bbk) | Langevin dynamics | adds friction and a random force per atom; suited to an implicit solvent bath |
bussi (csvr) | Bussi–Donadio–Parrinello | stochastic velocity rescaling; samples the correct canonical distribution |
off (nve) | none | no temperature coupling, the simulation runs as NVE |
For example, to run the same simulation in the correct canonical ensemble:
[dynamics]
length = 2.0
tstep = 2.0
dump = 100.0
temp = 300.0
thermostat = "bussi" # stochastic velocity rescaling (BDP/CSVR)
The chosen algorithm is reported in the settings block, and thermostat = "off" switches the header from NVT to NVE:
Simulation type : NVT
thermostat : Bussi-Donadio-Parrinello
bussi.Where MD is used internally
The conformational search workflows do not call this runtype, but they use the same module. The iMTD-GC algorithm runs metadynamics, the same integrator with an additional history-dependent bias pushing the system away from structures it has already visited, and regular MD is used for the subsequent sampling steps. Settings such as tstep, shake and hmass carry over to those workflows.