[lammps-users] problem with fixing atom in space

Dear Lammps users,

I’m trying to stretch a polymer molecule in LAMMPS. I would like to fix one end atom, but it didn’t work.

First I fixed the one end atom by following commands:

fix 0 bottom setforce 0.0 0.0 0.0
velocity bottom set 0.0 0.0 0.0

And then apply a force on the other end atom by:

fix 1 rightend addforce 0.0 0.0 800.0 every 1

Output the position of 2 end atoms by fix print:

fix writeX boundary print 1 “{posX0} {posY0} {posZ0} {posX} {posY} {posZ}” file position.txt screen no

I have tested it by running lmp_mpi on my personal computer with lammps/2020-10-29 for short time, and it did work. Then I run it (still with lmp_mpi) on a supercomputer with lammps/2015-08-10 to do a long run. However, the expected fixed atom moved. Could you please give any suggestions if you have ever known this problem before? I highly appreciate your time and help.

Thank you very much.

Best regards,
Yanxia
ETH Zurich

a) please don’t use the term “fix” in this context, since LAMMPS has the fix command, it invites misunderstandings. a better (and more accurate!) term would be “immobilize”.
b) nobody here will have much of an interest to sort out issues with a LAMMPS version that is many years old. if your input works correctly with the current stable version, then it would be a good idea (in fact, it is a good idea in any case) to install that same version on that supercomputer as well.
c) you are not providing sufficient information to properly reproduce or even debug the issue. there are other commands that can have an impact on the absolute position of an atom, e.g. fix npt.

axel.