16

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?

Daniel Standage
  • 663
  • 5
  • 17

1 Answers1

18

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.

Brian Diggs
  • 316
  • 2
  • 9
  • 8
    Additionally, complexity in terms of simulated system size typically scales with O(n^2) when not using modified electrostatics like PME. – Keith Callenberg Nov 29 '11 at 22:44
  • 1
    @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). – Brian Diggs Nov 29 '11 at 22:51
  • 3
    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. – aeismail Dec 15 '11 at 19:14