next up previous

4.2 Continuous Potentials

For continously varying pair potentials we have for a particle $i$ at any time $t$

\ddot{\mbox{$\bf r$}}_{i}(t)=\frac{1}{m}\sum_{j\neq i}\mbox{...
...ith} \;\;\;\;
\mbox{$\bf K$}_{ij}\equiv -\nabla_{i} u(r_{ij})

Considering the Lennard-Jones interaction, we find for the pair force

\mbox{$\bf K$}_{ij}=-24 \frac{\epsilon}{\sigma^{2}}
\left[ 2...
...t(\frac{r_{ij}}{\sigma}\right)^{-8}\right] \mbox{$\bf r$}_{ij}

where $\mbox{$\bf r$}_{ij} \equiv \mbox{$\bf r$}_{j}-\mbox{$\bf r$}_{i}$.

The above-mentioned nearest image convention (NIC) is used in the evaluation of the force acting on a particle.

Having determined this total force, the equation of motion for particle $i$ may be numerically integrated. A widely used technique is Verlet's algorithm

\mbox{$\bf r$}_{i}(t_{n+1})= 2\mbox{$\bf r$}_{i}(t_{n})-\mbox{$\bf r$}_{i}(t_{n-1})
+\mbox{$\bf b$}_{i}(t_{n})(\Delta t)^{2}

(with $\mbox{$\bf b$}_{i}\equiv \sum_{j\neq i}\mbox{$\bf K$}_{ij}/m$).

PROJECT MD (LENNARD-JONES): Augment the subroutine module ENERGY such that it computes, for each Lennard-Jones particle $i$ in the system, the total force exerted on it by all other particles $j$: $\mbox{$\bf K$}_{i} \equiv \sum_{j \neq i} \mbox{$\bf K$}_{ij}$, with $\mbox{$\bf K$}_{ij}$ as given above; remember to apply the nearest image convention.

Write a subroutine MOVE to integrate the equations of motion by a suitable algorithm such as Verlet's. Having advanced each particle for one time step, do not forget to apply periodic boundary conditions to retain them all in the simulation box.

Write a main routine that puts the subroutines STARTCONF, ENERGY and MOVE to work. Test your first MD code by monitoring the mechanically conserved quantities.

Do a number of MD steps - say, $50$-$100$ - and average the quantity $\vert\mbox{$\bf v$}^{*}\vert^{2}$ to estimate the actual temperature. To adjust the temperature to a desired value, scale all velocity components of all particles in a suitable way. Repeat this procedure up to 10 times. After $500$-$100$ steps the fluid will normally be well randomized in space, and the temperature will be steady - though fluctuating slightly.

next up previous
F. J. Vesely / University of Vienna