Sign up ×
Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It's 100% free.

I am reading the book Computer Simulation of Liquids by Allen and Tildesley (here is another link). On page 80, the authors describe the leap-frog algorithm, which is used extensively in molecular dynamics (MD) simulations. The leap-frog algorithm is a modification to the basic Verlet algorithm. The authors state:

Modifications to the basic Verlet scheme have been proposed to tackle [the deficiencies of the basic Verlet scheme]. One of these is a so-called half-step 'leap-frog' scheme. The origin of the name becomes apparent when we write the algorithm down:

$$\textbf{r}(t + \delta t) = \textbf{r}(t) + \textbf{v}(t + \frac{1}{2} \delta t) \delta t \; \; \; \; \textbf{(3.17a)}$$

$$\textbf{v}(t + \frac{1}{2} \delta t) = \textbf{v}(t - \frac{1}{2} \delta t) + \textbf{a}(t) \delta t \; \; \; \; \textbf{(3.17b)}$$

The stored quantities are the current positions $\textbf{r}(t)$ and accelerations $\textbf{a}(t)$ together with the mid-step velocities $\textbf{v}(t - \frac{1}{2} \delta t)$. The velocity equation (3.17b) is implemented first, and the velocities leap over the coordinates to give the next mid-step values $\textbf{v}(t + \frac{1}{2} \delta t)$. During this step, the current velocities may be calculated:

$$\textbf{v}(t) = \frac{1}{2} \left[ \textbf{v}(t + \frac{1}{2} \delta t) + \textbf{v}(t - \frac{1}{2} \delta t) \right] \; \; \; \; \textbf{(3.18)}$$

This is necessary so that the energy ($\mathcal{H} = \mathcal{K} + \mathcal{V}$) at time $t$ can be calculated, as well as any other quantities that require positions and velocities at the same instant. Following this, equation (3.17a) is used to propel the positions once more ahead of the velocities. After this, the new accelerations may be evaluated ready for the next step. This is illustrated in Fig. 3.2.


I have pasted Fig. 3.2 above; panel (b), framed in red, refers to the leap-frog algorithm.

My question is, how is the acceleration computed in this algorithm?

In Fig. 3.2(b), it appears that the first step (which I have personally highlighted in yellow) is to somehow compute $\textbf{a}(t)$ from $\textbf{r}(t)$. However, I do not see an equation for this. Do you know what equation the step highlighted in yellow would be? Thanks.

share|cite|improve this question

1 Answer 1

up vote 3 down vote accepted

The acceleration ${\bf a}(t)$ is simply computed from Newton law $F = m a $. It's a function of the forces on the particle, which is (assumedly) computable from the positions ${\bf r}(t)$ (of the entire system, i.e. all particles) at time $t$.

This can be seen also in the figures, in the three schemes the acceleration is computed from (and only from) the positions in that instant of time.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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