The Rule
The timestep should be less than the period of the fastest vibration by at least 2. In signal processing this is known as Nyquist's theorem.
If a function
${\displaystyle x(t)}$
contains no frequencies higher than B hertz, it is completely determined by giving its ordinates at a series of points spaced ${\displaystyle 1/(2B)}$ seconds apart.
The frequency of a C-H bond is around 3000 $cm^{-1}$. Converting to Hertz this is about 8.99e+13 $Hz$ or a period of 11 femtoseconds.
Therefore, we need a timestep of at least 5 fs but the integrator also introduces some error.
However, even when doing SHAKE (which removes most of the high-frequency vibrations) most MD stick with a 2 fs timestep. For example, see this CHARMM post.
So how do we check?
One way you can check if the timestep is okay is to check if there is any drift in a constant energy simulation (NVE). If there is that can mean that the integrator is not behaving time-reversibly. I ran the following with a time-step of 3 fs and no shake and the energy looks constant
I tried to sequentially increase the time-step to demonstrate the drift. However, the energy apparently deviated so fast from constant energy that the energy blew up and OpenMM complained ( this happened at a timestep of 4 fs)
Lastly, I wanted to update this post with this excellent open-access document:
In that document they give excellent advice on the choice of the time step:
- fluctuations of about 1 part in 5000 of the total system energy per
twenty time steps are acceptable
- time step size is about 0.0333
to 0.01 of the smallest vibrational period in the simulation