[lammps-users] How to constrain the rotation of a model?

Dear users,
I only want to constrain the rotation (e.g., rotates around the x-axis) of a model, and the model is free to move in other directions. But I can’t find the right command to constrain the rotation. I have tried the commands, such as fix momentum angular, but they do not work well. I would like to know if there are other suitable commands.
Best.

I would look into the collective variable packages, USER-COLVARS or USER-PLUMED.
they should have the option to do a harmonic restraint on the orientation of a group of atoms.
Please note that both packages have their own extensive documentation and home page and the documentation in the LAMMPS manual mostly describes how to enable the respective fix.

Axel.

Hi Voidshatter, I just wanted to add a pointer, unless you’ve tried looking at the doc on your own already. if the group of atoms has a quasi-rigid structure (as a rule of thumb, its RMSD over time is much smaller than its radius of gyration) the type of variable you’d like to restrain is a “tilt” variable:
https://colvars.github.io/colvars-refman-lammps/colvars-refman-lammps.html#sec:cvc_tilt

Using a pre-aligned set of reference coordinates together with “axis (1, 0, 0)” and applying e.g. a harmonic restraint such that the variable remains close to 1 will effectively prevent the group of atoms from rotating around the Y or Z axes, while still be free to rotate around the X axis.

If you are not familiar with the package as a whole, look at the beginning and follow the links therein:
https://colvars.github.io/colvars-refman-lammps/colvars-refman-lammps.html

Giacomo