While doing molecular dynamics (MD) simulation, it can be difficult to calculate the number of steps or nsteps for an MD run accurately. In this article, we will learn to calculate nsteps for an MD run.
When we prepare the MD run file (md.mdp) in the GROMACS simulation, we need to write the exact number of steps depending on the length of the simulation in nanoseconds (ns). How many ns a simulation will run is determined by providing the nsteps in the md.mdp file. That’s how we do it.
For 1 ns simulation
Let’s assume time in ns is x and 1000 ps = 1 ns
, therefore, the general equation will be:
nsteps * timestep (ps/step) = 1000 * x ps = x ns
So, if you want to run MD for 1 ns, then the equation will be,
x (nsteps) * 0.002 time (ps/step) = 1 ns
###The timestep in production MD runs (dT) is 2 fs (i.e., 0.002 ps).
x (nsteps) = 1000 ps/ 0.002 time (ps/step)
x (nsteps) = 500000
500000 (nsteps) * 0.002 time (ps/step) = 1000 ps = 1 ns
The number of steps for a 1 ns simulation will be 500000.
For 100 ns simulation
If you want to run an MD simulation for 100 ns, then the equation will become like this:
x (nsteps) * 0.002 time (ps/step) = time in ps (time in ns)
###The timestep in production MD runs (dT) is 2 fs (i.e., 0.002 ps).
0.002 * x (nsteps) = ns
0.002 * 50000000 = 100000 ps = 100 ns
0.002 * x (nsteps) = 100000 ps = 100 ns
x (nsteps) = 100000 ps/ 0.002 time (ps/step)
x (nsteps) = 50000000
Therefore, the final equation will be:
50000000 (nsteps) * 0.002 time (ps/step) = 100000 ps = 100 ns
The number of steps for 100 ns simulation will be 50000000.