# Molecular Dynamics and Monte Carlo

### Molecular Dynamics

From the molecular positions, the forces acting on each molecule are calculated; these are used to advance the positions and velocities through a small timestep, and then the procedure is repeated. Principal features:

- Solution of Newton's equations of motion by a step-by-step algorithm.
- Simulation times from picoseconds to nanoseconds.
- The method provides thermodynamic, structural and dynamic properties.

### Monte Carlo

At each stage, a random move of a molecule is attempted; random numbers are used to decide whether or not to accept the move, and the decision depends on how favourable the energy change would be. Then the procedure is repeated. Principal features:

- Sampling configurations from a statistical ensemble by a random walk algorithm.
- No true analogue of time.
- Possible to devise special sampling methods.
- Provides thermodynamic and structural properties.

Both methods employ system sizes from a few hundred to a few million molecules.

A common feature is the use of periodic boundary conditions. The molecules are contained within a basic simulation cube. When a molecule leaves one side of the cube, its image enters from the opposite side. This removes any influence of the walls on the system. Other shapes than the simple cube are possible.