multi_replica
This keyword selects replica-exchange molecular dynamics (REMD) or parallel replica dynamics (PRD).
Run the gpumd executable with a run.in file containing this command.
The remd and prd parameters select the mode; their options are described on the following pages:
Syntax
multi_replica <mode> replicas <number> [<per_gpu>] <options>
Parameters
Select remd or prd and supply the corresponding options. Each replica is a separate copy of the system. To create a spatial supercell instead, use replicate.
number is the total replica count.
The optional per_gpu is the capacity per GPU, defaulting to the replica count divided by the number of visible GPUs, rounded up.
Total capacity must accommodate all replicas.
Replicas are assigned round-robin and remain resident in GPU memory.
One process uses the visible GPUs on a single node; select GPUs with CUDA_VISIBLE_DEVICES or the job scheduler.
Output
REMD and PRD automatically write their diagnostics and restart files.
Trajectories require dump_xyz.
To continue a completed run, use the mode’s resume option and preserve the complete set of restart files.
Examples
With four visible GPUs, this places two replicas on each GPU:
multi_replica remd replicas 8 2 exchange 1000 temp 300 450
A complete REMD input is:
potential nep.txt
time_step 0.5
ensemble nvt_bdp 300 450 100
multi_replica remd replicas 8 exchange 1000 temp 300 450 equilibrate 200000
dump_xyz -1 0 5000 trajectory.xyz velocity
run 2000000
This uses a geometric temperature ladder from 300 to 450 K, with 200000 equilibration steps followed by 2000000 production steps per replica. See multi_replica (PRD) for a complete PRD example.
Notes
Input files
Prepare run.in, model.xyz, and one supported potential file in the working directory, then run gpumd there.
All replicas use the same initial structure, species, masses, and simulation box.
REMD can optionally read a temperature ladder file.
Initial velocities are generated by the replica driver; velocities in model.xyz are ignored for a fresh run.
A resumed run uses the velocities and random-number-generator states in its restart files.
Supported input commands
A run.in containing multi_replica accepts only the commands below.
Specify multi_replica and ensemble once each, and put one run command last.
Other GPUMD commands, including deposit, velocity, and minimize, cannot be combined with this mode.
Potential
Use potential with exactly one filename:
potential <filename>
Energy NEP models and charge NEP (qNEP) models are supported. Temperature-dependent NEP models are not supported. Charge NEP models require periodic boundaries in all three directions. GPUs are assigned whole replicas rather than spatial partitions of one system.
Time step
Use time_step with one positive time step in fs:
time_step <dt>
The default is 1 fs. The optional maximum-displacement limit of ordinary MD is not supported in replica runs.
Thermostat
The ensemble command must use nvt_bdp with a fixed simulation box:
ensemble nvt_bdp <T_start> <T_end> <T_coup>
This is the stochastic velocity-rescaling thermostat of Bussi, Donadio, and Parrinello [Bussi2007b].
Temperatures are in K and must be positive.
T_coup is the thermostat relaxation time divided by the time step and must be at least 1.
REMD: the temperatures must match the ladder endpoints; they do not define a heating ramp.
PRD: both temperatures must be equal.
The thermostat uses \(3N\) degrees of freedom for REMD and \(3N-3\) for PRD. PRD removes center-of-mass motion and requires at least two atoms.
Electrostatics
For qNEP models, kspace selects pppm (the default) or ewald.
The optional PPPM mesh spacing has the same meaning and allowed range as in ordinary MD.
This setting has no effect for energy NEP models.
The method and an explicitly supplied spacing must match when resuming.
Run length
Use run once, at the end of run.in, with a positive number of steps:
run <number_of_steps>
REMD: production steps per replica, excluding initial equilibration.
PRD: correlation and parallel MD steps, excluding dephasing and minimization.
Resume: additional steps beyond the saved state.
Trajectory output
The optional dump_xyz command can appear once and uses the following syntax in replica runs:
dump_xyz -1 0 <interval> <filename> [velocity]
The interval must be positive. Only grouping method -1 is supported; use 0 for the unused group index.
The filename cannot end with *. Other ordinary-MD dump_xyz options are not supported.
REMD: writes positions every
intervalproduction steps, with optional velocities.PRD: writes the initial quenched basin and each accepted transition. The interval is validated but ignored; use
1. Velocities are not supported.
See Replica trajectory files for filenames and frame contents.