private void calcRmsd ( Point3d [ ] x , Point3d [ ] y ) { if ( centered ) { innerProduct ( y , x ) ; } else { // translate to origin xref = CalcPoint . clonePoint3dArray ( x ) ; xtrans = CalcPoint . centroid ( xref ) ; logger . debug ( "x centroid: " + xtrans ) ; xtrans . negate ( ) ; CalcPoint . translate ( new Vector3d ( xtrans ) , xref ) ; yref = CalcPoint . clonePoint3dArray ( y ) ; ytrans = CalcPoint . centroid ( yref ) ; logger . debug ( "y centroid: " + ytrans ) ; ytrans . negate ( ) ; CalcPoint . translate ( new Vector3d ( ytrans ) , yref ) ; innerProduct ( yref , xref ) ; } calcRmsd ( wsum ) ; }
Calculates the RMSD value for superposition of y onto x . This requires the coordinates to be precentered .