[gmx-users] com calculation

David spoel at xray.bmc.uu.se
Wed Mar 19 08:15:09 CET 2003


On Wed, 2003-03-19 at 09:02, Christoph Freudenberger wrote:
> Hi there,
> 
> As I posted in the users list a couple of days before, I wanted
> to write an extension to the g_rdf code to calculate the spatial
> distrubtion function.
> I've posted some questions to the developers list, because
> I consindered them to specific for this list.
> Unfortunatly nobody answered... :-(
> 
> Anyway, I worked around most of the problems myself already
> but I am still somewhat unsure about the calculation of the
> com of a group in g_rdf:
> 
>       if (bCM) {
>         /* calculate centre of mass */
>         clear_rvec(xcom);
>         for(i=0; (i < isize_cm); i++) {
>           ix = index_cm[i];
>           rvec_inc(xcom,x[ix]);
>         }
> This first loop seems to sum up the position vectors of all
> atoms in the com group into the vector xcom.
>         /* store it in the first 'group' */
>         for(j=0; (j<DIM); j++)
>           x[index[0][0]][j] = xcom[j] / isize_cm;
>       }
> Then xcom/isize_cm is written to the x-array but why isn't
> there any weighting by the masses of the atoms?
> Or did I miss that somewhere?
It's more like a centre of geomtery then...

Anyway, what's the meaning of all this? In my opinion neither are
meaningful quantities... 



> 
> regards
> -- 
> Christoph Freudenberger
> Abt. Organische Chemie I AK Siehl - Uni Ulm -Tel: ++49-731-502-2785
> 
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-developers-request at gromacs.org.
> 
> 
> -- 
> Christoph Freudenberger
> Abt. Organische Chemie I AK Siehl - Uni Ulm -Tel: ++49-731-502-2785
> 
> _______________________________________________
> gmx-users mailing list
> gmx-users at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-users
> Please don't post (un)subscribe requests to the list. Use the 
> www interface or send it to gmx-users-request at gromacs.org.
-- 
Groeten, David.
________________________________________________________________________
Dr. David van der Spoel, 	Dept. of Cell and Molecular Biology
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