I'm new to molecular dynamics (MD) simulations. What is the complexity of a molecular dynamics simulation in terms of simulation time? In other words, if I want increase the simulated time from 10 nanoseconds to 20 nanoseconds, what can I expect in terms of the increase in runtime?
1 Answer
$\begingroup$
$\endgroup$
3
Molecular dynamics simulations are linear (O(n)
) in the length of time simulated (assuming that the single timesteps ($\Delta t$) are unchanged). Since each timestep is dependent only on the previous configuration (and not any of those prior to that), increasing the number of timesteps results in a linear increase in time.
-
8$\begingroup$ Additionally, complexity in terms of simulated system size typically scales with O(n^2) when not using modified electrostatics like PME. $\endgroup$ Commented Nov 29, 2011 at 22:44
-
1$\begingroup$ @KeithCallenberg That is true; I didn't mention it since the question didn't ask that. It might be more complete to say that it scales as
O(n^2)O(t)
wheren
is the size (number of particles) andt
is the number of time steps (length of time simulated divided by the size of each time step). $\endgroup$ Commented Nov 29, 2011 at 22:51 -
3$\begingroup$ It's a little more complicated than that, isn't it? It should be O(N^2) if you're studying systems without cutoffs; O(N log N) if you're doing uncharged systems with a cutoff or charged systems with mesh-based approaches. $\endgroup$– aeismailCommented Dec 15, 2011 at 19:14