Fix rigid issues

Dear developers,

I've been implementing a project using the "fix rigid" and "fix rigid/small" commands lately, and I'd like to flag up some issues/comments that I've stumbled across in the process:

1. The rotational thermostatting in fix rigid langevin and fix rigid/small langevin is off by the factor of 10/3 that was corrected earlier in the context of fix langevin (https://sourceforge.net/p/lammps/mailman/message/30188268/), meaning that a spherical or near-spherical particle will have a rotational diffusion which is about a factor of 3 too high. For consistency, I think it'd be good to have the same convention here as in fix langevin.

2. It appears that the "fix rigid/small" command misbehaves when used in 2 dimensions - the molecules move out of the box in the z direction even though enforce_2d is invoked. Since I only used 2d for initial testing, I didn't look in to the reasons behind this behaviour, but it might be worth adding a warning to the manual and/or the code. This is not an issue in the "regular" fix/rigid.

3. It seems the issue with the inertial tensor not being converted from the particle to the lab frame that was discovered and previously raised by Chris Brackley (https://sourceforge.net/p/lammps/mailman/message/31214552/) is still present. This means that rotational thermostatting is fine for spherical or near-spherical particles (where all principal moments of inertia are identical), but will be off by a lot for, say, rods.

Thank you!

Kind regards,

Joakim Stenhammar

Dear developers,

I’ve been implementing a project using the “fix rigid” and “fix
rigid/small” commands lately, and I’d like to flag up some
issues/comments that I’ve stumbled across in the process:

​please report these, ideally with example input decks to illustrate/reproduce the unexpected behavior​, as issues in the LAMMPS project issue tracker on github: https://github.com/lammps/lammps/issues
​thanks,
axel.​