3 The virial average

While, as we noted in the introduction, time-averaging the force sum (1.2) from set $ J$ on set $ I$ is a logical way to reduce statistical fluctuations, the virial stress is based on an average that is diabolically more clever. Since it was assumed that the macroscopic stress has negligible variation over the stress plane $ \Delta x \Delta z$ , it will normally also have negligible variation over a similar linear extent in the $ y$ -direction. (Note that this might not always be desirable, for example near walls, (Todd et al. 1995), but we will assume it is.) We can therefore average over an infinitely dense set of equivalent planes $ AA'$ in a vertical region $ \Delta y$ , as sketched in figure 3.

Figure 3: Averaging in the $ y$ -direction.
\begin{figure}\begin{center}
\leavevmode
\epsffile{mplane.eps}
\end{center}\end{figure}

The mathematics of the averaging is simple. For a given pair of atoms $ i$ and $ j$ as shown, the relative fraction of planes that have $ i$ below and $ j$ above them is obviously $ \left(y^{(j)}-y^{(i)}\right)/\Delta y$ . Thus our sum of the forces through a single plane (1.2) becomes exactly the second term in the virial stress theorem (1.1). The factor 1/2 comes in since only pairs with $ y_j>y_i$ should be counted, and the virial theorem counts them all. (Because of Newton's third law, $ \vec f^{(ji)}=-\vec f^{(ij)}$ .)

Following Cormier et al. (2001), for pair $ i$ and $ j$ not both inside the volume, it is desirable to reduce the contribution of that pair by the fraction of their bond that is actually inside, since this gives a straight average of the stress of Irving & Kirkwood, (Irving & Kirkwood, 1950, Appendix).

The diabolical part of this averaging is that it makes undercounting cross-overs unavoidable: not all these planes can be away from nominal atom positions. Fortunately, the amount that needs to be added to fix things is simple. In an infinitesimal time interval $ \delta t$ , (that can be much smaller than even the microscopic time scales,) the relative fraction of planes crossed by an atom $ i$ is $ u_2^{(i)}
\delta t/\Delta y$ and the corresponding momentum that must be substracted (becoming added if $ u_2^{(i)}$ is negative) from these planes to correct for uncounted physical forces is an amount $ m_i \vec
u^{(i)}$ larger. This exactly produces the first term in the virial stress.

Thus the dynamical term in the virial stress becomes simply the proper sum of all the mechanical forces missed in the second term, and nothing more.