# Complexity of MD simulations

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.
• @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