regional pressure

Hi Michelle,

Based on the fact that you have a fixed group:

variable new_volume equal vol-C

Where C is the constant volume of the fixed group (which you already have).

Otherwise you can directly compute your new pressure press2 by scaling the old pressure press1 from the following relation:

press2vol2=press1vol1

Where vol2=vol1-C, vol1 is the system’s volume “vol”, and press1 is the original pressure “press”.

Though I feel maybe I missed here something?

Eyal

Pressure or stress is a per unit volume intensive property that really only makes sense as a continuum concept: Pxx = 1/Ayz*(dE/dLx). If you have a space-filling periodic system, then volume is clearly defined and there is no issue. You can also divide a large volume into space-filling subvolumes like slabs or cubelets and get reasonable values for the stress in each subvolume, as long as the subvolumes are not too small. However, if you have a truly finite system, the formal definition of pressure is now somewhat arbitrary. In a nanowire with fixed ends, both Lx and Ayz can not be precisely defined. Nonetheless, the physical concept of dE/dLx is still useful, both for the overall nanowire and also segments of it. If you run an MD simulation of a nanowire as you describe with the nanowire filling most of an orthorhombic nonperiodic cell, then the value of the thermo variable pxx should be similar to, but slightly smaller in magnitude than, the value obtained by summing up the per-atom stress of the mobile atoms and dividing by an estimated* value of V=Ayz*Lx. For the purposes of a scientific study, I think either definition would be reasonable choice, unless they differ by a lot. It is important to recognize that even though you use fix setforce, the forces on the boundary atoms calculated by the pair_style will still contribute to the value of the thermo variable pxx. neigh_modify exclude can help with this.

Aidan

*I suspect your original question was “can LAMMPS esimate Ayz and Lx for me?” Not very easily. You could try using some tricks like tracking the positions of “corner” atoms, but I don’t think that is very robust. A better strategy would be to average the positions of all the atoms in each initial face of the surface, using compute reduce. Also useful is generating density profiles to track the location of boundaries using fix ave/chunk.