# [lammps-users] stress/atom and temp/com problem

Hi,

I am doing MDs for collision of two particles which have assigned velocities; let's say in the x- direction. Since I am doing NVE type calculation, the enhanced velocities increase the temperature so the pressure, stress etc (pxx,pyy) become very large. So I used temp/com command to subtract the mass velocities. Pxx (pressure) values decreased (in thermo_style result) which is good but pxx for per atom values which is based on the stress/atom command did not change which is still very high. In stress/atom calculation the kinetic energy term is based on the total velocity I guess which is not what I want. How can I subtract the mass velocity from this kinetic energy term. My output follows;

region flyer block -100.0 85.0 -2.0 85.16 -2.0 85.16 units box
group myflyer region flyer
region target block 90.0 500 -2.0 85.16 -2.0 85.16 units box
group mytarget region target
compute m1 myflyer temp/com
compute m2 mytarget temp/com
thermo_style custom step temp press etotal vol pxx pyy pzz pxy pyz pxz enthalpy pe ke
thermo_modify temp m1
thermo_modify temp m2

compute peratom all stress/atom
fix myperatom all ave/spatial 1 1 200 x lower 5 vx vy vz c_peratom[1] c_peratom[2] c_peratom[3] c_peratom[4] c_peratom[5] c_peratom[6] norm all file peratom_val.out
dump atom_vel all custom 500 velocity.out tag type x y z vx vy vz
dump stress_calc all custom 500 stress.out tag type x y z c_peratom[1] c_peratom[2] c_peratom[3] c_peratom[4] c_peratom[5] c_peratom[6]

Sincerely,

Bedri Arman
Artie McFerrin Dept. of Chemical Engineering
Texas A&M University
Off.979-845-1799
Per.979-422-7655.

Unlike compute pressure, compute stress/atom does not calculate the
kinetic term from a compute temperature. It does it directly as mv^2.
Hence there is no way for it to subtract off a bias, as in compute temp com.
You can drop the KE term completely from compute stress/atom if
you use its various keywords.

Steve