Is there any way to calculate the principal moment of inertia of some molecule in LAMMPS? I am trying to calculate it for many molecule to see how they orient to each other.I am working atomistically.
Thanks a lot,
Just added a compute inertia/molecule command (1Dec patch).
You can try it out. It calculates the 6 components of the inertia
tensor, not the principal moments. The latter would have
to be added as an option to diagonalize the tensor for each molecule.
I just wanted to point out that there may be a bug in the file “compute_inertia_molecule.cpp”.
Lines 159-161 read:
dx = unwrap - com[imol];
dy = unwrap - com[imol];
dz = unwrap - com[imol];
They should read:
dx = unwrap - comall[imol];
dy = unwrap - comall[imol];
dz = unwrap - comall[imol];
yes, you’re right - I’ll post a patch when I’m
back in the office (next week).