How to restrict movements to certain directions?

Hi,

I want to restrict the movement of the molecules in my simulation to along only z and y directions. That is, I don’t want them to change their coordinates along the x direction.

Any one knows how I can do this in lammps?
Thank you.
X

Hi,

I want to restrict the movement of the molecules in my simulation to along
only z and y directions. That is, I don't want them to change their
coordinates along the x direction.

restrict or completely disable?
for each atom individually or for the molecule as a whole (i.e. the c.o.m.)?

> Hi,
>
> I want to restrict the movement of the molecules in my simulation to
along
> only z and y directions. That is, I don't want them to change their
> coordinates along the x direction.

restrict or completely disable?
for each atom individually or for the molecule as a whole (i.e. the
c.o.m.)?

In this case, the molecule as whole. fix spring ?

> Hi,
>
> I want to restrict the movement of the molecules in my simulation to
> along
> only z and y directions. That is, I don't want them to change their
> coordinates along the x direction.

restrict or completely disable?
for each atom individually or for the molecule as a whole (i.e. the
c.o.m.)?

In this case, the molecule as whole. fix spring ?

for a single or a small number of molecules, yes. define a group for
each molecule and attach one fix spring in tether mode to the desired
location.
for many molecules, there would be fix spring/chunk, but that needs
some programming to apply the spring force to selected directions
only.

axel.

There is also the fix planeforce (or lineforce) command which

is more commonly used for atoms, but could

be used for molecules. E.g. constrain the

O atoms in H2O to a plane.

Steve

1 Like