I took a look at the paper you are referring to by Zimmerman. For a solid at 2 K (almost absolute zero), the atoms are arranged on a lattice and probably don’t move around much, so it might be possible to compute an effective atomic volume more easily that for a liquid.

It is possible to compute a local (position-dependent) pressure profile, though it’s not trivial. See [Heinz, H., Mol. Sim. 33, 747 (2007)]. For example, simulations of a liquid-vapor interface commonly use position-dependent versions of the pressure tensor to obtain the surface tension at the interface. For a planar interface, this is accomplished by using a finite number of slabs (i.e. bins). Local atomic stresses are averaged using the slabs, and these quantities are then divided by the volume of the slab (which is well defined) to obtain the pressure. See page 472 of [D. Frenkel and B. Smit, Understanding molecular simulation: from algorithms to applications (Academic Press, San Diego, 2002)].

However, the local (position-dependent) pressure tensor also has a well-known ambiguity. One must decide how to spatially distribute the pressure from an interacting pair of atoms. This leads to the choice of Irving-Kirkwood vs Harasima definitions. For example see [J. Sonne, F. Y. Hansen, and G. H. Peters, J. Chem. Phys. 122 (2005)]. In LAMMPS, one can easily compute the Harasima version of the local pressure tensor using the compute stess/atom and the ave/spatial commands, though there are some indications that the Irving-Kirkwood contour should be used instead. Supposedly, one can calculate the IK version in LAMMPS using the fix atc and the hardy command, though I’ve never used this before.

Since I’ve been mentioned, let me add my own $0.02 to the discussion. According to the LAMMPS manual, the stress/atom compute does indeed calculate a per-atom tensor that is the product of Cauchy stress and some measure of local volume, I.e. a quantity of units of stress*volume. Thus, Srikanth’s assertion that one needs to divide by a measure of local volume in order to get a measure of stress is correct. However, that’s not easily done. I have a few suggestions:

A very coarse method would be to take the deformed LAMMPS system volume and divide it by the number of atoms to calculate a per-atom volume. This approach is effective if your material density is mostly uniform in the volume and you can use LAMMPS to accurate compute this volume through wise use of the shrink-wrapped and periodic boundary conditions. This approach is probably okay for situations such as nanowire tension/compression, assuming the LAMMPS volume conforms to the nanowire’s dimensions and no necking/thinning occurs. As you would think, this approach becomes invalid just when things start getting interesting.

One alternative I’ve used in the past is to attribute a reference volume to each atom based on the lattice type and parameter, and then transform this to a “current” or “deformed” volume per atom by calculating an atomic-scale deformation gradient. The deformed volume is product of the determinant of this deformation gradient tensor and the reference atomic volume. I discuss how to compute this gradient in my IJSS paper with Bammann and Gao. It cannot be done within LAMMPS as of yet (although I know some folks are working on it), but is a simple enough post-processing calculation. Of course, this method is problematic when it comes to fluid simulations.

As Stan mentions, the atc (atom-to-continuum) fix calculates a local (but not atomic) measure of stress using the Hardy formulation. This method includes its own measure of local volume and produces a quantity in the units of stress. It’s also valid for both solid and fluid systems. Please read the LAMMPS manual on how to compile and use this package.

@Stan: Thanks for the references. I will definitely try the fix atc utility in LAMMPS.

@Dr. Zimmerman: I definitely have a better picture of what is going on after reading your response, thank you. I just have a few comments: Am I right in thinking that your first approach wouldn’t work well for atoms near defects like dislocations? I really like the second approach you mentioned. But again, I think the situation can get complicated if the reference (or current) system has surfaces, edges and defects. I will definitely look into the fix atc utility using Hardy’s approach.

Certainly I agree that approach 2 is probably more accurate than approach 1 for atoms near a dislocation core. Even then, trying to define an appropriate-size volume for such atoms may be problematic. If you’re interested in such scenarios, you should read the paper by Webb, myself and Seel (Mathematica and Mechanics of Solids, v 13, pp. 221-266, 2008) in which we use Hardy’s approach to examine the stress field around a dislocation. There have also been numerous papers by others who use both the Hardy approach (or ones like it) and the atomic-stress approach to analyze defects like crack-tips.