[lammps-users] Question about applying constant shear stress

Dear LAMMPS users,

The version I’m using is LAMMPS (7 Aug 2019).

I’m trying to apply a constant shear stress to my system.

According to a quote from Steve from an archive in 2008, I can simply apply periodic boundary conditions and use “fix npt” to control the shear stress. And LAMMPS will keep the system periodic.

“When ghost atoms are created for a tilted (triclinic)box, the shift factor is applied to coords of the ghost atoms, so the interactions don’t see the boundaries, just as if there were no tilt.”

However, I would like to try it this way:
1.add vacuum to my system to make it non-periodic along the z-direction
2.define the top and bottom layers

  1. fix 1 top addforce -2408 0.0 0.0

fix 2 bottom addforce 2408 0.0 0.0

fix 5 mobile npt temp 350 350 1000 x 0 0 10000 y 0 0 10000 z 0 0 10000 drag 0.0

run 10000

Nonetheless, the shape of the box didn’t change, and the stresses were close to 0.

If I didn’t make my question clear to you, please let me know and I will improve it.

Corresponding part of log.lammps is attached below:

You can use the velocity command to apply shear loading.

Thank you.

Hi Pinky,

Thanks for your suggestion. But I need to control the stress and I think applying velocity cannot do it, am I right?


I am not getting what you are asking. Are you following any paper?


You are welcome.