# Regarding volume of a particular group of atoms

Dear all,
Thanks a lot for all quick replies you had made I am trying to find virial stresses in some region of a block by application of load by defining group of that particular region. For which i need to have volume of that particular group of atoms to calculate stresses from stress/atom quantity. How can i calculate volume of that group of atoms? Further, is there any other way to calculate virial stresses at particular point in a body?

How would you define the "volume" of a group of atoms?
What if it is irregular or has voids?
LAMMPS does not attempt to do this.

You can calculate the stress on any atom via compute stress/atom.
You can average that and get stress at arbitrary locations via
the ATC package.

Steve

Hi All,

Right now I’m looking at fix_nve.cpp I was able to find the main part that integrate the velocity . :

dtfm = dtf / mass[type[i]];
v[i] += dtfm * f[i];
v[i] += dtfm * f[i];
v[i] += dtfm * f[i];
x[i] += dtv * v[i];
x[i] += dtv * v[i];
x[i] += dtv * v[i];

…Blah … Blah … Blah, etc ,etc ,etc.

The remaining stuff would it be to Add the extra degree freedoom (the episolon value) evaluated at each time step to that bunch of code I copy pasted Above. How the hell i’m going to do it ? . I dont know ! , but A good idea came to my mind =) ! . I will add a new global variable at main.cpp to store the value of epsilon directly from fix_deform.cpp, and Add that global variable to fix_nve.cpp . Wish me good Luck and cross the fingers. If the variable epsilon is set to zero, and if FIX QRATE is Unativate , then it will remain the normal NVE formalism.
We already have the length functional form QRATE. I will try and Show you a simulation run using that profile and make a graph of lenght vs time steps.

Good luck to me
Oscar G.