[gmx-developers] editconf -princ

Graham Smith smithgr at cancer.org.uk
Tue Jun 24 22:41:37 CEST 2003


Hi - 

I was just having a look at 3.1.5beta and I have a suggestion for a
minor change to editconf -princ. At the moment it calculates the mmt
of inertia tensor of the coordinates "as given": if the molecule is
not already at the origin this means that it does not have the
expected aligning effect. (-center 0 0 0 -princ does not work, because
-princ is done first). This has caught me out before.

Looking at the code of orient_princ() in princ.c, it appears the idea
_was_ to subtract the CM then add it again. (there's a suspicious call
to add_xcm that does nothing). You could add sthg like

 real    tm;
 rvec    xcm,mxcm,prcomp;
  tm=calc_xcm(x,isize,index,atoms->atom,xcm,FALSE) ;
  for(m=0; (m<DIM); m++)
    mxcm[m] = -xcm[m];
  add_xcm(x,natoms,NULL,mxcm);

before the call to principal_comp(). 

Though are there any times when what it does at the moment is what
you would want? (I can't think of any). In particular, orient_princ()
is also called by g_rms -what rhosc, and I can't comment on what
it's doing there (cos I don't know what rhosc fitting is meant to do). 

Cheers,

Graham

########################################################################

Dr. Graham R. Smith,
Biomolecular Modelling Laboratory,
Cancer Research UK,
44 Lincoln's Inn Fields,
London WC2A 3PX,
U.K.
Tel: +44-(0)20 7269 3348
email: graham.smith at cancer.org.uk
URL: http://www.bmm.icnet.uk/~smithgr






More information about the gromacs.org_gmx-developers mailing list