How to convert virial stresses to SI units (which volume has to be considered)?


I am using the last version of LAMMPS for simulations of a sample with an edge crack. I fix the bottom part of the sample and pull the top, by using the "velocity" command. In the middle region I apply the velocity with a "ramp" style, as suggested in the example of LAMMPS for the crack problem. In my case the boundary are fixed (f f f) and the box size is larger than the sample size.
I am wondering how the stresses are calculated. In my script I have used 'compute stress/atom' to calculate the local stress on each atom and then the compute reduce sum' to get the value of the stress on the entire sample. I know that LAMMPS outputs the stresses as "pressure*volume". Which volume shall I use calculate the stresses (in the SI units, i.e. MPa) in both cases?
I was using the volume of the sample (for the 'compute reduce sum' command) and the atom volume=(sample volume)/(nĀ°atoms) for the 'compute stress/atom' command, but I have got really high results.


The compute stress/atom doc page describes how
to get the same answer by summing per-atom stress
as for the global pressure. In both cases the volume
is the simulation box volume. If you want something
more locallized, you'll have to decide what an appropriate
per-atom "volume" is.