Next: Potential energy
Up: Running, measuring, analyzing
Previous: Looking at the atoms
Measuring quantities in molecular dynamics usually means performing
time averages of physical properties over the system
trajectory.
Physical properties are usually a function of the particle
coordinates and velocities.
So, for instance, one can define the instantaneous value of a generic
physical property A at time t:

and then obtain its average

where t is an index which runs over the time steps from
1 to the total number of steps NT.
There are two equivalent ways to do this in practice:
- 1.
- A(t) is calculated at each time step by the MD program
while running. The sum
is also updated at each step.
At the end of the run the average is immediately obtained by
dividing by the number of steps.
This is the preferred method when the quantity is simple to
compute and/or particularly important. An example is the
system temperature.
- 2.
- Positions (and possibly velocities) are periodically dumped
in a ``trajectory file'' while the program is running.
A separate program, running after the simulation program,
processes the trajectory and computes the desired quantities.
This approach can be very demanding in terms of disk space:
dumping positions and velocities using 64-bit precision takes
48 bytes per step and per particle.
However, it is often used when the quantities to compute are
complex, or combine different times as in dynamical correlations,
or when they are dependent on other additional parameters that may
be unknown when the MD program is run.
In these cases, the simulation is run once, but the resulting
trajectory can be processed over and over.
The most commonly measured physical properties are discussed
in the following.
Next: Potential energy
Up: Running, measuring, analyzing
Previous: Looking at the atoms
Furio Ercolessi
9/10/1997