astex
Class Fit

java.lang.Object
  extended by astex.Fit

public class Fit
extends java.lang.Object

Class for least squares fitting of sets of points.


Field Summary
static boolean debug
          Should we output debugging info.
 
Constructor Summary
Fit()
           
 
Method Summary
static double fit(double[] x, double[] y, double[] z, double[] xprime, double[] yprime, double[] zprime, int n, Matrix trans)
          Fit the pairs of coordinates using Kearsley's quaternion based algorithm.
static void fitMolecules(java.lang.String molname0, java.lang.String molname1, java.lang.String molname2)
           
static void main(java.lang.String[] args)
          Test harness.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug
Should we output debugging info.

Constructor Detail

Fit

public Fit()
Method Detail

fit

public static double fit(double[] x,
                         double[] y,
                         double[] z,
                         double[] xprime,
                         double[] yprime,
                         double[] zprime,
                         int n,
                         Matrix trans)
Fit the pairs of coordinates using Kearsley's quaternion based algorithm. Method returns the RMSD for the fitted point, and the 4x4 transformation matrix that will fit the coordinates together. The RMSD is generated directly from the size of the smallest eigenvector. This is nice as it saves you actually having to apply the transform to all the coordinates to calculate the RMSD. The method will fit xprime to x. The coordinates are left unchanged, the rotation matrix is appropriate for transforming the coordinates xprime onto x.


fitMolecules

public static void fitMolecules(java.lang.String molname0,
                                java.lang.String molname1,
                                java.lang.String molname2)

main

public static void main(java.lang.String[] args)
Test harness.