RdcPanda
Class PdbRmsd

java.lang.Object
  extended by RdcPanda.PdbRmsd

public class PdbRmsd
extends java.lang.Object

A program for determining the relative positions of a helix and a beta sheet based on the NOE distances between them. The main idea is: (1) Compute the centers of the two groups of nuclei with NOEs. Compute the RMSD between two PDBs based on SVD. In the simple case their AA sequence are the same except that one can be only a partial of the other (shorter than the other). When do the rotation the center is very important so we need to compute the center first as in the algorithm. Written by Lincong Wang (2001-2005) and Jianyang (Michael) Zeng (2005-2009).


Field Summary
 boolean isSkipOutEnsembe
          The is skip out ensembe.
 
Constructor Summary
PdbRmsd()
          Instantiates a new pdb rmsd.
 
Method Summary
 java.util.Vector calcMinPackingRms(java.util.Vector noeVec, java.util.Vector pdbVecA, java.util.Vector pdbVecB, double[] noeRms, boolean debugNOE)
          calculate the minimum rms between two sses, for checking packing symmetry In both SSEs, all rotamers are places.
 double[] centerCal(double[][] pdbVec)
          compute the center of a PDB coordinates when the coordinates are represented as an array of nx3.
 double[] centerCal(java.util.Vector pdbVec)
          compute the center of a PDB object (the 3D coordinates).
 double[] centerCalNew(java.util.Vector vecCC)
          compute the center of a PDB coordinates when the coordinates are represented as an array of nx3.
 double centerFit(java.util.Vector pdbVecA, java.util.Vector pdbVecB, java.util.Vector hbVec, boolean debug)
          compute the H-bond energy term between the two paired strands.
 java.util.Vector centerFitVec(java.util.Vector pdbVecA, java.util.Vector pdbVecB, java.util.Vector hbVec, boolean debug)
          compute the H-bond energy term between the two paired strands.
 double[] dirCos(double[] vec)
          cal the directioal cosines of the vector vec.
 java.util.Vector getPdbVecA()
          Gets the pdb vec a.
 java.util.Vector getPdbVecB()
          Gets the pdb vec b.
 double interAngle(double[] v1, double[] v2)
          calculate the angles between two vectors v1 and v2 The returned angle is in the [0,Pi] range or the cosine itself.
 java.util.Vector positionByAmbiNOEAllRotamers(java.util.Vector noeVec, java.util.Vector pdbVecA, java.util.Vector pdbVecB, double[] noeRms, boolean debugNOE, java.util.Vector vecUpdateNOE, java.lang.String strPass, java.util.Vector vecSeq, double resol_cluster)
          pack two SSEs based on Amgibuous NOE restratints.
 java.util.Vector positionByNOE_old(java.util.Vector noeVec, java.util.Vector pdbVecA, java.util.Vector pdbVecB, double[] noeRms, boolean debugNOE, java.util.Vector vecUpdateNOE)
          use heavy atom to replace pseduo protons Compute the new center of atoms involved in NOE distances.
 java.util.Vector positionByNOE(java.util.Vector noeVec, java.util.Vector pdbVecA, java.util.Vector pdbVecB, double[] noeRms, boolean debugNOE, java.util.Vector vecUpdateNOE)
          use exact name for pseduo protons Compute the new center of atoms involved in NOE distances.
 java.util.Vector positionByNOEAllRotamers(java.util.Vector noeVec, java.util.Vector pdbVecA, java.util.Vector pdbVecB, double[] noeRms, boolean debugNOE, java.util.Vector vecUpdateNOE, java.lang.String strPass, java.util.Vector vecSeq, double resol_cluster)
          pack two SSEs based on NOE restratints In both SSEs, all rotamers are placed.
 java.util.Vector positionByNOEAllRotamersGrid(java.util.Vector noeVec, java.util.Vector pdbVecA, java.util.Vector pdbVecB, double[] noeRms, boolean debugNOE, java.util.Vector vecUpdateNOE)
          pack two SSEs based on NOE restratints In both SSEs, all rotamers are places.
 java.util.Vector positionByNOEAllRotamersSaved(java.util.Vector noeVec, java.util.Vector pdbVecA, java.util.Vector pdbVecB, double[] noeRms, boolean debugNOE, java.util.Vector vecUpdateNOE, java.lang.String strPass, java.util.Vector vecSeq)
          Position by noe all rotamers saved.
 java.util.Vector positionByNOENew(java.util.Vector noeVec, java.util.Vector pdbVecA, java.util.Vector pdbVecB, double[] noeRms, boolean debugNOE, java.util.Vector vecUpdateNOE)
          Note: all rotamers are put in both structures.
 java.util.Vector positionByNOEPatterns(java.util.Vector pdbVecA, java.util.Vector pdbVecB, java.util.Vector assignVec, java.util.Vector NoesyVec, double csErrH, double csErrN, double csErrCA, double distBound, int pickNum, double[] max_score)
          pack two sses based on back-computed NOE patterns.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isSkipOutEnsembe

public boolean isSkipOutEnsembe
The is skip out ensembe.

Constructor Detail

PdbRmsd

public PdbRmsd()
Instantiates a new pdb rmsd.

Method Detail

getPdbVecA

public java.util.Vector getPdbVecA()
Gets the pdb vec a.

Returns:
the pdb vec a

getPdbVecB

public java.util.Vector getPdbVecB()
Gets the pdb vec b.

Returns:
the pdb vec b

interAngle

public double interAngle(double[] v1,
                         double[] v2)
calculate the angles between two vectors v1 and v2 The returned angle is in the [0,Pi] range or the cosine itself. or just return the interAngle cosine

Parameters:
v1 - the v1
v2 - the v2
Returns:
the double

dirCos

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

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

centerCal

public double[] centerCal(java.util.Vector pdbVec)
compute the center of a PDB object (the 3D coordinates).

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

centerCal

public double[] centerCal(double[][] pdbVec)
compute the center of a PDB coordinates when the coordinates are represented as an array of nx3.

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

centerCalNew

public double[] centerCalNew(java.util.Vector vecCC)
compute the center of a PDB coordinates when the coordinates are represented as an array of nx3.

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

centerFit

public double centerFit(java.util.Vector pdbVecA,
                        java.util.Vector pdbVecB,
                        java.util.Vector hbVec,
                        boolean debug)
compute the H-bond energy term between the two paired strands.

Parameters:
pdbVecA - strand A
pdbVecB - strand B, A's partner
hbVec - the vector of Hbond information
debug - if true it print the information for debuging
Returns:
the double

centerFitVec

public java.util.Vector centerFitVec(java.util.Vector pdbVecA,
                                     java.util.Vector pdbVecB,
                                     java.util.Vector hbVec,
                                     boolean debug)
compute the H-bond energy term between the two paired strands. Identical to the centerFit method except that the newly paired Pdb vector are returned

Parameters:
pdbVecA - strand A
pdbVecB - strand B, A's partner
hbVec - the vector of Hbond information
debug - the debug
Returns:
the translated and paired Pdb vector

positionByNOENew

public java.util.Vector positionByNOENew(java.util.Vector noeVec,
                                         java.util.Vector pdbVecA,
                                         java.util.Vector pdbVecB,
                                         double[] noeRms,
                                         boolean debugNOE,
                                         java.util.Vector vecUpdateNOE)
Note: all rotamers are put in both structures. Compute the new center of atoms involved in NOE distances. pdbA and pdbB are the original coordinates noeDistance: the noe distances between the two fragments. format (low, upper). arrange the three arrays with the same order so that the distance i is between nuclei i of A and i of B.

Parameters:
noeVec - the NOE distance restraints between the fragment A and B
pdbVecA - one fragment
pdbVecB - another fragment
noeRms - saving the min NOE rmsd
debugNOE - if true it will print out the NOE fitting Rmsds
vecUpdateNOE - the vec update noe
Returns:
the Pdb vector for translated fragment which is B while Pdb vector for A is NOT changed

positionByNOE_old

public java.util.Vector positionByNOE_old(java.util.Vector noeVec,
                                          java.util.Vector pdbVecA,
                                          java.util.Vector pdbVecB,
                                          double[] noeRms,
                                          boolean debugNOE,
                                          java.util.Vector vecUpdateNOE)
use heavy atom to replace pseduo protons Compute the new center of atoms involved in NOE distances. pdbA and pdbB are the original coordinates noeDistance: the noe distances between the two fragments. format (low, upper). arrange the three arrays with the same order so that the distance i is between nuclei i of A and i of B.

Parameters:
noeVec - the NOE distance restraints between the fragment A and B
pdbVecA - one fragment
pdbVecB - another fragment
noeRms - saving the NOE rmsd
debugNOE - if true it will print out the NOE fitting Rmsds
vecUpdateNOE - the vec update noe
Returns:
the Pdb vector for translated fragment which is B while Pdb vector for A is NOT changed

positionByNOE

public java.util.Vector positionByNOE(java.util.Vector noeVec,
                                      java.util.Vector pdbVecA,
                                      java.util.Vector pdbVecB,
                                      double[] noeRms,
                                      boolean debugNOE,
                                      java.util.Vector vecUpdateNOE)
use exact name for pseduo protons Compute the new center of atoms involved in NOE distances. pdbA and pdbB are the original coordinates noeDistance: the noe distances between the two fragments. format (low, upper). arrange the three arrays with the same order so that the distance i is between nuclei i of A and i of B.

Parameters:
noeVec - the NOE distance restraints between the fragment A and B
pdbVecA - one fragment
pdbVecB - another fragment
noeRms - saving the NOE rmsd
debugNOE - if true it will print out the NOE fitting Rmsds
vecUpdateNOE - the vec update noe
Returns:
the Pdb vector for translated fragment which is B while Pdb vector for A is NOT changed

positionByNOEAllRotamers

public java.util.Vector positionByNOEAllRotamers(java.util.Vector noeVec,
                                                 java.util.Vector pdbVecA,
                                                 java.util.Vector pdbVecB,
                                                 double[] noeRms,
                                                 boolean debugNOE,
                                                 java.util.Vector vecUpdateNOE,
                                                 java.lang.String strPass,
                                                 java.util.Vector vecSeq,
                                                 double resol_cluster)
                                          throws JampackException
pack two SSEs based on NOE restratints In both SSEs, all rotamers are placed.

Parameters:
noeVec - the NOE distance restraints between the fragment A and B
pdbVecA - one fragment
pdbVecB - another fragment
noeRms - saving the NOE rmsd
debugNOE - if true it will print out the NOE fitting Rmsds
vecSeq - sequence of residue names
resol_cluster - the resolution of each cluster
vecUpdateNOE - the vec update noe
strPass - the str pass
Returns:
the Pdb vector for translated fragment which is B while Pdb vector for A is NOT changed
Throws:
JampackException - the jampack exception

positionByAmbiNOEAllRotamers

public java.util.Vector positionByAmbiNOEAllRotamers(java.util.Vector noeVec,
                                                     java.util.Vector pdbVecA,
                                                     java.util.Vector pdbVecB,
                                                     double[] noeRms,
                                                     boolean debugNOE,
                                                     java.util.Vector vecUpdateNOE,
                                                     java.lang.String strPass,
                                                     java.util.Vector vecSeq,
                                                     double resol_cluster)
                                              throws JampackException
pack two SSEs based on Amgibuous NOE restratints. (The translation should at least satisfy a minimum number (3-5) of NOE constraints). In both SSEs, all rotamers are placed Written in 1/27/09--1/27/09.

Parameters:
noeVec - the NOE distance restraints between the fragment A and B
pdbVecA - one fragment
pdbVecB - another fragment
noeRms - saving the NOE rmsd
debugNOE - if true it will print out the NOE fitting Rmsds
vecSeq - sequence of residue names
resol_cluster - the resolution of each cluster
vecUpdateNOE - the vec update noe
strPass - the str pass
Returns:
the Pdb vector for translated fragment which is B while Pdb vector for A is NOT changed
Throws:
JampackException - the jampack exception

positionByNOEAllRotamersSaved

public java.util.Vector positionByNOEAllRotamersSaved(java.util.Vector noeVec,
                                                      java.util.Vector pdbVecA,
                                                      java.util.Vector pdbVecB,
                                                      double[] noeRms,
                                                      boolean debugNOE,
                                                      java.util.Vector vecUpdateNOE,
                                                      java.lang.String strPass,
                                                      java.util.Vector vecSeq)
                                               throws JampackException
Position by noe all rotamers saved.

Parameters:
noeVec - the noe vec
pdbVecA - the pdb vec a
pdbVecB - the pdb vec b
noeRms - the noe rms
debugNOE - the debug noe
vecUpdateNOE - the vec update noe
strPass - the str pass
vecSeq - the vec seq
Returns:
the vector
Throws:
JampackException - the jampack exception

positionByNOEAllRotamersGrid

public java.util.Vector positionByNOEAllRotamersGrid(java.util.Vector noeVec,
                                                     java.util.Vector pdbVecA,
                                                     java.util.Vector pdbVecB,
                                                     double[] noeRms,
                                                     boolean debugNOE,
                                                     java.util.Vector vecUpdateNOE)
                                              throws JampackException
pack two SSEs based on NOE restratints In both SSEs, all rotamers are places. similar to positionByNOEAllRotamers, but use cube grid search approach.

Parameters:
noeVec - the NOE distance restraints between the fragment A and B
pdbVecA - one fragment
pdbVecB - another fragment
noeRms - saving the NOE rmsd
debugNOE - if true it will print out the NOE fitting Rmsds
vecUpdateNOE - the vec update noe
Returns:
the Pdb vector for translated fragment which is B while Pdb vector for A is NOT changed
Throws:
JampackException - the jampack exception

positionByNOEPatterns

public java.util.Vector positionByNOEPatterns(java.util.Vector pdbVecA,
                                              java.util.Vector pdbVecB,
                                              java.util.Vector assignVec,
                                              java.util.Vector NoesyVec,
                                              double csErrH,
                                              double csErrN,
                                              double csErrCA,
                                              double distBound,
                                              int pickNum,
                                              double[] max_score)
pack two sses based on back-computed NOE patterns. pdbA and pdbB are the original coordinates noeDistance: the noe distances between the two fragments. format (low, upper). arrange the three arrays with the same order so that the distance i is between nuclei i of A and i of B.

Parameters:
pdbVecA - one fragment
pdbVecB - another fragment
assignVec - vector of resonane assignment list
NoesyVec - vector of experimental NOESY peak list
distBound - NOE upper distance limit
pickNum - size of packing ensemble
max_score - store the maximum score in the ensemble of packings
csErrH - the cs err h
csErrN - the cs err n
csErrCA - the cs err ca
Returns:
ensemble of translations with top scores

calcMinPackingRms

public java.util.Vector calcMinPackingRms(java.util.Vector noeVec,
                                          java.util.Vector pdbVecA,
                                          java.util.Vector pdbVecB,
                                          double[] noeRms,
                                          boolean debugNOE)
                                   throws JampackException
calculate the minimum rms between two sses, for checking packing symmetry In both SSEs, all rotamers are places.

Parameters:
noeVec - the NOE distance restraints between the fragment A and B
pdbVecA - one fragment
pdbVecB - another fragment
noeRms - saving the NOE rmsd
debugNOE - if true it will print out the NOE fitting Rmsds
Returns:
the symmetry ID from 0-3.
Throws:
JampackException - the jampack exception