[lammps-users] constrain motion along a line


I have a chain of atoms that I want to constain to move along a line. Obviously, using something to the effect of:
velocity atoms set 0 0 0 units box sum no
set constrain atoms force NULL 0 0

would usually work, however in this case, I am also using a langevin thermostat

compute temp_x chain temp/partial 1 0 0

fix tstat_relax chain langevin 0 300 10 634115
fix_modify tstat_relax temp temp_x

With this fix_modify, I’ve greatly reduced the motion in the perpendicular directions, but there is still motion nonetheless.

Any ideas?

Fix lineforce will constrain motion to a line. You can assign
compute temp partial to a thermostat like fix langevin, to
eliminate certain dimension - see the fix langevin doc
page for details.