RdcPanda
Class Loops

java.lang.Object
  extended by RdcPanda.Loops

public class Loops
extends java.lang.Object


Field Summary
 double caliConstant
           
 java.util.Random generator
           
 java.util.Vector vecPdbSSE
           
 java.util.Vector vecRamaAla
           
 java.util.Vector vecRamaGeneral
           
 java.util.Vector vecRamaGly
           
 java.util.Vector vecRamaPrePro
           
 java.util.Vector vecRamaPro
           
 java.util.Vector vecSeq
           
 
Constructor Summary
Loops()
           
 
Method Summary
 java.util.Vector calcFragment(double Syy, double Szz, java.util.Vector<Dipolar> vecChRdc, java.util.Vector<Dipolar> vecNhRdc, double[] n1, double[] nh1, double[] ca1, int noStart, int noEnd, java.util.Vector vecNoesy, java.util.Vector asgVec, double csErrH, double csErrHeavy, boolean isSkipNOE)
          Compute the structure fragment that best fits the RDC and NOESY data.
 java.util.Vector CombineSSEandLoop(java.util.Vector vecSSEPdb, java.util.Vector vecLoopPdb)
          combine the sse pdb with the loop pdb.
 double CompNoePatternScoreBetwSSEAndLoop(double errH, double errHeavy, java.util.Vector vecPdbCombin, double distBound, java.util.Vector asgVec, java.util.Vector vecNOESY)
          compute NOE pattern between SSE and loops.
 double CompRamachandranScore(double phi, double psi, java.util.Vector vecRamachandran)
          Compute the Ramachandran probability score based on Richardsons' top500 structures.
 void doCalLoops(java.lang.String src, java.lang.String strOut, java.lang.String strInput)
          compute the loop using a gradient search approach (like ccd.)
 java.lang.String GetResNameFromSequence(java.util.Vector vecSequence, int res_no)
          get the residue name from the sequence information, given the residue number.
 boolean isInPhiPsiClusters(java.util.Vector vecPhiPsi, PhiPsi ff, double resolution)
          tell whether a point is within the clusters of previous ensemble
 java.util.Vector IterativeGradientSearch(java.util.Vector vecPrePdb, double Syy, double Szz, java.util.Vector<Dipolar> vecChRdc, java.util.Vector<Dipolar> vecNhRdc, int noStart, int noEnd, java.util.Vector vecNoesy, java.util.Vector asgVec, double csErrH, double csErrHeavy, boolean isSkipNOE)
           
 java.util.Vector phiCalAll(double Syy, double Szz, double rdc, Matrix Rg)
          Compute the Phi angles from RDC equations.
 boolean phiPsiChainAll(double[] rdcArrCH, double[] rdcArrNH, int[] isChRDC, int[] isNhRDC, Matrix rg, double Syy, double Szz, int i, int resNo, int N, double[] ppS, java.util.Vector ppVec, boolean rightHand, int resNoStart)
          A recusive function to compute all the backbone (phi, psi) angles for a fragment.
 PhiPsi PhiPsiRandomFromRamachandran(java.util.Vector vecSeq, int resNo)
          Randomly sample the (Phi, Psi) angles according to distribution from Ramachandran.
 java.util.Vector psiCalAll(double Syy, double Szz, double rdc, double phi, Matrix rg)
          Compute the Psi angles.
 java.util.Vector ReadRamachandranFile(java.lang.String ssePdbFile)
          Read the Ramachandran probability score based on Richardsons' top500 structures.
 java.util.Vector ResidueGradientSearch(java.util.Vector vecPrePdb, int curResNo, double Syy, double Szz, java.util.Vector<Dipolar> vecChRdc, java.util.Vector<Dipolar> vecNhRdc, int noStart, int noEnd, java.util.Vector vecNoesy, java.util.Vector asgVec, double csErrH, double csErrHeavy, double[] endDist, boolean isSkipNOE)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vecRamaAla

public java.util.Vector vecRamaAla

vecRamaGeneral

public java.util.Vector vecRamaGeneral

vecRamaPrePro

public java.util.Vector vecRamaPrePro

vecRamaPro

public java.util.Vector vecRamaPro

vecRamaGly

public java.util.Vector vecRamaGly

generator

public java.util.Random generator

vecSeq

public java.util.Vector vecSeq

vecPdbSSE

public java.util.Vector vecPdbSSE

caliConstant

public double caliConstant
Constructor Detail

Loops

public Loops()
Method Detail

doCalLoops

public void doCalLoops(java.lang.String src,
                       java.lang.String strOut,
                       java.lang.String strInput)
                throws JampackException
compute the loop using a gradient search approach (like ccd.)

Parameters:
src - location of the input file
strOut - location of the output file
strInput - input file name
Throws:
JampackException

IterativeGradientSearch

public java.util.Vector IterativeGradientSearch(java.util.Vector vecPrePdb,
                                                double Syy,
                                                double Szz,
                                                java.util.Vector<Dipolar> vecChRdc,
                                                java.util.Vector<Dipolar> vecNhRdc,
                                                int noStart,
                                                int noEnd,
                                                java.util.Vector vecNoesy,
                                                java.util.Vector asgVec,
                                                double csErrH,
                                                double csErrHeavy,
                                                boolean isSkipNOE)

ResidueGradientSearch

public java.util.Vector ResidueGradientSearch(java.util.Vector vecPrePdb,
                                              int curResNo,
                                              double Syy,
                                              double Szz,
                                              java.util.Vector<Dipolar> vecChRdc,
                                              java.util.Vector<Dipolar> vecNhRdc,
                                              int noStart,
                                              int noEnd,
                                              java.util.Vector vecNoesy,
                                              java.util.Vector asgVec,
                                              double csErrH,
                                              double csErrHeavy,
                                              double[] endDist,
                                              boolean isSkipNOE)
Parameters:
vecPrePdb - the whole structure computed in previous round
curResNo - current residue number
Syy - Alignment tensor
Szz - Alignment tensor
vecChRdc - ch rdcs
vecNhRdc - nh rdcs
noStart - the first residue number in the loop fragment
noEnd - the end residue number in the loop fragment
vecNoesy - NOESY cross peaks
asgVec - resonance assignment list
csErrH - error for proton chemical shift
csErrHeavy - error for heavy atom chemical shift
endDist - distance between ending points
isSkipNOE - whether skip the NOE matching score in the scoring function
Returns:

calcFragment

public java.util.Vector calcFragment(double Syy,
                                     double Szz,
                                     java.util.Vector<Dipolar> vecChRdc,
                                     java.util.Vector<Dipolar> vecNhRdc,
                                     double[] n1,
                                     double[] nh1,
                                     double[] ca1,
                                     int noStart,
                                     int noEnd,
                                     java.util.Vector vecNoesy,
                                     java.util.Vector asgVec,
                                     double csErrH,
                                     double csErrHeavy,
                                     boolean isSkipNOE)
                              throws JampackException
Compute the structure fragment that best fits the RDC and NOESY data. Fitness core is calculated based on RDC RMSD and NOE pattern matching score. For missing RDCs, randomly sample the dihedral angels.

Parameters:
Syy, - Szz: the Saupe element
vecChRdc - an array of CH RDCs for the fragment.
vecNhRdc - an array of NH RDCs for the fragment.
n1 - the direction cosine for amide nitrogen of the first residue.
nh1 - the direction cosine for amide proton.
ca1 - the direction cosine for Ca.
noStart - the residue number of the first residue of a fragment.
noEnd - the residue number of the end residue of a fragment.
vecNoesy - NOESY peak list.
asgVec - resonance list
csErrH, - csErrHeavy error window for protons and heavy atoms (i.e. C13 or N15)
isSkipNOE - whether skip the NOE matching score in the scoring function
Returns:
a vector of Pdb object.
Throws:
JampackException

CompNoePatternScoreBetwSSEAndLoop

public double CompNoePatternScoreBetwSSEAndLoop(double errH,
                                                double errHeavy,
                                                java.util.Vector vecPdbCombin,
                                                double distBound,
                                                java.util.Vector asgVec,
                                                java.util.Vector vecNOESY)
compute NOE pattern between SSE and loops.

Parameters:
errH, - errHeavy: error windows.
vecPdbLoop - loop Pdb
vecPdbSSE - SSE Pdb
distBound - upper bound limit for back-computed NOEs
asgVec - resonance assigment list
vecNOESY - NOESY cross peak list
Returns:

CombineSSEandLoop

public java.util.Vector CombineSSEandLoop(java.util.Vector vecSSEPdb,
                                          java.util.Vector vecLoopPdb)
combine the sse pdb with the loop pdb. For overlap residues, always keep SSE ones.

Parameters:
vecSSEPdb - SSE pdb
vecLoopPdb - loop pdb
Returns:
the pdb after combination

PhiPsiRandomFromRamachandran

public PhiPsi PhiPsiRandomFromRamachandran(java.util.Vector vecSeq,
                                           int resNo)
Randomly sample the (Phi, Psi) angles according to distribution from Ramachandran.

Parameters:
resNo - residue number
vecSeq - sequence information

phiPsiChainAll

public boolean phiPsiChainAll(double[] rdcArrCH,
                              double[] rdcArrNH,
                              int[] isChRDC,
                              int[] isNhRDC,
                              Matrix rg,
                              double Syy,
                              double Szz,
                              int i,
                              int resNo,
                              int N,
                              double[] ppS,
                              java.util.Vector ppVec,
                              boolean rightHand,
                              int resNoStart)
A recusive function to compute all the backbone (phi, psi) angles for a fragment. Modefied from PhiPsi.phiPsiChain();

Parameters:
rdcArrCH - an array of CH RDCs for the fragment
rdcArrNH - an array of NH RDCs for the fragment
isChRDC,isNhRDC - an array indicating whether RDC is available (i.e. not missing).
rg - a matrix to rotate the POF to a coodinate system defined in the first peptide plane.
Syy - Saupe elements computed from both NH and CH rdcs
Szz - Saupe elements computed from both NH and CH rdcs
i - the current depth of the depth-first search. Begin the call with i = 0;
resNo - residue number of current residue;
N - the total depth of the depth-first search.
ppS - a temporary array for saving intermediate (\phi, \psi) angles.
ppVec - an array for saving and returning final (\phi, \psi) angles.
rightHand - make sure the computed rg has the same handedness as the rotating matrix by the SVD method
resNoStart - starting residue index

ReadRamachandranFile

public java.util.Vector ReadRamachandranFile(java.lang.String ssePdbFile)
Read the Ramachandran probability score based on Richardsons' top500 structures.

Parameters:
vecRamachandran - vector of Ramachandran database information
phi - input phi angle value
psi - input psi angle value
Returns:
Vector of PhiPsi objects that store the probabilities of the (phi, psi) angle in the database

CompRamachandranScore

public double CompRamachandranScore(double phi,
                                    double psi,
                                    java.util.Vector vecRamachandran)
Compute the Ramachandran probability score based on Richardsons' top500 structures.

Parameters:
vecRamachandran - vector of Ramachandran database information
phi - input phi angle value, in radian unit
psi - input psi angle value, in radian unit
Returns:
the probability of the (phi, psi) angle in the database

phiCalAll

public java.util.Vector phiCalAll(double Syy,
                                  double Szz,
                                  double rdc,
                                  Matrix Rg)
Compute the Phi angles from RDC equations. Note: Modified from PhiPsi.phiCal(); The difference is that here we don't use the SSE Ramachandran regions to prune phi/psi angles.

Parameters:
rdc - Rdc data of CH vector
rg - the rotation matrix rotate a POF to a frame defined in the peptine plane $i$
Syy - diagonilized Saupe elements computed by SVD with both CH and NH RDCs.
Szz - diagonilized Saupe elements
Returns:
a set of solutions for \phi angles: if the set empty ==> no solution

GetResNameFromSequence

public java.lang.String GetResNameFromSequence(java.util.Vector vecSequence,
                                               int res_no)
get the residue name from the sequence information, given the residue number.

Parameters:
vecSeqence - sequence information
res_no - residue number
Returns:

psiCalAll

public java.util.Vector psiCalAll(double Syy,
                                  double Szz,
                                  double rdc,
                                  double phi,
                                  Matrix rg)
Compute the Psi angles. This is a test method to see if it can reproduce the directional cosines of the CH vector and the \phi angle.

Parameters:
rdc - Rdc data of NH vector
phi - the computed \phi value for the same residue
rg - the rotation matrix rotate a POF to a frame defined in the peptine plane $i$
Syy - diagonilized Saupe elements computed by SVD with both CH and NH RDCs.
Szz - diagonilized Saupe elements
Returns:
a set of solutions for \psi angles: if the set empty ==> no solution

isInPhiPsiClusters

public boolean isInPhiPsiClusters(java.util.Vector vecPhiPsi,
                                  PhiPsi ff,
                                  double resolution)
tell whether a point is within the clusters of previous ensemble

Parameters:
vecPoints - ensemble of point to
cc - the obj point
resolution - resolution of the clustering
Returns:
rmsd