Question regarding extracting the pressure from the compute/stress atom command

Dear Sir,

I’ve been running LAMMPS with a bilayer/bulk water simulation following the SDK (Shinoda-Devane-Klein) model, and I’ve been tinkering around with the compute stress command:

http://lammps.sandia.gov/doc/compute_stress_atom.html

and combine it with the chunk/atom command to try and map the stress components on the bilayer, both in a 1-dimensional plot along the X, Y, and Z plot and a gridmap type to show the stress along the whole bilayer. The whole point of the exercise is that I have a phase separated bilayer, and by plotting the 2D gridplot of the stress map, I can estimate the line tension near the domain interfaces.

I’ve written the command as follows:

compute S polymer chunk/atom bin/1d z center 1.0 units box
compute X polymer chunk/atom bin/1d x center 1.0 units box
compute Y polymer chunk/atom bin/1d y center 1.0 units box
compute Z polymer chunk/atom bin/1d z center 1.0 units box
compute XY polymer chunk/atom bin/2d x center 1.0 y center 1.0 units box

Grid and density stress calculation

compute LIP polymer chunk/atom bin/1d z center 1.0 units box
fix stress_outx polymer ave/chunk 1000 100 100000 X c_stressnew[1] c_stressnew[2] c_stressnew[3] c_stressnew[4] c_stressnew[5] c_stressnew[6]
file stressx.mixed
fix stress_outy polymer ave/chunk 1000 100 100000 Y c_stressnew[1] c_stressnew[2] c_stressnew[3] c_stressnew[4] c_stressnew[5] c_stressnew[6]
file stressy.mixed
fix stress_outz polymer ave/chunk 1000 100 100000 Z c_stressnew[1] c_stressnew[2] c_stressnew[3] c_stressnew[4] c_stressnew[5] c_stressnew[6]
file stressz.mixed
fix stress_outxy polymer ave/chunk 1000 100 100000 XY c_stressnew[1] c_stressnew[2] c_stressnew[3] c_stressnew[4] c_stressnew[5] c_stressnew[6
] file stressxy.mixed

The group ‘polymer’ simply groups the lipid component of the group. so every averaged value of the stress component would be averaged from 100 instances of calculations from and counting it times before averaging.

My question is regarding the interpretation of the stress from the compute stress itself. It says:

“Note that as defined in the formula, per-atom stress is the negative of the per-atom pressure tensor. It is also really a stressvolume formulation, meaning the computed quantity is in units of pressurevolume.”

So the values I would get from that I would be assuming would be pressure * volume, meaning that I would have to do the dividing by volume to get the pressure units that would be appropriate for the simulation.

My question is, when I divide the pressure*volume via the volume in the polymer group I specified above, do I have to divide it by the volume of the entire system, or would I simply have to compute the volume of the polymer group? Since the interpretation says each atom in a group, I presume I would just have to follow the latter interpretation.

Any hints or tips would be appreciated.

Thanks

Sang

1 Like

As the compute stress/atom doc page explains, you would
divide the sum of the stress/atom by the volume of
the entire system (simulation box). That should give
the same answer as the global pressure. So if you
are chunking it into pieces and only using a partial
group, you will need to decided on partial volumes
within each chunk. How to do that is up to you.

Steve

1 Like