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 may be numerically integrated.
A widely used technique is Verlet's algorithm
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, - - and average the
quantity
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 - steps the
fluid will normally be well randomized in space, and the temperature
will be steady - though fluctuating slightly.