RdcPanda
Class PdbRdc

java.lang.Object
  extended by RdcPanda.PdbRdc

public class PdbRdc
extends java.lang.Object

This class provides various SVD methods for best fitting RDCs and a structural fragment, and grid search method for computing the three Euler angles. Written by Lincong Wang (2001-2005)


Constructor Summary
PdbRdc()
          Instantiates a new pdb rdc.
PdbRdc(Pdb pp, double rdc)
          Instantiates a new pdb rdc.
 
Method Summary
 double BackCal(java.util.Vector<Pdb> pdbVec, java.util.Vector<Dipolar> rdcVec, java.lang.String atom1, java.lang.String atom2, Matrix mm, double Sxx, double Syy, double Szz, double rdcRatio, double[] rdcBc)
          For back-computing RDCs.
 double BackCal(java.util.Vector<Pdb> pdbVec, java.util.Vector<Dipolar> rdcVec, java.lang.String atom1, java.lang.String atom2, Matrix mm, double Sxx, double Syy, double Szz, double rdcRatio, double[] rdcBc, double[] squareRmsd, int[] size)
          For back-computing RDCs.
 double BackCalCACO(java.util.Vector<Pdb> pdbVec, java.util.Vector<Dipolar> rdcVec, java.lang.String atom1, java.lang.String atom2, Matrix mm, double Sxx, double Syy, double Szz, double rdcRatio, double[] rdcBc, double[] squareRmsd, int[] size, boolean isPrint)
          For back-computing RDCs.
 double BackCalCACOOnePdb(java.util.Vector<Pdb> pdbVec, java.util.Vector<Dipolar> rdcVec, java.lang.String atom1, java.lang.String atom2, Matrix mm, double Sxx, double Syy, double Szz, double rdcRatio)
          compute rdc rmsd for only one pdb.
 double BackCalCON(java.util.Vector<Pdb> pdbVec, java.util.Vector<Dipolar> rdcVec, java.lang.String atom1, java.lang.String atom2, Matrix mm, double Sxx, double Syy, double Szz, double rdcRatio, double[] rdcBc, double[] squareRmsd, int[] size, boolean isPrint)
          For back-computing RDCs from Co at residue i to N at residue i+1.
 double BackCalCONOnePdb(java.util.Vector<Pdb> pdbVec, java.util.Vector<Dipolar> rdcVec, java.lang.String atom1, java.lang.String atom2, Matrix mm, double Sxx, double Syy, double Szz, double rdcRatio)
          compute rdc rmsd for only one pdb from Co at residue i to N at residue i+1.
 double BackCalNH(java.util.Vector<Pdb> pdbVec, java.util.Vector<Dipolar> rdcVec, java.lang.String atom1, java.lang.String atom2, Matrix mm, double Sxx, double Syy, double Szz, double rdcRatio, double[] rdcBc)
          For back-computing NH RDCs since the NH RDC of the fiest residue is NOT used in the DFS-based refinement.
 double BackCalNH(java.util.Vector<Pdb> pdbVec, java.util.Vector<Dipolar> rdcVec, java.lang.String atom1, java.lang.String atom2, Matrix mm, double Sxx, double Syy, double Szz, double rdcRatio, double[] rdcBc, double[] squareRmsd, int[] size)
          For back-computing NH RDCs since the NH RDC of the fiest residue is NOT used in the DFS-based refinement.
 double BackCalNHOne(java.util.Vector<Pdb> pdbVec, java.util.Vector<Dipolar> rdcVec, java.lang.String atom1, java.lang.String atom2, Matrix mm, double Sxx, double Syy, double Szz, double rdcRatio, double[] rdcBc, double[] squareRmsd, int[] size)
          compute the RDC deviation for one residue.
 double BackCalOne(java.util.Vector<Pdb> pdbVec, java.util.Vector<Dipolar> rdcVec, java.lang.String atom1, java.lang.String atom2, Matrix mm, double Sxx, double Syy, double Szz, double rdcRatio, double[] rdcBc, double[] squareRmsd, int[] size)
          compute rdc deviation for one residue For back-computing RDCs.
 double BackCalOnePdb(java.util.Vector<Pdb> pdbVec, java.util.Vector<Dipolar> rdcVec, java.lang.String atom1, java.lang.String atom2, Matrix mm, double Sxx, double Syy, double Szz, double rdcRatio)
          compute rdc rmsd for only one pdb.
 double[] BackCalRdcs(java.util.Vector pdbVec, java.util.Vector rdcVec, java.lang.String atom1, java.lang.String atom2, Matrix mm, double Sxx, double Syy, double Szz)
          For back-computing RDCs.
 Matrix bestFit(java.util.Vector<Pdb> pdbVec, java.util.Vector nhRdc, java.util.Vector<Dipolar> cahaRdc, double[] rdc1Cal, double[] rdc2Cal, double[] eigenValues)
          Best fit Two sets of RDC data from one medium such as NH and CH please note that the rotation matrix returned by the eigenValueDecomposition method is rather arbitrary so we need to make sure that only the righ handedone are returned.
 boolean bestFit(java.util.Vector pdbVec, java.util.Vector rdcVec, java.lang.String atom1, java.lang.String atom2, double[] rmsdArr, boolean printResults)
          Computing the Saupe matrix by SVD method and then diagonalizing it for computing the diagonalized elements and rotation matrix to one of POF.
 boolean bestFit(java.util.Vector pdbVec, java.util.Vector rdcVec, java.lang.String atom1, java.lang.String atom2, double[] rmsdArr, double[] rdcArrN, boolean printResults)
          Computing the Saupe matrix by SVD method and then diagonalizing it for computing the diagonalized elements and rotation matrix to one of POF.
 Matrix bestFit4RDCs(java.util.Vector pdbVec, java.util.Vector nhRdc, java.util.Vector cahaRdc, java.util.Vector cacoRdc, java.util.Vector conRdc, double[] rdc1Cal, double[] rdc2Cal, double[] eigenValues)
          Best fit Two sets of RDC data from one medium such as NH and CH please note that the rotation matrix returned by the eigenValueDecomposition method is rather arbitrary so we need to make sure only the righ handedone are returned.
 double[] dirCos(double[] vec)
          cal the directioal cosines of the vector vec.
 double[][] equGenerate(java.util.Vector pdbVec, java.util.Vector rdcVec, java.lang.String atom1, java.lang.String atom2, double rdcRatio)
          A method to generate an equation consisting all the different internuclear vectors whose RDC are measured.
 Matrix eulerFit_old(java.util.Vector pdbVec, java.util.Vector rdcVec1, java.util.Vector rdcVec2, double Syy, double Szz, double[] rmsds, double resolution, boolean debug)
          Compute three Euler angles using two sets of RDC data and the corresponding Saupe elements Basic steps: extract the NH vectors with the corresponding RDC data as an array (for efficiency) For all the values of three Euler angles first compute the new NH directions after the rotation then compute the RDCs and RMSD from the new NH directions.
 Matrix eulerFit(java.util.Vector<Pdb> pdbVec, java.util.Vector<Dipolar> rdcVec1, java.util.Vector<Dipolar> rdcVec2, double Syy, double Szz, double[] rmsds, double resolution, boolean debug)
          Note: Lincong's has a serious bug.
 Matrix eulerFit4RDCs(java.util.Vector<Pdb> pdbVec, java.util.Vector<Dipolar> rdcVec1, java.util.Vector<Dipolar> rdcVec2, java.util.Vector<Dipolar> rdcVecCaCo, java.util.Vector<Dipolar> rdcVecCoN, double Syy, double Szz, double[] rmsds, double resolution, boolean debug)
          Note: Lincong's has a serious bug.
 Matrix eulerFitHB(java.util.Vector pdbVec, java.util.Vector rdcVec1, java.util.Vector rdcVec2, double[] saupe, Matrix rot, double[] rmsds, double resolution, double weight4HB, java.util.Vector pdbVecS1, java.util.Vector hbVec, Matrix mat4Dirs, boolean debug)
          Compute three Euler angles using two sets of RDC data and the corresponding Saupe elements Basic steps: extract the NH vectors with the corresponding RDC data as an array (for efficiency) For all the values of three Euler angles first compute the new NH directions after the rotation then compute the RDCs and RMSD from the new NH directions.
 Matrix eulerFitPrintEnsemble(java.util.Vector<Pdb> pdbVec, java.util.Vector<Dipolar> rdcVec1, java.util.Vector<Dipolar> rdcVec2, double Syy, double Szz, double[] rmsds, double resolution, boolean debug, double RdcRmsdThreshold)
          print out all pdb orientations in which rdc rmsd is smaler than some threshold, in grid search.
 Matrix fit4MissingRdc(java.util.Vector pdbVec, java.util.Vector rdcVec1, java.util.Vector rdcVec2, double Syy, double Szz, double[] rmsds, double resolution, boolean debug)
          Compute three Euler angles using two sets of RDC data (pissbile missing) and the corresponding Saupe elements Basic steps: extract the NH vectors with the corresponding RDC data as an array (for efficiency) For all the values of three Euler angles first compute the new NH directions after the rotation then compute the RDCs and RMSD from the new NH directions.
 Matrix fit4MissingRdcHB(java.util.Vector pdbVec, java.util.Vector rdcVec1, java.util.Vector rdcVec2, double Syy, double Szz, java.util.Vector pdbVecA, double[] rmsds, double resolution, double weight4HB, java.util.Vector hbVec, boolean debug)
          Compute three Euler angles using two sets of RDC data (pissbile missing) and the corresponding Saupe elements Basic steps: extract the NH vectors with the corresponding RDC data as an array (for efficiency) For all the values of three Euler angles first compute the new NH directions after the rotation then compute the RDCs and RMSD from the new NH directions.
 Matrix fit4MissingRdcHB2(java.util.Vector pdbVec, java.util.Vector rdcVec1, java.util.Vector rdcVec2, double Syy, double Szz, java.util.Vector pdbVecA1, java.util.Vector pdbVecA2, double[] rmsds, double resolution, double weight4HB, java.util.Vector hbVec1, java.util.Vector hbVec2, boolean debug)
          Compute three Euler angles using two sets of RDC data (pissbile missing) and the corresponding Saupe elements Basic steps: extract the NH vectors with the corresponding RDC data as an array (for efficiency) For all the values of three Euler angles first compute the new NH directions after the rotation then compute the RDCs and RMSD from the new NH directions.
 Pdb getPdb()
          Gets the pdb.
 double getRdc()
          Gets the rdc.
 double[] internuclearVec(double[] n1, double[] n2)
          Compute the internuclear vector between two atoms.
 double[] newVecByTranslation(double[] n1, double[] vT)
          Compute the new vector after translation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdbRdc

public PdbRdc()
Instantiates a new pdb rdc.


PdbRdc

public PdbRdc(Pdb pp,
              double rdc)
Instantiates a new pdb rdc.

Parameters:
pp - the pp
rdc - the rdc
Method Detail

getPdb

public Pdb getPdb()
Gets the pdb.

Returns:
the pdb

getRdc

public double getRdc()
Gets the rdc.

Returns:
the rdc

dirCos

public double[] dirCos(double[] vec)
cal the directioal cosines of the vector vec.

Parameters:
vec - the vec
Returns:
the double[]

internuclearVec

public double[] internuclearVec(double[] n1,
                                double[] n2)
Compute the internuclear vector between two atoms.

Parameters:
n1 - the coordinate for atom 1
n2 - the coordinate for atom 2
Returns:
a vector from n1->n2

newVecByTranslation

public double[] newVecByTranslation(double[] n1,
                                    double[] vT)
Compute the new vector after translation.

Parameters:
n1 - the coordinate for atom 1
vT - the translation vector
Returns:
a vector from n1->n2

bestFit

public boolean bestFit(java.util.Vector pdbVec,
                       java.util.Vector rdcVec,
                       java.lang.String atom1,
                       java.lang.String atom2,
                       double[] rmsdArr,
                       boolean printResults)
Computing the Saupe matrix by SVD method and then diagonalizing it for computing the diagonalized elements and rotation matrix to one of POF.

Parameters:
pdbVec - a vector of PDB objects.
rdcVec - a corresponding RDC vector.
rmsdArr - for returning the five Saupe elements and the best-fitted RMSD
atom1 - the nucleus type whose RDC for the internuclear vector are recorded
atom2 - the nucleus type whose RDC for the internuclear vector are recorded
printResults - if true, it prints the back-computed RDCs.
Returns:
True if the SVD matrix is NOT singular, otherwise False The order of atom1 and atom2 is important (different order == sign inversion)

bestFit

public boolean bestFit(java.util.Vector pdbVec,
                       java.util.Vector rdcVec,
                       java.lang.String atom1,
                       java.lang.String atom2,
                       double[] rmsdArr,
                       double[] rdcArrN,
                       boolean printResults)
Computing the Saupe matrix by SVD method and then diagonalizing it for computing the diagonalized elements and rotation matrix to one of POF.

Parameters:
pdbVec - a vector of PDB objects.
rdcVec - a corresponding RDC vector.
rmsdArr - for returning the five Saupe elements and the best-fitted RMSD
rdcArrN - back-computed RDCs
atom1 - the nucleus type whose RDC for the internuclear vector are recorded
atom2 - the nucleus type whose RDC for the internuclear vector are recorded
printResults - if true, it prints the back-computed RDCs.
Returns:
True if the SVD matrix is NOT singular, otherwise False The order of atom1 and atom2 is important (different order == sign inversion)

equGenerate

public double[][] equGenerate(java.util.Vector pdbVec,
                              java.util.Vector rdcVec,
                              java.lang.String atom1,
                              java.lang.String atom2,
                              double rdcRatio)
A method to generate an equation consisting all the different internuclear vectors whose RDC are measured. IN our specific case the N->NH and CA->HA RDCs are used

Parameters:
pdbVec - the PDB ccordinates
rdcVec - used for extracting the PDB coordiantes with the RDC data
atom1 - the atom like N and H whose vector has RDC measured values
atom2 - the atom like N and H whose vector has RDC measured values
rdcRatio - the theoretical value of RDC strength compared with CH (which is set as 1.00) Real experimental value may differ due to Dynamics etc
Returns:
A 2D array with six columns corresponding to the five terms of direction cosine and RDCs

bestFit

public Matrix bestFit(java.util.Vector<Pdb> pdbVec,
                      java.util.Vector nhRdc,
                      java.util.Vector<Dipolar> cahaRdc,
                      double[] rdc1Cal,
                      double[] rdc2Cal,
                      double[] eigenValues)
Best fit Two sets of RDC data from one medium such as NH and CH please note that the rotation matrix returned by the eigenValueDecomposition method is rather arbitrary so we need to make sure that only the righ handedone are returned.

Parameters:
pdbVec - Coordinates
nhRdc - the measured NH rdcs
cahaRdc - the measured CH rdcs
rdc1Cal - for saving back-computed NH Rdcs including those of missing experimental RDCs
rdc2Cal - for saving back-computed CH Rdcs including those of missing experimental RDCs
eigenValues - for saving the computed {Syy, Szz, rmsd4NHRDC, rmsd4CHRDC
Returns:
the rotation matrix rotating the original frame to one of four possible POFs

bestFit4RDCs

public Matrix bestFit4RDCs(java.util.Vector pdbVec,
                           java.util.Vector nhRdc,
                           java.util.Vector cahaRdc,
                           java.util.Vector cacoRdc,
                           java.util.Vector conRdc,
                           double[] rdc1Cal,
                           double[] rdc2Cal,
                           double[] eigenValues)
Best fit Two sets of RDC data from one medium such as NH and CH please note that the rotation matrix returned by the eigenValueDecomposition method is rather arbitrary so we need to make sure only the righ handedone are returned.

Parameters:
pdbVec - Coordinates
nhRdc - the measured NH rdcs
cahaRdc - the measured CH rdcs
rdc1Cal - for saving back-computed NH Rdcs including those of missing experimental RDCs
rdc2Cal - for saving back-computed CH Rdcs including those of missing experimental RDCs
eigenValues - for saving the computed {Syy, Szz, rmsd4NHRDC, rmsd4CHRDC
cacoRdc - the caco rdc
conRdc - the con rdc
Returns:
the rotation matrix rotating the original frame to one of four possible POFs

BackCalNH

public double BackCalNH(java.util.Vector<Pdb> pdbVec,
                        java.util.Vector<Dipolar> rdcVec,
                        java.lang.String atom1,
                        java.lang.String atom2,
                        Matrix mm,
                        double Sxx,
                        double Syy,
                        double Szz,
                        double rdcRatio,
                        double[] rdcBc,
                        double[] squareRmsd,
                        int[] size)
For back-computing NH RDCs since the NH RDC of the fiest residue is NOT used in the DFS-based refinement.

Parameters:
pdbVec - the pdb coordinates
rdcVec - the meausred RDC values
atom1 - the atoms of which the internuclear vector has RDC values
atom2 - the atoms of which the internuclear vector has RDC values
Sxx - the three diagonalized Saupe elements
Syy - the three diagonalized Saupe elements
Szz - the three diagonalized Saupe elements
rdcRatio - the relative strength of RDCs
rdcBc - an array for returning the back-computed RDCs
mm - the matrix used to rotate the original PDB frame to one of POF
squareRmsd - the variable for computing overall Rmsd, added by zeng
size - the size of experimental RDCs, added by zeng
Returns:
RMSDs between the computed RDCs and the experimental RDCs.

BackCalNHOne

public double BackCalNHOne(java.util.Vector<Pdb> pdbVec,
                           java.util.Vector<Dipolar> rdcVec,
                           java.lang.String atom1,
                           java.lang.String atom2,
                           Matrix mm,
                           double Sxx,
                           double Syy,
                           double Szz,
                           double rdcRatio,
                           double[] rdcBc,
                           double[] squareRmsd,
                           int[] size)
compute the RDC deviation for one residue.

Parameters:
pdbVec - the pdb coordinates
rdcVec - the meausred RDC values
atom1 - the atoms of which the internuclear vector has RDC values
atom2 - the atoms of which the internuclear vector has RDC values
Sxx - the three diagonalized Saupe elements
Syy - the three diagonalized Saupe elements
Szz - the three diagonalized Saupe elements
rdcRatio - the relative strength of RDCs
rdcBc - an array for returning the back-computed RDCs
mm - the matrix used to rotate the original PDB frame to one of POF
squareRmsd - the variable for computing overall Rmsd, added by zeng
size - the size of experimental RDCs, added by zeng
Returns:
RMSDs between the computed RDCs and the experimental RDCs.

BackCal

public double BackCal(java.util.Vector<Pdb> pdbVec,
                      java.util.Vector<Dipolar> rdcVec,
                      java.lang.String atom1,
                      java.lang.String atom2,
                      Matrix mm,
                      double Sxx,
                      double Syy,
                      double Szz,
                      double rdcRatio,
                      double[] rdcBc,
                      double[] squareRmsd,
                      int[] size)
For back-computing RDCs.

Parameters:
pdbVec - the pdb coordinates
rdcVec - the meausred RDC values
atom1 - the atoms of which the internuclear vector has RDC values
atom2 - the atoms of which the internuclear vector has RDC values
mm - the matrix used to rotate the original PDB frame to one of POF
Sxx - the three diagonalized Saupe elements
Syy - the three diagonalized Saupe elements
Szz - the three diagonalized Saupe elements
rdcRatio - the relative strength of RDCs
rdcBc - an array for returning the back-computed RDCs
squareRmsd - the variable for computing overall Rmsd, added by zeng
size - the size of experimental RDCs, added by zeng
Returns:
RMSDs between the computed RDCs and the experimental RDCs.

BackCalOne

public double BackCalOne(java.util.Vector<Pdb> pdbVec,
                         java.util.Vector<Dipolar> rdcVec,
                         java.lang.String atom1,
                         java.lang.String atom2,
                         Matrix mm,
                         double Sxx,
                         double Syy,
                         double Szz,
                         double rdcRatio,
                         double[] rdcBc,
                         double[] squareRmsd,
                         int[] size)
compute rdc deviation for one residue For back-computing RDCs.

Parameters:
pdbVec - the pdb coordinates
rdcVec - the meausred RDC values
atom1 - the atoms of which the internuclear vector has RDC values
atom2 - the atoms of which the internuclear vector has RDC values
mm - the matrix used to rotate the original PDB frame to one of POF
Sxx - the three diagonalized Saupe elements
Syy - the three diagonalized Saupe elements
Szz - the three diagonalized Saupe elements
rdcRatio - the relative strength of RDCs
rdcBc - an array for returning the back-computed RDCs
squareRmsd - the variable for computing overall Rmsd, added by zeng
size - the size of experimental RDCs, added by zeng
Returns:
RMSDs between the computed RDCs and the experimental RDCs.

BackCalOnePdb

public double BackCalOnePdb(java.util.Vector<Pdb> pdbVec,
                            java.util.Vector<Dipolar> rdcVec,
                            java.lang.String atom1,
                            java.lang.String atom2,
                            Matrix mm,
                            double Sxx,
                            double Syy,
                            double Szz,
                            double rdcRatio)
compute rdc rmsd for only one pdb.

Parameters:
pdbVec - the pdb coordinates
rdcVec - the meausred RDC values
atom1 - the atoms of which the internuclear vector has RDC values
atom2 - the atoms of which the internuclear vector has RDC values
mm - the matrix used to rotate the original PDB frame to one of POF
Sxx - the three diagonalized Saupe elements
Syy - the three diagonalized Saupe elements
Szz - the three diagonalized Saupe elements
rdcRatio - the relative strength of RDCs
Returns:
RMSDs between the computed RDCs and the experimental RDCs.

BackCalCACO

public double BackCalCACO(java.util.Vector<Pdb> pdbVec,
                          java.util.Vector<Dipolar> rdcVec,
                          java.lang.String atom1,
                          java.lang.String atom2,
                          Matrix mm,
                          double Sxx,
                          double Syy,
                          double Szz,
                          double rdcRatio,
                          double[] rdcBc,
                          double[] squareRmsd,
                          int[] size,
                          boolean isPrint)
For back-computing RDCs.

Parameters:
pdbVec - the pdb coordinates
rdcVec - the meausred RDC values
atom1 - the atoms of which the internuclear vector has RDC values
atom2 - the atoms of which the internuclear vector has RDC values
mm - the matrix used to rotate the original PDB frame to one of POF
Sxx - the three diagonalized Saupe elements
Syy - the three diagonalized Saupe elements
Szz - the three diagonalized Saupe elements
rdcRatio - the relative strength of RDCs
rdcBc - an array for returning the back-computed RDCs
squareRmsd - the variable for computing overall Rmsd, added by zeng
size - the size of experimental RDCs, added by zeng
isPrint - whether the RDC deviation at each residue is printed
Returns:
RMSDs between the computed RDCs and the experimental RDCs.

BackCalCACOOnePdb

public double BackCalCACOOnePdb(java.util.Vector<Pdb> pdbVec,
                                java.util.Vector<Dipolar> rdcVec,
                                java.lang.String atom1,
                                java.lang.String atom2,
                                Matrix mm,
                                double Sxx,
                                double Syy,
                                double Szz,
                                double rdcRatio)
compute rdc rmsd for only one pdb.

Parameters:
pdbVec - the pdb coordinates
rdcVec - the meausred RDC values
atom1 - the atoms of which the internuclear vector has RDC values
atom2 - the atoms of which the internuclear vector has RDC values
mm - the matrix used to rotate the original PDB frame to one of POF
Sxx - the three diagonalized Saupe elements
Syy - the three diagonalized Saupe elements
Szz - the three diagonalized Saupe elements
rdcRatio - the relative strength of RDCs
Returns:
RMSDs between the computed RDCs and the experimental RDCs.

BackCalCON

public double BackCalCON(java.util.Vector<Pdb> pdbVec,
                         java.util.Vector<Dipolar> rdcVec,
                         java.lang.String atom1,
                         java.lang.String atom2,
                         Matrix mm,
                         double Sxx,
                         double Syy,
                         double Szz,
                         double rdcRatio,
                         double[] rdcBc,
                         double[] squareRmsd,
                         int[] size,
                         boolean isPrint)
For back-computing RDCs from Co at residue i to N at residue i+1.

Parameters:
pdbVec - the pdb coordinates
rdcVec - the meausred RDC values
atom1 - the atoms of which the internuclear vector has RDC values
atom2 - the atoms of which the internuclear vector has RDC values
mm - the matrix used to rotate the original PDB frame to one of POF
Sxx - the three diagonalized Saupe elements
Syy - the three diagonalized Saupe elements
Szz - the three diagonalized Saupe elements
rdcRatio - the relative strength of RDCs
rdcBc - an array for returning the back-computed RDCs
squareRmsd - the variable for computing overall Rmsd, added by zeng
size - the size of experimental RDCs, added by zeng
isPrint - whether the RDC deviation is printed
Returns:
RMSDs between the computed RDCs and the experimental RDCs.

BackCalCONOnePdb

public double BackCalCONOnePdb(java.util.Vector<Pdb> pdbVec,
                               java.util.Vector<Dipolar> rdcVec,
                               java.lang.String atom1,
                               java.lang.String atom2,
                               Matrix mm,
                               double Sxx,
                               double Syy,
                               double Szz,
                               double rdcRatio)
compute rdc rmsd for only one pdb from Co at residue i to N at residue i+1.

Parameters:
pdbVec - the pdb coordinates
rdcVec - the meausred RDC values
atom1 - the atoms of which the internuclear vector has RDC values
atom2 - the atoms of which the internuclear vector has RDC values
mm - the matrix used to rotate the original PDB frame to one of POF
Sxx - the three diagonalized Saupe elements
Syy - the three diagonalized Saupe elements
Szz - the three diagonalized Saupe elements
rdcRatio - the relative strength of RDCs
Returns:
RMSDs between the computed RDCs and the experimental RDCs.

BackCal

public double BackCal(java.util.Vector<Pdb> pdbVec,
                      java.util.Vector<Dipolar> rdcVec,
                      java.lang.String atom1,
                      java.lang.String atom2,
                      Matrix mm,
                      double Sxx,
                      double Syy,
                      double Szz,
                      double rdcRatio,
                      double[] rdcBc)
For back-computing RDCs.

Parameters:
pdbVec - the pdb coordinates
rdcVec - the meausred RDC values
atom1 - the atoms of which the internuclear vector has RDC values
atom2 - the atoms of which the internuclear vector has RDC values
mm - the matrix used to rotate the original PDB frame to one of POF
Sxx - the three diagonalized Saupe elements
Syy - the three diagonalized Saupe elements
Szz - the three diagonalized Saupe elements
rdcRatio - the relative strength of RDCs
rdcBc - an array for returning the back-computed RDCs
Returns:
RMSDs between the computed RDCs and the experimental RDCs.

BackCalNH

public double BackCalNH(java.util.Vector<Pdb> pdbVec,
                        java.util.Vector<Dipolar> rdcVec,
                        java.lang.String atom1,
                        java.lang.String atom2,
                        Matrix mm,
                        double Sxx,
                        double Syy,
                        double Szz,
                        double rdcRatio,
                        double[] rdcBc)
For back-computing NH RDCs since the NH RDC of the fiest residue is NOT used in the DFS-based refinement.

Parameters:
pdbVec - the pdb coordinates
rdcVec - the meausred RDC values
atom1 - the atoms of which the internuclear vector has RDC values
atom2 - the atoms of which the internuclear vector has RDC values
Sxx - the three diagonalized Saupe elements
Syy - the three diagonalized Saupe elements
Szz - the three diagonalized Saupe elements
rdcRatio - the relative strength of RDCs
rdcBc - an array for returning the back-computed RDCs
mm - the matrix used to rotate the original PDB frame to one of POF
Returns:
RMSDs between the computed RDCs and the experimental RDCs.

BackCalRdcs

public double[] BackCalRdcs(java.util.Vector pdbVec,
                            java.util.Vector rdcVec,
                            java.lang.String atom1,
                            java.lang.String atom2,
                            Matrix mm,
                            double Sxx,
                            double Syy,
                            double Szz)
For back-computing RDCs.

Parameters:
pdbVec - the pdb coordinates
rdcVec - the meausred RDC values
atom1 - the atoms of which the internuclear vector has RDC values
atom2 - the atom2
mm - the matrix used to rotate the original PDB frame to one of POF
Sxx - the three diagonalized Saupe elements
Syy - the syy
Szz - the szz
Returns:
RMSDs between the computed RDCs and the experimental RDCs.

eulerFitPrintEnsemble

public Matrix eulerFitPrintEnsemble(java.util.Vector<Pdb> pdbVec,
                                    java.util.Vector<Dipolar> rdcVec1,
                                    java.util.Vector<Dipolar> rdcVec2,
                                    double Syy,
                                    double Szz,
                                    double[] rmsds,
                                    double resolution,
                                    boolean debug,
                                    double RdcRmsdThreshold)
print out all pdb orientations in which rdc rmsd is smaler than some threshold, in grid search.

Parameters:
pdbVec - coordinate vector
rdcVec1 - nh rdc vector
rdcVec2 - ch rdc vector
resolution - resolution in the grid search
RdcRmsdThreshold - rdc rmsd threshold
rmsds - return rdc rmsd return the best rotation matrix in terms of rdc rmsd
Syy - the syy
Szz - the szz
debug - the debug
Returns:
the matrix

eulerFit4RDCs

public Matrix eulerFit4RDCs(java.util.Vector<Pdb> pdbVec,
                            java.util.Vector<Dipolar> rdcVec1,
                            java.util.Vector<Dipolar> rdcVec2,
                            java.util.Vector<Dipolar> rdcVecCaCo,
                            java.util.Vector<Dipolar> rdcVecCoN,
                            double Syy,
                            double Szz,
                            double[] rmsds,
                            double resolution,
                            boolean debug)
Note: Lincong's has a serious bug. it is fixed in this version Compute three Euler angles using two sets of RDC data and the corresponding Saupe elements Basic steps: extract the NH vectors with the corresponding RDC data as an array (for efficiency) For all the values of three Euler angles first compute the new NH directions after the rotation then compute the RDCs and RMSD from the new NH directions.

Parameters:
pdbVec - a vector of Pdb object corresponding to the structural fragment.
rdcVec1 - a vector of NH RDC values
rdcVec2 - a vector of CH RDC values
Szz - the three diagonalized Saupe elements
Syy - the three diagonalized Saupe elements
rmsds - for returning the RDC RMSDs in the order of RDC for medium 1 and medium 2
resolution - the resolution in the grid-search
debug - if true, it will print the progress of the fitting
rdcVecCaCo - the rdc vec ca co
rdcVecCoN - the rdc vec co n
Returns:
the rotation matrix which minimizing the score function (RDCs) We only search through 1/4 of the region to obtain one possible orientation, other three can be computed much faster by multiplying by one of the three constant matrices.

eulerFit

public Matrix eulerFit(java.util.Vector<Pdb> pdbVec,
                       java.util.Vector<Dipolar> rdcVec1,
                       java.util.Vector<Dipolar> rdcVec2,
                       double Syy,
                       double Szz,
                       double[] rmsds,
                       double resolution,
                       boolean debug)
Note: Lincong's has a serious bug. it is fixed in this version Compute three Euler angles using two sets of RDC data and the corresponding Saupe elements Basic steps: extract the NH vectors with the corresponding RDC data as an array (for efficiency) For all the values of three Euler angles first compute the new NH directions after the rotation then compute the RDCs and RMSD from the new NH directions.

Parameters:
pdbVec - a vector of Pdb object corresponding to the structural fragment.
rdcVec1 - a vector of NH RDC values
rdcVec2 - a vector of CH RDC values
Szz - the three diagonalized Saupe elements
Syy - the three diagonalized Saupe elements
rmsds - for returning the RDC RMSDs in the order of RDC for medium 1 and medium 2
resolution - the resolution in the grid-search
debug - if true, it will print the progress of the fitting
Returns:
the rotation matrix which minimizing the score function (RDCs) We only search through 1/4 of the region to obtain one possible orientation, other three can be computed much faster by multiplying by one of the three constant matrices.

eulerFit_old

public Matrix eulerFit_old(java.util.Vector pdbVec,
                           java.util.Vector rdcVec1,
                           java.util.Vector rdcVec2,
                           double Syy,
                           double Szz,
                           double[] rmsds,
                           double resolution,
                           boolean debug)
Compute three Euler angles using two sets of RDC data and the corresponding Saupe elements Basic steps: extract the NH vectors with the corresponding RDC data as an array (for efficiency) For all the values of three Euler angles first compute the new NH directions after the rotation then compute the RDCs and RMSD from the new NH directions.

Parameters:
pdbVec - a vector of Pdb object corresponding to the structural fragment.
rdcVec1 - a vector of NH RDC values
rdcVec2 - a vector of CH RDC values
rmsds - for returning the RDC RMSDs in the order of RDC for medium 1 and medium 2
resolution - the resolution in the grid-search
debug - if true, it will print the progress of the fitting
Syy - the syy
Szz - the szz
Returns:
the rotation matrix which minimizing the score function (RDCs) We only search through 1/4 of the region to obtain one possible orientation, other three can be computed much faster by multiplying by one of the three constant matrices.

fit4MissingRdc

public Matrix fit4MissingRdc(java.util.Vector pdbVec,
                             java.util.Vector rdcVec1,
                             java.util.Vector rdcVec2,
                             double Syy,
                             double Szz,
                             double[] rmsds,
                             double resolution,
                             boolean debug)
Compute three Euler angles using two sets of RDC data (pissbile missing) and the corresponding Saupe elements Basic steps: extract the NH vectors with the corresponding RDC data as an array (for efficiency) For all the values of three Euler angles first compute the new NH directions after the rotation then compute the RDCs and RMSD from the new NH directions.

Parameters:
pdbVec - a vector of Pdb object corresponding to the structural fragment.
rdcVec1 - a vector of NH RDC
rdcVec2 - a vector of CH RDC
rmsds - saving the RDC RMSDs and hbScore in the order: rmsdRDC1, rmsdRDC2, hbScore.
resolution - the resolution in grid search on angle space
debug - if true will print the progress of the search
Syy - the syy
Szz - the szz
Returns:
the rotation matrix which minimizing the score function (RDCs) if we use anyone of the four possible rotations this program will find only one. If we do not use any rotational matrix the program will always find four sets of Euler angles. Is there any possiblities that r1 and r2 will rescure the 4 possibilites.

fit4MissingRdcHB

public Matrix fit4MissingRdcHB(java.util.Vector pdbVec,
                               java.util.Vector rdcVec1,
                               java.util.Vector rdcVec2,
                               double Syy,
                               double Szz,
                               java.util.Vector pdbVecA,
                               double[] rmsds,
                               double resolution,
                               double weight4HB,
                               java.util.Vector hbVec,
                               boolean debug)
Compute three Euler angles using two sets of RDC data (pissbile missing) and the corresponding Saupe elements Basic steps: extract the NH vectors with the corresponding RDC data as an array (for efficiency) For all the values of three Euler angles first compute the new NH directions after the rotation then compute the RDCs and RMSD from the new NH directions.

Parameters:
pdbVec - a vector of Pdb object corresponding to the structural fragment.
rdcVec1 - a vector of NH RDC
rdcVec2 - a vector of CH RDC
rmsds - saving the RDC RMSDs and hbScore in the order: rmsdRDC1, rmsdRDC2, hbScore.
resolution - the resolution in grid search on angle space
weight4HB - relative weight for the H-bond in the score function
pdbVecA - the H-bond parter of current fragment being searched
hbVec - the identity of H-bonds
debug - if true will print the progress of the search
Syy - the syy
Szz - the szz
Returns:
the rotation matrix which minimizing the score function (RDCs) if we use anyone of the four possible rotations this program will find only one. If we do not use any rotational matrix the program will always find four sets of Euler angles. Is there any possiblities that r1 and r2 will rescure the 4 possibilites.

fit4MissingRdcHB2

public Matrix fit4MissingRdcHB2(java.util.Vector pdbVec,
                                java.util.Vector rdcVec1,
                                java.util.Vector rdcVec2,
                                double Syy,
                                double Szz,
                                java.util.Vector pdbVecA1,
                                java.util.Vector pdbVecA2,
                                double[] rmsds,
                                double resolution,
                                double weight4HB,
                                java.util.Vector hbVec1,
                                java.util.Vector hbVec2,
                                boolean debug)
Compute three Euler angles using two sets of RDC data (pissbile missing) and the corresponding Saupe elements Basic steps: extract the NH vectors with the corresponding RDC data as an array (for efficiency) For all the values of three Euler angles first compute the new NH directions after the rotation then compute the RDCs and RMSD from the new NH directions.

Parameters:
pdbVec - a vector of Pdb object corresponding to the structural fragment.
rdcVec1 - a vector of NH RDC
rdcVec2 - a vector of CH RDC
rmsds - saving the RDC RMSDs and hbScore in the order: rmsdRDC1, rmsdRDC2, hbScore.
resolution - the resolution in grid search on angle space
weight4HB - relative weight for the H-bond in the score function
pdbVecA1 - the H-bond parter of current fragment being searched
pdbVecA2 - another H-bond parter of current fragment being searched
debug - if true will print the progress of the search
Syy - the syy
Szz - the szz
hbVec1 - the hb vec1
hbVec2 - the hb vec2
Returns:
the rotation matrix which minimizing the score function (RDCs) if we use anyone of the four possible rotations this program will find only one. If we do not use any rotational matrix the program will always find four sets of Euler angles. Is there any possiblities that r1 and r2 will rescure the 4 possibilites.

eulerFitHB

public Matrix eulerFitHB(java.util.Vector pdbVec,
                         java.util.Vector rdcVec1,
                         java.util.Vector rdcVec2,
                         double[] saupe,
                         Matrix rot,
                         double[] rmsds,
                         double resolution,
                         double weight4HB,
                         java.util.Vector pdbVecS1,
                         java.util.Vector hbVec,
                         Matrix mat4Dirs,
                         boolean debug)
Compute three Euler angles using two sets of RDC data and the corresponding Saupe elements Basic steps: extract the NH vectors with the corresponding RDC data as an array (for efficiency) For all the values of three Euler angles first compute the new NH directions after the rotation then compute the RDCs and RMSD from the new NH directions.

Parameters:
pdbVec - a vector of Pdb object corresponding to the structural fragment.
rdcVec1 - a vector of RDC values from medium 1
rdcVec2 - a vector of RDC values from medium 2
saupe - four diagnolized Saupe elements in the order of {Syy1, Szz1, Syy2, Szz2}
rot - The relative rotation matrix between the 2 POFs.
rmsds - saving the RDC RMSDs and hbScore in the order: rmsdRDC1, rmsdRDC2, hbScore.
resolution - the resolution in grid search on angle space
weight4HB - relative weight for the H-bond in the score function
pdbVecS1 - the H-bond parter of current fragment being searched
hbVec - the identity of H-bonds
mat4Dirs - the matrix specifying one of the possible orientations.
debug - if true will print the progress of the search
Returns:
the rotation matrix which minimizing the score function (RDCs) if we use anyone of the four possible rotations this program will find only one. If we do not use any rotational matrix the program will always find four sets of Euler angles. Is there any possiblities that r1 and r2 will rescure the 4 possibilites.