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?


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.

  • 7
    $\begingroup$ Additionally, complexity in terms of simulated system size typically scales with O(n^2) when not using modified electrostatics like PME. $\endgroup$ Nov 29 '11 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) where n is the size (number of particles) and t is the number of time steps (length of time simulated divided by the size of each time step). $\endgroup$ Nov 29 '11 at 22:51
  • 2
    $\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$
    – aeismail
    Dec 15 '11 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.