[gmx-users] a question about removing the rotation

David spoel at xray.bmc.uu.se
Fri Oct 17 22:05:01 CEST 2003


On Fri, 2003-10-17 at 21:40, Wei Zhang wrote:
> Dear David,
> 
> I read the code calculating the inertia momentum. I don't understand in a place.
> I think the inertia momentum should be calculated like:
> Ixx = sum( m(i)*(y(i)^2+z(i)^2 )
> Iyy = sum( m(i)*(z(i)^2+x(i)^2 )
> Izz = sum( m(i)*(x(i)^2+y(i)^2 )
> But in gromacs code, there is 
> 	/* Update inertia tensor */
> 	update_tensor(x[i],m0,vcm->group_i[g]);

Maybe the comment is not entirely up to date, but a bit further down we
do a matrix inversion (line 257) for the inertia tensor. I have also
tested the code, but please do some tests yourself to see whether it
works correct (in the comment it says it even works in parallel!)

-- 
David.
________________________________________________________________________
David van der Spoel, PhD, Assist. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,  	75124 Uppsala, Sweden
phone:	46 18 471 4205		fax: 46 18 511 755
spoel at xray.bmc.uu.se	spoel at gromacs.org   http://xray.bmc.uu.se/~spoel
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




More information about the gromacs.org_gmx-users mailing list