RdcPanda
Class Goal

java.lang.Object
  extended by RdcPanda.Goal

public class Goal
extends java.lang.Object


Nested Class Summary
 class Goal.TreePdb
           
static class Goal.TreePdbAllComparator
           
static class Goal.TreePdbIDComparator
           
static class Goal.TreePdbNOEComparator
           
static class Goal.TreePdbRamaComparator
           
static class Goal.TreePdbRDCComparator
           
static class Goal.TreePdbSumRDCComparator
           
 
Field Summary
 double caliConstant
           
 double gapThreshold
           
 boolean isAllGridSearch
           
 boolean isForward
           
 int maxLeafNodes
           
 double rdcThreshold
           
 java.lang.String rotSrc
           
 double Syy
           
 double Szz
           
 java.util.Vector<Noe> vecAmbNOEs
           
 java.util.Vector<Assign> vecAsg
           
 java.util.Vector<Dipolar> vecChRDC
           
 java.util.Vector<Dipolar> vecNhRDC
           
 java.util.Vector<Noesy> vecNOESY
           
 java.util.Vector<Pdb> vecPdbSSE
           
 java.util.Vector vecRamaAla
           
 java.util.Vector vecRamaGeneral
           
 java.util.Vector vecRamaGly
           
 java.util.Vector vecRamaPrePro
           
 java.util.Vector vecRamaPro
           
 java.util.Vector<Assign> vecSeq
           
 
Constructor Summary
Goal()
           
 
Method Summary
 double CaDistCorrection(java.lang.String res, java.lang.String atom)
          simple steric clash checking, used for checking steric clash between ca atom in rotamers and SSEs
 boolean CheckClashBtwCaNPdb(java.util.Vector vecPdb, int curNo, double[] caPos, int numClashThreshold)
          simple steric clash checking, used for checking steric clash between ca atom in rotamers and SSEs.
 boolean CheckClashBtwRotCaNSSEs(double[] caPos)
          simple steric clash checking, used for checking steric clash between ca atom in rotamers and SSEs
 boolean CheckClashBtwRotCaNSSEsNew(double[] caPos, int numClashThreshold)
          simple steric clash checking, used for checking steric clash between ca atom in rotamers and SSEs.
 boolean CheckFirstResidue(Pdb preHalfPdb, int fixNo, double error, double[] dist)
          check whether the end residue closes the gap.
 boolean CheckFirstResidue(Pdb preHalfPdb, int fixNo, double error, double[] dist, double[] caDist)
          check whether the end residue closes the gap.
 boolean CheckFirstResidueOld(Pdb preHalfPdb, int fixNo, double error, double[] dist)
          check whether the end residue closes the gap.
 boolean CheckFirstResidueOld(Pdb preHalfPdb, int fixNo, double error, double[] dist, double[] caDist)
          check whether the end residue closes the gap.
 boolean CheckKinChainRestraint(Pdb nextHalfPdb, int endResNo, double error)
          check whether kinematic chain restraint is satisfied
 boolean CheckKinChainRestraintBackward(Pdb nextHalfPdb, int startResNo, double error)
          check whether kinematic chain restraint is satisfied
 boolean CheckKinConstraint(double[] caPos, int noStart, int noEnd, int noCur)
          check the kinematic restraint
 boolean CheckLastResidue(Pdb nextHalfPdb, int endResNo, double error, double[] dist)
          check whether the end residue closes the gap
 boolean CheckLastResidue(Pdb nextHalfPdb, int endResNo, double error, double[] dist, double[] distCa)
          check whether the end residue closes the gap
 boolean CheckLastResidueOld(Pdb nextHalfPdb, int endResNo, double error, double[] dist)
          check whether the end residue closes the gap
 boolean CheckLastResidueOld(Pdb nextHalfPdb, int endResNo, double error, double[] dist, double[] distCa)
          check whether the end residue closes the gap
 boolean CheckNOEBtwCaNSSEs(Pdb curPdb, java.util.Vector vecSSEAnchors, double distUpCa)
          check whether the distance satisfies the NOE restraint from ca to anchors in SSEs
 boolean CheckStericClashBtwTwoFragments(java.util.Vector vecPdbA, java.util.Vector vecPdbB)
          simple steric clash checking, only using 1.8 as lower bound.
 double CompNoePatternScoreBetwSSEAndLoop(double errH, double errHeavy, java.util.Vector<Pdb> vecSSEPdb, java.util.Vector<Pdb> vecPdbLoop, double distBound, java.util.Vector asgVec, java.util.Vector vecNOESY)
          compute NOE pattern between SSE and loops.
 int ComputeNoeSatisfaction(double[] caPos, int noCur)
          simple steric clash checking, used for checking steric clash between ca atom in rotamers and SSEs
 boolean CurPhiPsiGridBackwardMinRdcRmsd(java.util.Vector vecCurHalfPdb, int curNo, int startNo, int lastNo, double chRdc, double nhRdc, java.util.Vector vecCurFullPdb, java.util.Vector vecPreHalfPdb, boolean isFirst, int topNodes)
          compute possible phi/psi angles with min RDC RMSD similar to LoopCurResPhiPsiGridSearch function.
 boolean CurPhiPsiGridForwardMinRdcRmsd(java.util.Vector vecCurHalfPdb, int curNo, int startResNo, int endResNo, double chRdc, double nhNextRdc, java.util.Vector vecCurFullPdb, java.util.Vector vecNextHalfPdb, boolean isLast, int topNodes)
          compute possible phi/psi angles with min RDC RMSD similar to LoopCurResPhiPsiGridSearch function.
 void doGoalCalLoops(java.lang.String src, java.lang.String strOut, java.lang.String strInput)
          compute the loop using a gradient search approach (like ccd.)
 void EvaluateCandPositions(int noStart, int noEnd, java.util.Vector vecCandPosAll, java.util.Vector vecPdbRef)
          evaluate the set of candidate positions based on the known reference structure
 void KinNeighborSearch(Pdb PrePdb, int curResNo, int noStart, int noEnd)
          get the candidate positions for each ca atom using kinematic constraints and rotamer replacement find current ca atom candidate positions
 java.util.Vector LoopAllComputation(int noStart, int noEnd)
          compute the loop structures
 java.util.Vector LoopAllComputationBackward(int noStart, int noEnd)
          compute the loop structures from backward direction
 java.util.Vector LoopAllComputationBiDirection(int noStart, int noEnd)
          compute the loop structures from both direction
 boolean LoopCurResPhiPsiExactSearch(java.util.Vector vecCurHalfPdb, int curNo, int startResNo, int endResNo, double chRdc, double nhNextRdc, java.util.Vector vecCurFullPdb, java.util.Vector vecNextHalfPdb, boolean isLast)
          compute possible phi/psi angles for current residue using RDC-EXACT algorithm.
 boolean LoopCurResPhiPsiExactSearchBackward(java.util.Vector vecCurHalfPdb, int curNo, int startNo, int endResNo, double chRdc, double nhRdc, java.util.Vector vecCurFullPdb, java.util.Vector vecPreHalfPdb, boolean isFirst)
          compute possible phi/psi angles for current residue using RDC-EXACT algorithm.
 boolean LoopCurResPhiPsiGridSearch(java.util.Vector vecCurHalfPdb, int curNo, int startResNo, int endResNo, double chRdc, double nhNextRdc, java.util.Vector vecCurFullPdb, java.util.Vector vecNextHalfPdb, boolean isLast)
          compute possible phi/psi angles for current residue when the RDCs are missing.
 boolean LoopCurResPhiPsiGridSearchBackward(java.util.Vector vecCurHalfPdb, int curNo, int startNo, int lastNo, double chRdc, double nhRdc, java.util.Vector vecCurFullPdb, java.util.Vector vecPreHalfPdb, boolean isFirst)
          compute possible phi/psi angles for current residue when the RDCs are missing.
 boolean LoopFirstHalfResPsiGridSearch(int startNo, int endResNo, double nhNextRdc, java.util.Vector vecCurFullPdb, java.util.Vector vecNextHalfPdb)
          compute possible psi angles for the first half residue.
 boolean LoopLastHalfResPsiGridSearch(int startNo, int endResNo, double nhRdc, double chRdc, java.util.Vector vecCurFullPdb, java.util.Vector vecPreHalfPdb)
          compute possible psi angles for the last half residue, which will be used to compute the second half fragment in a backward way.
 java.util.Vector LoopLocalGapClosure(java.util.Vector vecLoopOldPdb, int noStart, int noEnd)
          use the gradient search to close the gap, while statisfying the NOE restraints
 java.util.Vector LoopLocalGapClosureBackward(java.util.Vector vecLoopOldPdb, int noStart, int noEnd)
          use the gradient search to close the gap, for backward computation
static void main(java.lang.String[] args)
           
 java.util.Vector MergeTwoFragmentIntoOne(java.util.Vector vecPdbEnsemb1, java.util.Vector vecPdbEnsemb2, double error, int noStart, int noEnd, int noMiddle, boolean isFirstHalf)
          Merge two framgements computed using backward and forward ways into one fragment
 java.util.Vector myPdbVectorCopy(java.util.Vector vecSrc)
           
 java.util.Vector OutputEnsemblePdbs(java.util.Vector vecFinalTreePdb, int noStart, int noEnd, double distUpCa)
          compute the structure fragment that best fits the NOE restraints.
 java.util.Vector OutputEnsemblePdbsBackward(java.util.Vector vecFinalTreePdb, int noStart, int noEnd, double distUpCa)
          compute the structure fragment that best fits the NOE restraints.
 void PdbGenerateFromTree(java.util.Vector vecAllPdbTree)
           
 void PlaneClustering(double resol, java.util.Vector<Goal.TreePdb> vecCurTreePdb, java.util.Vector<Goal.TreePdb> vecNextTreePdb)
          clustering the first peptide plane, including ca, n, hn atoms.
 void PlaneClusteringAndTopSelection(double resol, java.util.Vector<Goal.TreePdb> vecCurTreePdb, java.util.Vector<Goal.TreePdb> vecNextTreePdb, int topNum)
          clustering the first peptide plane, including ca, n, hn atoms, and selecting the top planes.
 void PlaneClusteringAndTopSelectionNOEs(double resol, java.util.Vector<Goal.TreePdb> vecCurTreePdb, java.util.Vector<Goal.TreePdb> vecNextTreePdb, int topNum, int noStart, boolean isForward)
          clustering the first peptide plane, including ca, n, hn atoms, and selecting the top planes.
 void PlaneClusteringBackward(double resol, java.util.Vector<Goal.TreePdb> vecCurTreePdb, java.util.Vector<Goal.TreePdb> vecPreTreePdb)
          clustering the first peptide plane, including ca, n, hn atoms.
 java.util.Vector RotamerReplacement(int noStart, int noEnd)
          Compute a structure, given the backbone and rotamers at all residue positions
 void RotamerReplacementKin(int noStart, int noEnd)
          get the candidate positions for each ca atom using kinematic constraints and rotamer replacement
 java.util.Vector RotamerReplacementOld(int noStart, int noEnd)
          Compute a structure, given the backbone and rotamers at all residue positions
 java.util.Vector SampleFirstHalfPlanes(int resNoFix, boolean isSampleInitPlane)
          use the grid search to find the set of variated peptide planes of the first residue
 java.util.Vector<Pdb> SearchSSEAnchors(int topK, int resNoLoop)
          find the SSE anchors (ca atoms) that can possibly interact with loops
 java.util.Vector<Pdb> SearchSSEAnchorsTop(int topK, int resNoLoop)
          find the top set of SSE anchors (ca atoms) that can possibly interact with loops
 double TranRotGridSearch(double[] tranX0, double[] tranXn, double[] rotX0, double[] rotXn, java.util.Vector<Pdb> vecRotPdb, double tranResol, double rotResol, boolean isCheckClash, double[] translation, double[] rotation)
          search T(3)*S(3) space to find the optimal solution that best fits the NOESY data
 double TranRotGridSearchNew(double[] caSSE, double[] tranX0, double[] tranXn, double[] tranResol, double[] translation, int noStart, int noEnd, int noCur, java.util.Vector<RotaPattern> vecCandPos)
          search T(3)*S(3) space to find the optimal solution that best fits the NOESY data Use euler angle rather than grid points.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vecSeq

public java.util.Vector<Assign> vecSeq

vecPdbSSE

public java.util.Vector<Pdb> vecPdbSSE

rotSrc

public java.lang.String rotSrc

vecAsg

public java.util.Vector<Assign> vecAsg

vecNOESY

public java.util.Vector<Noesy> vecNOESY

caliConstant

public double caliConstant

vecAmbNOEs

public java.util.Vector<Noe> vecAmbNOEs

Syy

public double Syy

Szz

public double Szz

isForward

public boolean isForward

isAllGridSearch

public boolean isAllGridSearch

gapThreshold

public double gapThreshold

rdcThreshold

public double rdcThreshold

vecNhRDC

public java.util.Vector<Dipolar> vecNhRDC

vecChRDC

public java.util.Vector<Dipolar> vecChRDC

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

maxLeafNodes

public int maxLeafNodes
Constructor Detail

Goal

public Goal()
Method Detail

SearchSSEAnchors

public java.util.Vector<Pdb> SearchSSEAnchors(int topK,
                                              int resNoLoop)
find the SSE anchors (ca atoms) that can possibly interact with loops

Parameters:
topK - the top number of ca atoms based on the number of ambiguous NOE assignments.
resNoLoop - the index of the loop residue
Returns:
a vector of SSE PDB anchors.

SearchSSEAnchorsTop

public java.util.Vector<Pdb> SearchSSEAnchorsTop(int topK,
                                                 int resNoLoop)
find the top set of SSE anchors (ca atoms) that can possibly interact with loops

Parameters:
topK - the top number of ca atoms based on the number of ambiguous NOE assignments.
resNoLoop - the index of the loop residue
Returns:
a vector of SSE PDB anchors.

TranRotGridSearchNew

public double TranRotGridSearchNew(double[] caSSE,
                                   double[] tranX0,
                                   double[] tranXn,
                                   double[] tranResol,
                                   double[] translation,
                                   int noStart,
                                   int noEnd,
                                   int noCur,
                                   java.util.Vector<RotaPattern> vecCandPos)
search T(3)*S(3) space to find the optimal solution that best fits the NOESY data Use euler angle rather than grid points.

Parameters:
tranX0,tranXn, - coordinate boundary for translation
rotX0, - rotXn coordinate boundary for rotation (unit: degree)
rotPdb - original rotamer pdb
tranResol - grid resolution of translation
rotResol - grid resolution of rotation
isCheckClash - whether check the steric clash,not used so far
-
Returns:
the best score, and the optimal translation and rotation,including translation and rotation.

TranRotGridSearch

public double TranRotGridSearch(double[] tranX0,
                                double[] tranXn,
                                double[] rotX0,
                                double[] rotXn,
                                java.util.Vector<Pdb> vecRotPdb,
                                double tranResol,
                                double rotResol,
                                boolean isCheckClash,
                                double[] translation,
                                double[] rotation)
search T(3)*S(3) space to find the optimal solution that best fits the NOESY data

Parameters:
tranX0,tranXn, - coordinate boundary for translation
rotX0, - rotXn coordinate boundary for rotation (unit: degree)
rotPdb - original rotamer pdb
tranResol - grid resolution of translation
rotResol - grid resolution of rotation
isCheckClash - whether check the steric clash,not used so far
-
Returns:
the best score, and the optimal translation and rotation,including translation and rotation.

CompNoePatternScoreBetwSSEAndLoop

public double CompNoePatternScoreBetwSSEAndLoop(double errH,
                                                double errHeavy,
                                                java.util.Vector<Pdb> vecSSEPdb,
                                                java.util.Vector<Pdb> vecPdbLoop,
                                                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:

CheckStericClashBtwTwoFragments

public boolean CheckStericClashBtwTwoFragments(java.util.Vector vecPdbA,
                                               java.util.Vector vecPdbB)
simple steric clash checking, only using 1.8 as lower bound.

Parameters:
-
-
-
-
Returns:
true if there is serious clash, otherwise return false.

CheckKinConstraint

public boolean CheckKinConstraint(double[] caPos,
                                  int noStart,
                                  int noEnd,
                                  int noCur)
check the kinematic restraint

Parameters:
caPos - current ca atom coordinates
noStart,noEnd - staring and end residue numbers of the loop (fixed endpoints)
noCur - current residue number
-
Returns:
true if kin restraint is satisfied, otherwise return false.

CaDistCorrection

public double CaDistCorrection(java.lang.String res,
                               java.lang.String atom)
simple steric clash checking, used for checking steric clash between ca atom in rotamers and SSEs

Parameters:
caPos - expected ca atom position of the rotamer
noCur - current residue number
-
-
Returns:
NOE satisfaction score.

ComputeNoeSatisfaction

public int ComputeNoeSatisfaction(double[] caPos,
                                  int noCur)
simple steric clash checking, used for checking steric clash between ca atom in rotamers and SSEs

Parameters:
caPos - expected ca atom position of the rotamer
noCur - current residue number
-
-
Returns:
NOE satisfaction score.

CheckNOEBtwCaNSSEs

public boolean CheckNOEBtwCaNSSEs(Pdb curPdb,
                                  java.util.Vector vecSSEAnchors,
                                  double distUpCa)
check whether the distance satisfies the NOE restraint from ca to anchors in SSEs

Parameters:
curPdb - current residue
vecSSEAnchors - list of anchored residues in SSEs
distUpCa - distance upper bound for checking the NOE distance between Ca atoms
-
Returns:
true if the distance between ca atoms is < distUpCa, otherwise return false.

CheckClashBtwRotCaNSSEs

public boolean CheckClashBtwRotCaNSSEs(double[] caPos)
simple steric clash checking, used for checking steric clash between ca atom in rotamers and SSEs

Parameters:
-
-
-
-
Returns:
true if there is serious clash, otherwise return false.

CheckClashBtwRotCaNSSEsNew

public boolean CheckClashBtwRotCaNSSEsNew(double[] caPos,
                                          int numClashThreshold)
simple steric clash checking, used for checking steric clash between ca atom in rotamers and SSEs.

Parameters:
-
-
-
-
Returns:
true if there is serious clash, otherwise return false.

CheckClashBtwCaNPdb

public boolean CheckClashBtwCaNPdb(java.util.Vector vecPdb,
                                   int curNo,
                                   double[] caPos,
                                   int numClashThreshold)
simple steric clash checking, used for checking steric clash between ca atom in rotamers and SSEs.

Parameters:
-
-
-
-
Returns:
true if there is serious clash, otherwise return false.

KinNeighborSearch

public void KinNeighborSearch(Pdb PrePdb,
                              int curResNo,
                              int noStart,
                              int noEnd)
get the candidate positions for each ca atom using kinematic constraints and rotamer replacement find current ca atom candidate positions

Parameters:
vecPrePdb - the whole structure computed in previous round
curResNo - current residue number
noStart - the first residue number in the loop fragment
noEnd - the end residue number in the loop fragment

RotamerReplacementKin

public void RotamerReplacementKin(int noStart,
                                  int noEnd)
get the candidate positions for each ca atom using kinematic constraints and rotamer replacement

Parameters:
noStart - starting residue number of the loop
noEnd - last residue number of the loop

LoopLocalGapClosure

public java.util.Vector LoopLocalGapClosure(java.util.Vector vecLoopOldPdb,
                                            int noStart,
                                            int noEnd)
use the gradient search to close the gap, while statisfying the NOE restraints

Parameters:
vecCurHalfPdb - the set of all possible half planes for current residue
curNo - current residue number
chRdc,nhNextRdc: - at least one is missing (with the value -99999.9)
isLast - whether this is the last residue in the loop.
Returns:
vecNextHalfPdb the set of all possible half planes for the next residue

LoopLocalGapClosureBackward

public java.util.Vector LoopLocalGapClosureBackward(java.util.Vector vecLoopOldPdb,
                                                    int noStart,
                                                    int noEnd)
use the gradient search to close the gap, for backward computation

Parameters:
vecCurHalfPdb - the set of all possible half planes for current residue
curNo - current residue number
chRdc,nhNextRdc: - at least one is missing (with the value -99999.9)
isLast - whether this is the last residue in the loop.
Returns:
vecNextHalfPdb the set of all possible half planes for the next residue

LoopCurResPhiPsiGridSearch

public boolean LoopCurResPhiPsiGridSearch(java.util.Vector vecCurHalfPdb,
                                          int curNo,
                                          int startResNo,
                                          int endResNo,
                                          double chRdc,
                                          double nhNextRdc,
                                          java.util.Vector vecCurFullPdb,
                                          java.util.Vector vecNextHalfPdb,
                                          boolean isLast)
compute possible phi/psi angles for current residue when the RDCs are missing. search the loop phi/psi angles over using grid search

Parameters:
vecCurHalfPdb - the set of all possible half planes for current residue
curNo - current residue number
chRdc,nhNextRdc: - at least one is missing (with the value -99999.9)
isLast - whether this is the last residue in the loop.
Returns:
vecNextHalfPdb the set of all possible half planes for the next residue

CurPhiPsiGridForwardMinRdcRmsd

public boolean CurPhiPsiGridForwardMinRdcRmsd(java.util.Vector vecCurHalfPdb,
                                              int curNo,
                                              int startResNo,
                                              int endResNo,
                                              double chRdc,
                                              double nhNextRdc,
                                              java.util.Vector vecCurFullPdb,
                                              java.util.Vector vecNextHalfPdb,
                                              boolean isLast,
                                              int topNodes)
compute possible phi/psi angles with min RDC RMSD similar to LoopCurResPhiPsiGridSearch function. search the loop phi/psi angles over using grid search

Parameters:
vecCurHalfPdb - the set of all possible half planes for current residue
curNo - current residue number
chRdc,nhNextRdc: - at least one is missing (with the value -99999.9)
isLast - whether this is the last residue in the loop.
topNodes - top number of leaf nodes
Returns:
vecNextHalfPdb the set of all possible half planes for the next residue

CurPhiPsiGridBackwardMinRdcRmsd

public boolean CurPhiPsiGridBackwardMinRdcRmsd(java.util.Vector vecCurHalfPdb,
                                               int curNo,
                                               int startNo,
                                               int lastNo,
                                               double chRdc,
                                               double nhRdc,
                                               java.util.Vector vecCurFullPdb,
                                               java.util.Vector vecPreHalfPdb,
                                               boolean isFirst,
                                               int topNodes)
compute possible phi/psi angles with min RDC RMSD similar to LoopCurResPhiPsiGridSearch function. search the loop phi/psi angles over using grid search

Parameters:
vecCurHalfPdb - the set of all possible half planes for current residue
curNo - current residue number
chRdc,nhNextRdc: - at least one is missing (with the value -99999.9)
isFirst - whether this is the first residue in the loop.
topNodes - top number of leaf nodes
Returns:
vecNextHalfPdb the set of all possible half planes for the next residue

LoopCurResPhiPsiGridSearchBackward

public boolean LoopCurResPhiPsiGridSearchBackward(java.util.Vector vecCurHalfPdb,
                                                  int curNo,
                                                  int startNo,
                                                  int lastNo,
                                                  double chRdc,
                                                  double nhRdc,
                                                  java.util.Vector vecCurFullPdb,
                                                  java.util.Vector vecPreHalfPdb,
                                                  boolean isFirst)
compute possible phi/psi angles for current residue when the RDCs are missing. search the loop phi/psi angles over using grid search

Parameters:
vecCurHalfPdb - the set of all possible half planes for current residue
curNo - current residue number
chRdc,nhRdc: - at least one is missing (with the value -99999.9)
isLast - whether this is the last residue in the loop.
Returns:
vecNextHalfPdb the set of all possible half planes for the next residue

SampleFirstHalfPlanes

public java.util.Vector SampleFirstHalfPlanes(int resNoFix,
                                              boolean isSampleInitPlane)
use the grid search to find the set of variated peptide planes of the first residue

Parameters:
resNoFix - the residue number of fixed residue of the loop.
isSampleInitPlane - whether sampling the init peptite plane positions
Returns:
the set of all possible atom positions for the first half planes

LoopFirstHalfResPsiGridSearch

public boolean LoopFirstHalfResPsiGridSearch(int startNo,
                                             int endResNo,
                                             double nhNextRdc,
                                             java.util.Vector vecCurFullPdb,
                                             java.util.Vector vecNextHalfPdb)
compute possible psi angles for the first half residue. use the grid search approach

Parameters:
curNo - current residue number
chRdc,nhNextRdc: - at least one is missing (with the value -99999.9)
isLast - whether this is the last residue in the loop.
Returns:
vecNextHalfPdb the set of all possible half planes for the next residue

LoopLastHalfResPsiGridSearch

public boolean LoopLastHalfResPsiGridSearch(int startNo,
                                            int endResNo,
                                            double nhRdc,
                                            double chRdc,
                                            java.util.Vector vecCurFullPdb,
                                            java.util.Vector vecPreHalfPdb)
compute possible psi angles for the last half residue, which will be used to compute the second half fragment in a backward way. *

Parameters:
curNo - current residue number
chRdc,nhRdc: - at least one is missing (with the value -99999.9)
isLast - whether this is the last residue in the loop.
Returns:
vecNextHalfPdb the set of all possible half planes for the next residue

CheckLastResidueOld

public boolean CheckLastResidueOld(Pdb nextHalfPdb,
                                   int endResNo,
                                   double error,
                                   double[] dist)
check whether the end residue closes the gap

Parameters:
-
nextHalfPdb - end residue computed from loop
error - threshold for checking whether the gap is closed
endResNo - end residue no in SSE.
Returns:
true if it closes the gap, otherwise return false.

CheckLastResidue

public boolean CheckLastResidue(Pdb nextHalfPdb,
                                int endResNo,
                                double error,
                                double[] dist)
check whether the end residue closes the gap

Parameters:
-
nextHalfPdb - end residue computed from loop
error - threshold for checking whether the gap is closed
endResNo - end residue no in SSE.
Returns:
true if it closes the gap, otherwise return false.

CheckLastResidue

public boolean CheckLastResidue(Pdb nextHalfPdb,
                                int endResNo,
                                double error,
                                double[] dist,
                                double[] distCa)
check whether the end residue closes the gap

Parameters:
-
nextHalfPdb - end residue computed from loop
error - threshold for checking whether the gap is closed
endResNo - end residue no in SSE.
Returns:
true if it closes the gap, otherwise return false.

CheckLastResidueOld

public boolean CheckLastResidueOld(Pdb nextHalfPdb,
                                   int endResNo,
                                   double error,
                                   double[] dist,
                                   double[] distCa)
check whether the end residue closes the gap

Parameters:
-
nextHalfPdb - end residue computed from loop
error - threshold for checking whether the gap is closed
endResNo - end residue no in SSE.
Returns:
true if it closes the gap, otherwise return false.

CheckFirstResidue

public boolean CheckFirstResidue(Pdb preHalfPdb,
                                 int fixNo,
                                 double error,
                                 double[] dist,
                                 double[] caDist)
check whether the end residue closes the gap. For backward bb calculation.

Parameters:
-
nextHalfPdb - end residue computed from loop
error - threshold for checking whether the gap is closed
endResNo - end residue no in SSE.
Returns:
true if it closes the gap, otherwise return false.

CheckFirstResidue

public boolean CheckFirstResidue(Pdb preHalfPdb,
                                 int fixNo,
                                 double error,
                                 double[] dist)
check whether the end residue closes the gap. For backward bb calculation.

Parameters:
-
nextHalfPdb - end residue computed from loop
error - threshold for checking whether the gap is closed
endResNo - end residue no in SSE.
Returns:
true if it closes the gap, otherwise return false.

CheckFirstResidueOld

public boolean CheckFirstResidueOld(Pdb preHalfPdb,
                                    int fixNo,
                                    double error,
                                    double[] dist,
                                    double[] caDist)
check whether the end residue closes the gap. For backward bb calculation.

Parameters:
-
nextHalfPdb - end residue computed from loop
error - threshold for checking whether the gap is closed
endResNo - end residue no in SSE.
Returns:
true if it closes the gap, otherwise return false.

CheckFirstResidueOld

public boolean CheckFirstResidueOld(Pdb preHalfPdb,
                                    int fixNo,
                                    double error,
                                    double[] dist)
check whether the end residue closes the gap. For backward bb calculation.

Parameters:
-
nextHalfPdb - end residue computed from loop
error - threshold for checking whether the gap is closed
endResNo - end residue no in SSE.
Returns:
true if it closes the gap, otherwise return false.

CheckKinChainRestraint

public boolean CheckKinChainRestraint(Pdb nextHalfPdb,
                                      int endResNo,
                                      double error)
check whether kinematic chain restraint is satisfied

Parameters:
-
nextHalfPdb - end residue computed from loop
error - threshold
endResNo - end residue no in SSE.
Returns:
true if it closes the gap, otherwise return false.

CheckKinChainRestraintBackward

public boolean CheckKinChainRestraintBackward(Pdb nextHalfPdb,
                                              int startResNo,
                                              double error)
check whether kinematic chain restraint is satisfied

Parameters:
-
nextHalfPdb - end residue computed from loop
error - threshold
endResNo - end residue no in SSE.
Returns:
true if it closes the gap, otherwise return false.

OutputEnsemblePdbs

public java.util.Vector OutputEnsemblePdbs(java.util.Vector vecFinalTreePdb,
                                           int noStart,
                                           int noEnd,
                                           double distUpCa)
compute the structure fragment that best fits the NOE restraints.

Parameters:
vecFinalTreePdb - storing all possible pdbs for the final residue
noStart, - noEnd, end residue numbers
distUpCa - distance upper bound between ca atoms
Returns:

OutputEnsemblePdbsBackward

public java.util.Vector OutputEnsemblePdbsBackward(java.util.Vector vecFinalTreePdb,
                                                   int noStart,
                                                   int noEnd,
                                                   double distUpCa)
compute the structure fragment that best fits the NOE restraints.

Parameters:
vecFinalTreePdb - storing all possible pdbs for the final residue
noStart, - noEnd, end residue numbers
distUpCa - distance upper bound between ca atoms
Returns:

LoopAllComputation

public java.util.Vector LoopAllComputation(int noStart,
                                           int noEnd)
compute the loop structures

Parameters:
noStart - starting residue, in SSE
noEnd - last residue, in SSE
Returns:
a vector storing all candidate positions.

LoopAllComputationBiDirection

public java.util.Vector LoopAllComputationBiDirection(int noStart,
                                                      int noEnd)
compute the loop structures from both direction

Parameters:
noStart - starting residue, in SSE
noEnd - last residue, in SSE
Returns:
a vector storing all candidate positions.

LoopAllComputationBackward

public java.util.Vector LoopAllComputationBackward(int noStart,
                                                   int noEnd)
compute the loop structures from backward direction

Parameters:
noStart - starting residue, in SSE
noEnd - last residue, in SSE
Returns:
a vector storing all candidate positions.

MergeTwoFragmentIntoOne

public java.util.Vector MergeTwoFragmentIntoOne(java.util.Vector vecPdbEnsemb1,
                                                java.util.Vector vecPdbEnsemb2,
                                                double error,
                                                int noStart,
                                                int noEnd,
                                                int noMiddle,
                                                boolean isFirstHalf)
Merge two framgements computed using backward and forward ways into one fragment

Parameters:
vecPdbEnsemb1 - ensemble of the the first fragment
vecPdbEnsemb2 - ensemble of the the second fragment
error - error shreshold for connecting two ca atoms
isFirstHalf - whether the first half of the first fragment is aligned.
Returns:
vecAllPdbs ensemble of final PDBs

PdbGenerateFromTree

public void PdbGenerateFromTree(java.util.Vector vecAllPdbTree)

LoopCurResPhiPsiExactSearch

public boolean LoopCurResPhiPsiExactSearch(java.util.Vector vecCurHalfPdb,
                                           int curNo,
                                           int startResNo,
                                           int endResNo,
                                           double chRdc,
                                           double nhNextRdc,
                                           java.util.Vector vecCurFullPdb,
                                           java.util.Vector vecNextHalfPdb,
                                           boolean isLast)
compute possible phi/psi angles for current residue using RDC-EXACT algorithm.

Parameters:
vecPrePdb - vector to store all possible current planes, given previous residue
int - curNo current residue number
chRdc - ch rdc of current residue
nhNextRDC - nh rdc of the next residue
Returns:
vecAllPdbs ensemble of all PDBs

LoopCurResPhiPsiExactSearchBackward

public boolean LoopCurResPhiPsiExactSearchBackward(java.util.Vector vecCurHalfPdb,
                                                   int curNo,
                                                   int startNo,
                                                   int endResNo,
                                                   double chRdc,
                                                   double nhRdc,
                                                   java.util.Vector vecCurFullPdb,
                                                   java.util.Vector vecPreHalfPdb,
                                                   boolean isFirst)
compute possible phi/psi angles for current residue using RDC-EXACT algorithm. Use a backward approach.

Parameters:
vecPrePdb - vector to store all possible current planes, given previous residue
int - curNo current residue number
chRdc - ch rdc of current residue
nhNextRDC - nh rdc of the next residue
Returns:
vecAllPdbs ensemble of all PDBs

PlaneClustering

public void PlaneClustering(double resol,
                            java.util.Vector<Goal.TreePdb> vecCurTreePdb,
                            java.util.Vector<Goal.TreePdb> vecNextTreePdb)
clustering the first peptide plane, including ca, n, hn atoms.

Parameters:
-
-

PlaneClusteringBackward

public void PlaneClusteringBackward(double resol,
                                    java.util.Vector<Goal.TreePdb> vecCurTreePdb,
                                    java.util.Vector<Goal.TreePdb> vecPreTreePdb)
clustering the first peptide plane, including ca, n, hn atoms. For backward backbone computation.

Parameters:
-
-

PlaneClusteringAndTopSelection

public void PlaneClusteringAndTopSelection(double resol,
                                           java.util.Vector<Goal.TreePdb> vecCurTreePdb,
                                           java.util.Vector<Goal.TreePdb> vecNextTreePdb,
                                           int topNum)
clustering the first peptide plane, including ca, n, hn atoms, and selecting the top planes.

Parameters:
resol -
vecCurTreePdb,vecNextTreePdb -
topNum - number of top selected planes.

PlaneClusteringAndTopSelectionNOEs

public void PlaneClusteringAndTopSelectionNOEs(double resol,
                                               java.util.Vector<Goal.TreePdb> vecCurTreePdb,
                                               java.util.Vector<Goal.TreePdb> vecNextTreePdb,
                                               int topNum,
                                               int noStart,
                                               boolean isForward)
clustering the first peptide plane, including ca, n, hn atoms, and selecting the top planes. similar to PlaneClusteringAndTopSelection, but with additional NOE pattern score.

Parameters:
resol -
vecCurTreePdb,vecNextTreePdb -
topNum - number of top selected planes.
noStart - residue num of end
isForward - whether is forward or backward, 1 if forward.

RotamerReplacement

public java.util.Vector RotamerReplacement(int noStart,
                                           int noEnd)
Compute a structure, given the backbone and rotamers at all residue positions

Parameters:
noStart - starting residue number of the loop
noEnd - last residue number of the loop
Returns:
a vector storing all candidate positions.

RotamerReplacementOld

public java.util.Vector RotamerReplacementOld(int noStart,
                                              int noEnd)
Compute a structure, given the backbone and rotamers at all residue positions

Parameters:
noStart - starting residue number of the loop
noEnd - last residue number of the loop
Returns:
a vector storing all candidate positions.

EvaluateCandPositions

public void EvaluateCandPositions(int noStart,
                                  int noEnd,
                                  java.util.Vector vecCandPosAll,
                                  java.util.Vector vecPdbRef)
evaluate the set of candidate positions based on the known reference structure

Parameters:
noStart,noEnd - endpoints of the loop
vecCandPosAll - the chain of all candidate positions
vecPdbRef - reference structure pdb (under the same frame)

myPdbVectorCopy

public java.util.Vector myPdbVectorCopy(java.util.Vector vecSrc)

main

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

doGoalCalLoops

public void doGoalCalLoops(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