next up previous contents
Next: Potential energy Up: Running, measuring, analyzing Previous: Looking at the atoms

Simple statistical quantities to measure

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:

\begin{displaymath}
A(t) = f\left( {\bf r}_1(t) , \ldots , {\bf r}_N(t) ,
 {\bf v}_1(t) , \ldots , {\bf v}_N(t) \right) \end{displaymath}

and then obtain its average

\begin{displaymath}
\langle A \rangle = \frac{1}{N_T} \sum_{t=1}^{N_T} A(t) \end{displaymath}

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 $\sum_t A(t)$ 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 up previous contents
Next: Potential energy Up: Running, measuring, analyzing Previous: Looking at the atoms
Furio Ercolessi
9/10/1997