[gmx-users] BUG in angular removal part??

Xiaohu Li xiaohuli914 at gmail.com
Wed Apr 27 17:58:23 CEST 2011


> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.gromacs.org/pipermail/gmx-users/attachments/20110427/e5919199/attachment-0001.html
>
> ------------------------------
>
> Message: 4
> Date: Wed, 27 Apr 2011 08:24:52 +0200
> From: David van der Spoel <spoel at xray.bmc.uu.se>
> Subject: Re: [gmx-users] BUG in angular removal part??
> To: Discussion list for GROMACS users <gmx-users at gromacs.org>
> Message-ID: <4DB7B6B4.5090503 at xray.bmc.uu.se>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 2011-04-26 19.38, Xiaohu Li wrote:
>   
>> 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
>>     
> I found the eqn. in Goldstein p 195. I guess this takes care of the 
> center of mass contribution. So if you center your system in the origin 
> at time zero the present code should still work. However, we really 
> should subtract the center of mass.
Mine certainly does not say the same thing. I'm using an older version of Goldstein by Addison-Wesley, 1950, seventh printing. Chapter 5, the third page, Eqn. 5-6 and 5-7. This does not match the code in gromacs.

>
>   
>> /
>>
>> /Xiaohu/
>> /
>>     
>
>
>   




More information about the gromacs.org_gmx-users mailing list