[gmx-users] BUG in angular removal part??
Xiaohu Li
xiaohuli914 at gmail.com
Tue Apr 26 19:38:05 CEST 2011
Hi, gromacs developers,
It seems that there is a bug regarding the angular moment removal.
This may not be very important for many users since most of them are
doing PBC where it is irrelevant, but if you are doing cluster or if you
really care the angular momentum like I
do(I want the angular momentum to be exactly zero since this corresponds
to some quantum resolved state), then it is important.
The angular momentum removal part in mdlib/vcm.c where it evaluate
moment of inertia is wrong, subroutine *update_tensor.
*Specifically, the diagonal part is not calculated right.
According to either */Classical Mechancs, by Goldstein or Theoretical
Mechanics of Particles and Continua, by A.L.Fetter and J.D.Walecka.
I_{xx}=\sum_{i} m_{i}*(r_{i}^2-x_{i}^2), where x can be x,y,z.
But the /**update_tensor gives
**/I_{xx}=\sum_{i} m_{i}*(x_{i}^2).
/*/I initially thought there could be some other routine to
correct update_tensor, but apparently, it is calculated according to
that, and I manually calculated them and turns out my theory is right,
the update_tensor is wrong as it stands.
/Again, this would not affect, say, 99.999% of the user, but it
will always be good to have a clean code.
Thanks
/
/Xiaohu/
/
More information about the gromacs.org_gmx-users
mailing list