Molecular Dynamics Simulation with AMBER: A Practical Guide – Part 2
- Ahmet Güveli
- Mar 24
- 2 min read
Step 4: Energy Minimization
Before starting the simulation, it is important to ensure that the atomic coordinates of the system are in a reasonably “correct” geometry so that the system does not become unstable during the simulation.
For this purpose, a min.in file must first be created.
In the terminal:
> nano min.in
Enter the command above.
Then, write the following into the min.in file:
Minimization input
&cntrl
imin = 1, ! Perform energy minimization
ntmin = 1, ! First ncyc steps: steepest descent, then conjugate gradient
ncyc = 100, ! First 100 steps with steepest descent
drms = 0.01, ! Root mean square of the gradient
maxcyc = 100000, ! Stop after a maximum of 100000 steps
ntb = 1, ! Constant volume periodic box
cut = 9, ! Nonbonded interaction cutoff (Å)
&end
After writing the file, save it using CTRL+O, exit nano with CTRL+X, and clear the terminal (if needed) using CTRL+L.
Then run the following command:
> /amber_path/pmemd24/bin/pmemd.cuda -O -i min.in -o min.out -p topology_file.top -c initial_coordinates.rst -r output.rst
In this command: -i specifies the input file, -c specifies the coordinate file, -p specifies the topology file, -o specifies the output file and -r specifies the restart (output coordinate) file.
Make sure that the CUDA module for AMBER GPU is properly loaded using:
Then, save the file. Make sure that the CUDA module for AMBER GPU is properly loaded by sourcing it with the following command:
In the terminal:
> /amber_path/pmemd24/bin/pmemd.cuda -O -i min.in -o min.out -p topology_file.top -c initial_coordinates.rst -r output.rst
With this command, energy minimization is performed.
Step 5: NVT Step
Before proceeding to the 30 ns production simulation, the system must be equilibrated at a biologically relevant temperature. For this purpose, the simulation system is equilibrated at 310 K using the NVT ensemble.
First, a heat.in file is created. Inside it:
Heating: 300K (NVT)
&cntrl
imin=0, ! Perform MD (not minimization)
irest=0, ntx=1, ! Start from scratch, not from a restart file
nstlim=50000, ! 50,000 steps (0.002 ps * 50000 = 100 ps)
dt=0.002, ! Time step (ps)
tempi=310.0, ! Initial temperature
temp0=310.0, ! Target temperature
ntpr=500, ntwx=500, ntwr=1000, ! Output frequencies
ntc=2, ntf=2, ! Constrain bonds (SHAKE applied to fix bonds involving H)
ntt=3, ! Langevin termostat
gamma_ln=3.0, ! Langevin collision frequency
ntb=1, ! Constant volume (NVT)
ntp=0, ! Pressure coupling off
cut=8.0, ! cutoff
ntr=0 ! No restraints
“”””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””
It is written into the file. Then, the file is saved.
In the terminal:
> /amber_path/pmemd24/bin/pmemd.cuda -O -i heat.in -o heat.out -p topology_file.top -c post_minimization_coordinates.rst -r output.rst

The energy and temperature values obtained during the NVT step performed as described above are shown. TEMP represents the average temperature. Here, the system temperature was obtained as 309 K, which is quite close to the desired temperature. The reason why the PRESS value is 0 is that an NVT simulation was performed. In other words, in this step, only the temperature of the system was equilibrated, and no pressure equilibration was carried out.
