compute stress on the condition of fix press/berendsen and fix langevin

Hi LAMMPS users,

I used fix press/berendsen to control external pressure and fix langevin to control temperature, fix nve for time integration in my polymer network system. Before tensile test, four equilibration stage have been applied to relax the system. First, use fix langevin and fix nve at 600 K to relax system, second, make use of fix press/berendsen to keep external pressure 0, fix langevin and fix nve at 600K to relax the system again. Third, cooling the system to 300K in the same commands of the second stage. At last, I relaxed the system at 300K enough time until volume and density are both unchanged.

After equilibration stage, I used fix deform to change the box size in x direction to obtain tensile stress and strain, the external pressure set at 0 in y and z direction and the temperature kept at 300 K. The commands format are shown as follows:

fix 1 all nve

fix 2 all press/berendsen y 0.0 0.0 {pdamp} z 0.0 0.0 {pdamp}

fix 3 all langevin {T} {T} ${tdamp} 231569 scale 2 1.3182

fix 4 all deform 1 x erate 1e-4 units box remap v

thermo 1000

thermo_style custom step temp ke pe etotal epair ebond eangle lx ly lz vol pxx pyy pzz density

timestep ${dt}

Thermodynamic output at tensile stage:

Timestep pxx pyy pzz density

10000 -0.40152 -0.40152 0.01826 0.32429

20000 0.20781 0.20781 -0.09526 0.32341

30000 0.01763 0.01763 -0.17381 0.32268

40000 0.21611 0.21611 -0.05325 0.32176

50000 0.08923 0.08923 -0.19923 0.32102

But the either thermodynamic output pxx or the compute pressure commands output pxx are always both around 0. What was strange, the thermodynamic output value of pxx is the same as pyy. Someone can give me some suggestions to get the right stress? Thank you very much!

please always report the version of LAMMPS that you are using and provide a complete input deck suitable for testing independently.
your thermo output does not match the thermo_style command you quote, so the unexpected duplicated output could be due to your post-processing or some other mistake.

axel.

Thank you for your reply. The version of LAMMPS I used is 10 Aug 2015. In our system, there are two kind, 60 polymer chains in total was contained. After equilibration, we applied stretching in x direction to obtain stress-strain relationship. The complete input script was shown in follows, but I didnot get the right stress in pxx.

Best wish !

Thank you for your reply. The version of LAMMPS I used is 10 Aug 2015. In our system, there are two kind, 60 polymer chains in total was contained. After equilibration, we applied stretching in x direction to obtain stress-strain relationship. The complete input script was shown in follows, but I didnot get the right stress in pxx.

Best wish !

i cannot reproduce what you are claiming. when run your input (with the system replaced by the system from the melt input example, since i don’t have your data file).
when run with the 7 August 2019 release version of LAMMPS i have pxx != pyy.

most likely you are observing a bug, that has been fixed in the 4 years since your LAMMPS version was released.
i suggest you upgrade your LAMMPS version.

axel.

hello,
I would like to know how to decide the value of Tdamp and Pdamp for a system.Thanks in advance.

Please don’t “hijack” an existing thread to ask a new question. This is considered bad style. Rather start a new discussion thread with a new subject, that matches your questions.
Thanks, Axel.