RdcPanda
Class ModelRdc

java.lang.Object
  extended by RdcPanda.ModelRdc
All Implemented Interfaces:
java.lang.Cloneable

public class ModelRdc
extends java.lang.Object
implements java.lang.Cloneable

A program for computing all the backbond dihedral ($\phi$, $\psi$) angles of an $\alpha$-helix or a $\beta$-strand based on exact solution and a systematic search. The computed dihedral angles will (a) satisfy the experimental CH and NH RDCs as well as possible and (b) simultaneously have the ($\phi$, $\psi$) angles as close as possible to their average values in the PDB. However, the minimum is defined with respect to the all the backbone angles and all the RDCs for a secondary element, not just one residue. Please see the paper for the detail. In other words, the target function consists of terms representing, respectively, the deviation from the average helix and the deviation from the measured RDCs. Also included are programs for building models from a sequence of ($\phi, \psi$) angles and eight backbone angles with values beings set to be their averages extracted from 23 ultra-high resolution PDBS with protons built in. Written by Lincong Wang (2001-2005) and Jianyang (Michael) Zeng (2005-2009).


Nested Class Summary
static class ModelRdc.mdComparator
          The Class mdComparator.
 
Constructor Summary
ModelRdc()
          Instantiates a new model rdc.
ModelRdc(int No)
          Instantiates a new model rdc.
ModelRdc(int no, java.lang.String re, double x, double y)
          Instantiates a new model rdc.
 
Method Summary
 double[] addCoords(double[] n1, double[] n2)
          adding two vectors.
 Pdb coordByBackward(double phi, double psi, double[] n1, double[] nh1, double[] ca1, int residueNo, java.lang.String resid1)
          A method for computing coordinates of backbone atoms backward: with direasing residue no.
 java.util.Vector coordByBackwardNew(double phi, double psi, double[] n1, double[] nh1, double[] ca1, int residueNo)
          By Michael Zeng.
 Pdb coordByResidue(double phi, double psi, double[] n1, double[] nh1, double[] ca1, int residueNo, java.lang.String resid1, boolean first)
          A method for computing coordinates of backbone atoms.
 Pdb coordByResidueFull(double phi, double psi, double[] n1, double[] nh1, double[] ca1, int residueNo, java.lang.String resid1, boolean first)
          *A method for computing coordinates of backbone atoms, including all backbone atoms, ha, ca, n, hn, cb,c o.
 double[] dirCos(double[] vec)
          cal the directioal cosines of the vector vec.
 double getPhi()
          Gets the phi.
 double getPsi()
          Gets the psi.
 java.lang.String getResidue()
          Gets the residue.
 int getResidueNo()
          Gets the residue no.
 double[][] haCoCoords(double phi, double[] n1, double[] nh1, double[] ca1)
          A method for computing coordinates of backbone atoms.
 double[][] haCoCoords(double phi, double[] n1, double[] nh1, double[] ca1, boolean first)
          A method for computing coordinates of backbone atoms.
 double interAngle(double[] v1, double[] v2)
          calculate the angles between two vectors v1 and v2 The returned angle is in the [0,Pi] range.
 double[] internuclearVec(double[] n1, double[] n2)
          Compute the internuclear vector between two atoms.
 double length(double[] v1)
          compute the length of a vector v1.
 java.util.Vector minBeta(java.util.Vector rdcVec1, java.util.Vector rdcVec2, double[] rdc1Cal, double[] rdc2Cal, java.util.Vector pdbVec2, double Syy, double Szz, double rmsd1, double rmsd2, java.util.Vector pdbS1, java.util.Vector hbVecOfE12, int nCycle, double weight4Angles, double hbWeight, boolean debugDFS, boolean printResults)
          A recusive function to compute all the backbone Phi/Psi for an n-residue fragment.
 java.util.Vector minBeta2(java.util.Vector rdcVec1, java.util.Vector rdcVec2, double[] rdc1Cal, double[] rdc2Cal, java.util.Vector pdbVec2, double Syy, double Szz, double rmsd1, double rmsd2, java.util.Vector pdbS1, java.util.Vector pdbS2, java.util.Vector hbVecOfE12, java.util.Vector hbVecOfE13, int nCycle, double weight4Angles, double hbWeight, boolean debugDFS, boolean printResults)
          A recusive function to compute all the backbone Phi/Psi for an n-residue fragment.
 java.util.Vector minHelix_old(java.util.Vector rdcVec1, java.util.Vector rdcVec2, double[] rdc1Cal, double[] rdc2Cal, java.util.Vector pdbVec, double Syy, double Szz, double rmsd1, double rmsd2, int nCycle, double weightAngles, boolean debugDFS, boolean printResults, boolean isHelix)
          A recusive function to compute all the backbone Phi/Psi for an n-residue fragment.
 java.util.Vector<Pdb> minHelix(java.util.Vector<Dipolar> rdcVec1, java.util.Vector<Dipolar> rdcVec2, double[] rdc1Cal, double[] rdc2Cal, java.util.Vector<Pdb> pdbVec, double Syy, double Szz, double rmsd1, double rmsd2, int nCycle, double weightAngles, boolean debugDFS, boolean printResults, boolean isHelix)
          A recusive function to compute all the backbone Phi/Psi for an n-residue helix or the first strand.
 java.util.Vector<Pdb> minHelix(java.util.Vector<Dipolar> rdcVec1, java.util.Vector<Dipolar> rdcVec2, double[] rdc1Cal, double[] rdc2Cal, java.util.Vector<Pdb> pdbVec, double Syy, double Szz, double rmsd1, double rmsd2, int nCycle, double weightAngles, boolean debugDFS, boolean printResults, boolean isHelix, double[] NhRdcRmsd, double[] ChRdcRmsd)
          A recusive function to compute all the backbone Phi/Psi for an n-residue helix or the first strand.
 java.util.Vector<Pdb> minHelix(java.util.Vector<Dipolar> rdcVec1, java.util.Vector<Dipolar> rdcVec2, double[] rdc1Cal, double[] rdc2Cal, java.util.Vector<Pdb> pdbVec, double Syy, double Szz, double rmsd1, double rmsd2, int nCycle, double weightAngles, boolean debugDFS, boolean printResults, boolean isHelix, java.util.Vector vecTalos)
          A recusive function to compute all the backbone Phi/Psi for an n-residue helix or the first strand.
 java.util.Vector<Pdb> minHelix4RDCs(java.util.Vector<Dipolar> rdcVec1, java.util.Vector<Dipolar> rdcVec2, java.util.Vector<Dipolar> helixRdcCaCoVec, java.util.Vector<Dipolar> helixRdcCoNVec, double[] rdc1Cal, double[] rdc2Cal, java.util.Vector<Pdb> pdbVec, double Syy, double Szz, double rmsd1, double rmsd2, int nCycle, double weightAngles, boolean debugDFS, boolean printResults, boolean isHelix, java.util.Vector vecTalos, double wtCoCa, double wtCoN)
          A recusive function to compute all the backbone Phi/Psi for an n-residue helix or the first strand.
 java.util.Vector<Pdb> minHelix4RDCs(java.util.Vector<Pdb> vecPrePdb, java.util.Vector<Dipolar> rdcVec1, java.util.Vector<Dipolar> rdcVec2, java.util.Vector<Dipolar> helixRdcCaCoVec, java.util.Vector<Dipolar> helixRdcCoNVec, double[] rdc1Cal, double[] rdc2Cal, java.util.Vector<Pdb> pdbVec, double Syy, double Szz, double rmsd1, double rmsd2, int nCycle, double weightAngles, boolean debugDFS, boolean printResults, boolean isHelix, java.util.Vector vecTalos, double wtCoCa, double wtCoN, int startNo, int endNo, java.util.Vector vecSeq)
          A recusive function to compute all the backbone Phi/Psi for an n-residue helix or the first strand.
 java.util.Vector minTurns(java.util.Vector h1Vec, java.util.Vector asgVec, java.util.Vector pdbVec1, java.util.Vector pdbVec2, java.util.Vector rdcVec1, java.util.Vector rdcVec2, double Syy, double Szz, int no1, int no2, double a1, double a2)
          Compute the turns based on NOEs and RDCs.
 java.util.Vector modelBuild(double[] phiArr, double[] psiArr, double[] n1, double[] nh1, double[] ca1, int no1, boolean first)
          Build model (compute the coordinates of backbone atoms (N, NH, CA, CO, O and HA) from the standard geometry and Phi/Psi angle.
 java.util.Vector modelBuild(java.util.Vector phiPsiVec, double[] n1, double[] nh1, double[] ca1)
          Build model (compute the coordinates of backbone atoms (N, NH, CA, CO, O and HA) from the standard geometry and Phi/Psi angle.
 java.util.Vector modelBuild(java.util.Vector phiPsiVec, double[] n1, double[] nh1, double[] ca1, boolean isLink)
          Model build.
 java.util.Vector modelBuildLoopBackward(java.util.Vector phiPsiVec, double[] nCoord, double[] nhCoord, double[] caCoord, int startNo, int endNo)
          By Michael Zeng.
 double[][] nNhCaCal(double phi, double psi, double[] n, double[] nh, double[] ca)
          A method for computing coordinates of backbone atoms.
 double[][] nNhCaCal(double phi, double psi, double[] n, double[] nh, double[] ca, boolean first)
          A method for computing coordinates of backbone atoms.
 double[][] nNhCaHaByBackward(double phi, double psi, double[] n1, double[] nh1, double[] ca1)
          A method for computing coordinates of backbone atoms backward: with direasing residue no.
 void PrintAllByGridSearch(java.util.Vector vecHelixBB, java.util.Vector<Dipolar> rdc1Vec, java.util.Vector<Dipolar> rdc2Vec, double Syy, double Szz, double resolution, double rdcRmsdThreshold)
          Prints the all by grid search.
 java.util.Vector refineHelix(java.util.Vector rdcVec1, java.util.Vector rdcVec2, double[] n2ca, double Syy, double Szz, java.util.Map heliceMap)
          For computing the Helix.
 java.util.Vector<Pdb> refineHelix22(java.util.Vector vecBB, java.util.Vector<Dipolar> rdc1Vec, java.util.Vector<Dipolar> rdc2Vec, double Syy, double Szz, double[] ramaFilter, double phiAve, double psiAve, int refineCycle, int initialCycle, double w4Angles, double resolution, boolean debugDFS, boolean printResults, double[] nhRdcRmsd, double[] chRdcRmsd)
          Refine helix22.
 java.util.Vector<Pdb> refineHelix22(java.util.Vector vecBB, java.util.Vector<Dipolar> rdc1Vec, java.util.Vector<Dipolar> rdc2Vec, double Syy, double Szz, double[] ramaFilter, double phiAve, double psiAve, int refineCycle, int initialCycle, double w4Angles, double resolution, boolean debugDFS, boolean printResults, java.util.Vector vecTalos)
          Refine helix22.
 java.util.Vector<Pdb> refineHelix22NoGridSearch(java.util.Vector vecBB, java.util.Vector<Dipolar> rdc1Vec, java.util.Vector<Dipolar> rdc2Vec, double Syy, double Szz, double[] ramaFilter, double phiAve, double psiAve, int refineCycle, int initialCycle, double w4Angles, double resolution, boolean debugDFS, boolean printResults, double[] nhRdcRmsd, double[] chRdcRmsd)
          Refine helix22 no grid search.
 java.util.Vector<Pdb> refineHelixW4RDCs(java.util.Vector vecBB, java.util.Vector<Dipolar> rdc1Vec, java.util.Vector<Dipolar> rdc2Vec, java.util.Vector<Dipolar> helixRdcCaCoVec, java.util.Vector<Dipolar> helixRdcCoNVec, double Syy, double Szz, double[] ramaFilter, double phiAve, double psiAve, int refineCycle, int initialCycle, double w4Angles, double resolution, boolean debugDFS, boolean printResults, java.util.Vector vecTalos)
          Refine helix w4 rd cs.
 java.util.Vector<Pdb> refineHelixW4RDCs(java.util.Vector vecPreBB, java.util.Vector vecBB, java.util.Vector<Dipolar> rdc1Vec, java.util.Vector<Dipolar> rdc2Vec, java.util.Vector<Dipolar> helixRdcCaCoVec, java.util.Vector<Dipolar> helixRdcCoNVec, double Syy, double Szz, double[] ramaFilter, double phiAve, double psiAve, int refineCycle, int initialCycle, double w4Angles, double resolution, boolean debugDFS, boolean printResults, java.util.Vector vecTalos, double wtCoCa, double wtCoN, int starNo, int endNo, java.util.Vector vecSeq)
          refine the Helix with the weights for CaCo NCO RDCs.
 java.util.Vector refineSaupe(java.util.Vector rdc1Vec, java.util.Vector rdc2Vec, double[] saupe, double[] ramaFilter, double phiAve, double psiAve, int refineCycle, int nCycle, boolean debugDFS, boolean printResults, java.util.Vector vecTalos)
          Refine Saupe elements from an initial model.
 java.util.Vector refineSaupe2(java.util.Vector pdbVec, java.util.Vector paraVec, java.util.Vector eRdc1Vec, java.util.Vector eRdc2Vec, java.util.Vector helixRdc1, java.util.Vector helixRdc2, double[] saupeSave)
          This is an old function.
 java.util.Vector<Pdb> refineSaupe3(java.util.Vector<Pdb> pdbVec, java.util.Vector<Dipolar> nhRdc, java.util.Vector<Dipolar> cahaRdc, double[] saupeSave)
          Modified by zeng for computing the alignment tensor based on structure and RDCs Update the Saupe elements for the second time.
 java.util.Vector refineSaupe4RDCsWOAT(java.util.Vector rdc1Vec, java.util.Vector rdc2Vec, java.util.Vector rdcCaCoVec, java.util.Vector rdcCoNVec, double[] saupe, double[] ramaFilter, double phiAve, double psiAve, int refineCycle, int nCycle, boolean debugDFS, boolean printResults, java.util.Vector vecTalos)
          Refine Saupe elements from an initial model.
 java.util.Vector refineSaupe4RDCsWOAT(java.util.Vector vecPreBB, java.util.Vector pdbVec, java.util.Vector rdc1Vec, java.util.Vector rdc2Vec, java.util.Vector rdcCaCoVec, java.util.Vector rdcCoNVec, double[] saupe, double[] ramaFilter, double phiAve, double psiAve, int refineCycle, int nCycle, boolean debugDFS, boolean printResults, java.util.Vector vecTalos, double wtCoCa, double wtCoN, int starNo, int endNo, java.util.Vector vecSeq)
          Refine Saupe elements from an initial model.
 java.util.Vector refineStrand(java.util.Vector rdc1Vec, java.util.Vector rdc2Vec, double Syy, double Szz, double[] ramaFilter, double phiAve, double psiAve, int refineCycle, int initialCycle, double w4Angles, double resolution, boolean debugDFS, boolean printResults)
          For computing the first Strand which is NOT H-bonded to others.
 java.util.Vector refineStrand(java.util.Vector rdc1Vec, java.util.Vector rdc2Vec, double Syy, double Szz, double phiAve, double psiAve, int refineCycle, int initialCycle, double resolution, double angleWeight, double hbWeight, java.util.Vector pdbS1, java.util.Vector hBVecOfE21, boolean printEulerSearch, boolean debugDFS, boolean printResults)
          For computing the others Strands which IS H-bonded to others.
 java.util.Vector refineStrand2(java.util.Vector rdc1Vec, java.util.Vector rdc2Vec, double Syy, double Szz, double phiAve, double psiAve, int refineCycle, int initialCycle, double resolution, double angleWeight, double hbWeight, java.util.Vector pdbE1, java.util.Vector HbondVec, boolean printEulerSearch, boolean debugDFS, boolean printResults)
          For computing the others Strands which IS H-bonded to others.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModelRdc

public ModelRdc()
Instantiates a new model rdc.


ModelRdc

public ModelRdc(int No)
Instantiates a new model rdc.

Parameters:
No - the no

ModelRdc

public ModelRdc(int no,
                java.lang.String re,
                double x,
                double y)
Instantiates a new model rdc.

Parameters:
no - the no
re - the re
x - the x
y - the y
Method Detail

getResidueNo

public int getResidueNo()
Gets the residue no.

Returns:
the residue no

getResidue

public java.lang.String getResidue()
Gets the residue.

Returns:
the residue

getPhi

public double getPhi()
Gets the phi.

Returns:
the phi

getPsi

public double getPsi()
Gets the psi.

Returns:
the psi

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

length

public double length(double[] v1)
compute the length of a vector v1.

Parameters:
v1 - the v1
Returns:
the double

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.

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[]

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

addCoords

public double[] addCoords(double[] n1,
                          double[] n2)
adding two vectors.

Parameters:
n1 - the coordinate (direction cosine) for vector n1
n2 - the coordinate (direction cosine) for vector n2
Returns:
a vector from n1+n2

haCoCoords

public double[][] haCoCoords(double phi,
                             double[] n1,
                             double[] nh1,
                             double[] ca1)
A method for computing coordinates of backbone atoms.

Parameters:
phi - The backbone \phi angle
n1 - the direction cosine for amide nitrogen of the original residue
nh1 - the direction cosine for amide proton
ca1 - the direction cosine for Ca
Returns:
the coordinates for HA and CO in this order Please note that the coordinates of N, NH and CA of residue (i+1) are returned by overwriting the original array for them: This may be BUG prone.

haCoCoords

public double[][] haCoCoords(double phi,
                             double[] n1,
                             double[] nh1,
                             double[] ca1,
                             boolean first)
A method for computing coordinates of backbone atoms.

Parameters:
phi - The backbone \phi angle
n1 - the direction cosine for amide nitrogen of the original residue
nh1 - the direction cosine for amide proton
ca1 - the direction cosine for Ca
first - whether the residue is the first residue of the fragment, if it is the first the rotational matrix should be identity
Returns:
the coordinates for HA and CO in this order Please note that the coordinates of N, NH and CA of residue (i+1) are returned by overwriting the original array for them: This may be BUG prone.

PrintAllByGridSearch

public void PrintAllByGridSearch(java.util.Vector vecHelixBB,
                                 java.util.Vector<Dipolar> rdc1Vec,
                                 java.util.Vector<Dipolar> rdc2Vec,
                                 double Syy,
                                 double Szz,
                                 double resolution,
                                 double rdcRmsdThreshold)
Prints the all by grid search.

Parameters:
vecHelixBB - the vec helix bb
rdc1Vec - the rdc1 vec
rdc2Vec - the rdc2 vec
Syy - the syy
Szz - the szz
resolution - the resolution
rdcRmsdThreshold - the rdc rmsd threshold

nNhCaCal

public double[][] nNhCaCal(double phi,
                           double psi,
                           double[] n,
                           double[] nh,
                           double[] ca)
A method for computing coordinates of backbone atoms.

Parameters:
phi - The backbone \phi angle
psi - The backbone \psi angle
n - the n
nh - the nh
ca - the ca
Returns:
Pdb object consisting of atoms: NH, CA, CO, HA and O of residue (i). Please note that the coordinates of N, NH and CA of residue (i+1) are returned by overwriting the original array for them: This may be BUG prone.

nNhCaCal

public double[][] nNhCaCal(double phi,
                           double psi,
                           double[] n,
                           double[] nh,
                           double[] ca,
                           boolean first)
A method for computing coordinates of backbone atoms.

Parameters:
phi - The backbone \phi angle
psi - The backbone \psi angle
first - whether the residue is the first residue of the fragment
n - the n
nh - the nh
ca - the ca
Returns:
Pdb object consisting of atoms: NH, CA, CO, HA and O of residue (i). Please note that the coordinates of N, NH and CA of residue (i+1) are returned by overwriting the original array for them: This may be BUG prone.

nNhCaHaByBackward

public double[][] nNhCaHaByBackward(double phi,
                                    double psi,
                                    double[] n1,
                                    double[] nh1,
                                    double[] ca1)
A method for computing coordinates of backbone atoms backward: with direasing residue no.

Parameters:
phi - The backbone \phi_i angle
psi - The backbone \psi_i angle
n1 - the coordinate of amide nitrogen of the residue (i+1)
nh1 - the coordinate of amide proton atom of residue (i+1)
ca1 - the coordinates of Ca atom of residue (i+1)
Returns:
the coordinates for atom N, NH, CA, HA. Please note that the coordinates of N, NH and CA of residue i are returned by overwriting the original array for them: This may be BUG prone.

coordByBackward

public Pdb coordByBackward(double phi,
                           double psi,
                           double[] n1,
                           double[] nh1,
                           double[] ca1,
                           int residueNo,
                           java.lang.String resid1)
A method for computing coordinates of backbone atoms backward: with direasing residue no.

Parameters:
phi - The backbone \phi_i angle
psi - The backbone \psi_i angle
n1 - the coordinate of amide nitrogen of the residue (i+1)
nh1 - the coordinate of amide proton atom of residue (i+1)
ca1 - the coordinates of Ca atom of residue (i+1)
residueNo - the residue number of residue i
resid1 - the name of the residue i
Returns:
Pdb object consisting of atoms: NH, CA, CO, HA and O of residue (i). Please note that the coordinates of N, NH and CA of residue i are returned by overwriting the original array for them: This may be BUG prone.

coordByBackwardNew

public java.util.Vector coordByBackwardNew(double phi,
                                           double psi,
                                           double[] n1,
                                           double[] nh1,
                                           double[] ca1,
                                           int residueNo)
By Michael Zeng. A method for computing coordinates of backbone atoms backward: with direasing residue no. The same as coordByBackward, but also adding the c, ca,co atoms of residue i-1.

Parameters:
phi - The backbone \phi_i angle
psi - The backbone \psi_i angle
n1 - the coordinate of amide nitrogen of the residue (i+1)
nh1 - the coordinate of amide proton atom of residue (i+1)
ca1 - the coordinates of Ca atom of residue (i+1)
residueNo - the residue number of residue i
Returns:
Pdb object consisting of atoms: NH, CA, CO, HA and O of residue (i). Please note that the coordinates of N, NH and CA of residue i are returned by overwriting the original array for them: This may be BUG prone.

coordByResidue

public Pdb coordByResidue(double phi,
                          double psi,
                          double[] n1,
                          double[] nh1,
                          double[] ca1,
                          int residueNo,
                          java.lang.String resid1,
                          boolean first)
A method for computing coordinates of backbone atoms.

Parameters:
phi - The backbone \phi angle
psi - The backbone \psi angle
n1 - the direction cosine for amide nitrogen of the original residue
nh1 - the direction cosine for amide proton
ca1 - the direction cosine for Ca
residueNo - the residue number
resid1 - the name of the residue
first - whether the residue is the first residue of the fragment
Returns:
Pdb object consisting of atoms: NH, CA, CO, HA and O of residue (i). Please note that the coordinates of N, NH and CA of residue (i+1) are returned by overwriting the original array for them: This may be BUG prone.

coordByResidueFull

public Pdb coordByResidueFull(double phi,
                              double psi,
                              double[] n1,
                              double[] nh1,
                              double[] ca1,
                              int residueNo,
                              java.lang.String resid1,
                              boolean first)
*A method for computing coordinates of backbone atoms, including all backbone atoms, ha, ca, n, hn, cb,c o.

Parameters:
phi - The backbone \phi angle
psi - The backbone \psi angle
n1 - the direction cosine for amide nitrogen of the original residue
nh1 - the direction cosine for amide proton
ca1 - the direction cosine for Ca
residueNo - the residue number
resid1 - the name of the residue
first - whether the residue is the first residue of the fragment
Returns:
Pdb object consisting of atoms: NH, CA, CO, HA and O of residue (i). Please note that the coordinates of N, NH and CA of residue (i+1) are returned by overwriting the original array for them: This may be BUG prone.

modelBuild

public java.util.Vector modelBuild(java.util.Vector phiPsiVec,
                                   double[] n1,
                                   double[] nh1,
                                   double[] ca1)
Build model (compute the coordinates of backbone atoms (N, NH, CA, CO, O and HA) from the standard geometry and Phi/Psi angle.

Parameters:
phiPsiVec - an array of Phi/Psi angles 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
Returns:
a vector of Pdb object

modelBuild

public java.util.Vector modelBuild(java.util.Vector phiPsiVec,
                                   double[] n1,
                                   double[] nh1,
                                   double[] ca1,
                                   boolean isLink)
Model build.

Parameters:
phiPsiVec - the phi psi vec
n1 - the n1
nh1 - the nh1
ca1 - the ca1
isLink - the is link
Returns:
the vector

modelBuildLoopBackward

public java.util.Vector modelBuildLoopBackward(java.util.Vector phiPsiVec,
                                               double[] nCoord,
                                               double[] nhCoord,
                                               double[] caCoord,
                                               int startNo,
                                               int endNo)
By Michael Zeng. A method for computing the loop backbone atoms backward: with direasing residue no.

Parameters:
phiPsiVec - the vector for storing phi/psi angles
startNo - the first residue number, which is the end of backward computation.
endNo - the residue number of the last residue for starting the backward computation.
nCoord - the n coord
nhCoord - the nh coord
caCoord - the ca coord
Returns:
a vector Pdb objects, which is the loop backbone fragment. Note: the pdb at residue startNo-1 contains ca, c, co atoms, and will be also returned.

modelBuild

public java.util.Vector modelBuild(double[] phiArr,
                                   double[] psiArr,
                                   double[] n1,
                                   double[] nh1,
                                   double[] ca1,
                                   int no1,
                                   boolean first)
Build model (compute the coordinates of backbone atoms (N, NH, CA, CO, O and HA) from the standard geometry and Phi/Psi angle.

Parameters:
phiArr - an array of Phi angles for the fragment.
psiArr - an array of Psi angles 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
no1 - the residue number of the first residue of a fragment
first - whether the residue is the first residue of the fragment
Returns:
a vector of Pdb object

refineHelixW4RDCs

public java.util.Vector<Pdb> refineHelixW4RDCs(java.util.Vector vecBB,
                                               java.util.Vector<Dipolar> rdc1Vec,
                                               java.util.Vector<Dipolar> rdc2Vec,
                                               java.util.Vector<Dipolar> helixRdcCaCoVec,
                                               java.util.Vector<Dipolar> helixRdcCoNVec,
                                               double Syy,
                                               double Szz,
                                               double[] ramaFilter,
                                               double phiAve,
                                               double psiAve,
                                               int refineCycle,
                                               int initialCycle,
                                               double w4Angles,
                                               double resolution,
                                               boolean debugDFS,
                                               boolean printResults,
                                               java.util.Vector vecTalos)
                                        throws JampackException
Refine helix w4 rd cs.

Parameters:
vecBB - the vec bb
rdc1Vec - the rdc1 vec
rdc2Vec - the rdc2 vec
helixRdcCaCoVec - the helix rdc ca co vec
helixRdcCoNVec - the helix rdc co n vec
Syy - the syy
Szz - the szz
ramaFilter - the rama filter
phiAve - the phi ave
psiAve - the psi ave
refineCycle - the refine cycle
initialCycle - the initial cycle
w4Angles - the w4 angles
resolution - the resolution
debugDFS - the debug dfs
printResults - the print results
vecTalos - the vec talos
Returns:
the vector< pdb>
Throws:
JampackException - the jampack exception

refineHelixW4RDCs

public java.util.Vector<Pdb> refineHelixW4RDCs(java.util.Vector vecPreBB,
                                               java.util.Vector vecBB,
                                               java.util.Vector<Dipolar> rdc1Vec,
                                               java.util.Vector<Dipolar> rdc2Vec,
                                               java.util.Vector<Dipolar> helixRdcCaCoVec,
                                               java.util.Vector<Dipolar> helixRdcCoNVec,
                                               double Syy,
                                               double Szz,
                                               double[] ramaFilter,
                                               double phiAve,
                                               double psiAve,
                                               int refineCycle,
                                               int initialCycle,
                                               double w4Angles,
                                               double resolution,
                                               boolean debugDFS,
                                               boolean printResults,
                                               java.util.Vector vecTalos,
                                               double wtCoCa,
                                               double wtCoN,
                                               int starNo,
                                               int endNo,
                                               java.util.Vector vecSeq)
                                        throws JampackException
refine the Helix with the weights for CaCo NCO RDCs.

Parameters:
rdc1Vec - NH RDCs
rdc2Vec - CH RDCs
Syy - the Saupe element
Szz - the Saupe element
refineCycle - the number of cycles for iterating through the refinement and computation of Saupe matrices.
initialCycle - the number of initial cycles for the DFS-based systematic search.
w4Angles - weight for the \phi and \psi angles in the score funtion
resolution - the resolution for the grid-search for the first peptide plane
debugDFS - for monitoring the progress in systematic search-based minimization
printResults - for printing the results for each iteration
wtCoCa - the weight for CoCa RDC
wtCoN - the weight for NCo RDC
vecPreBB - previous strcture
vecBB - the vec bb
helixRdcCaCoVec - the helix rdc ca co vec
helixRdcCoNVec - the helix rdc co n vec
ramaFilter - the rama filter
phiAve - the phi ave
psiAve - the psi ave
vecTalos - the vec talos
starNo - the star no
endNo - the end no
vecSeq - the vec seq
Returns:
the refined Pdb vector
Throws:
JampackException - the jampack exception

refineHelix22

public java.util.Vector<Pdb> refineHelix22(java.util.Vector vecBB,
                                           java.util.Vector<Dipolar> rdc1Vec,
                                           java.util.Vector<Dipolar> rdc2Vec,
                                           double Syy,
                                           double Szz,
                                           double[] ramaFilter,
                                           double phiAve,
                                           double psiAve,
                                           int refineCycle,
                                           int initialCycle,
                                           double w4Angles,
                                           double resolution,
                                           boolean debugDFS,
                                           boolean printResults,
                                           java.util.Vector vecTalos)
                                    throws JampackException
Refine helix22.

Parameters:
vecBB - the vec bb
rdc1Vec - the rdc1 vec
rdc2Vec - the rdc2 vec
Syy - the syy
Szz - the szz
ramaFilter - the rama filter
phiAve - the phi ave
psiAve - the psi ave
refineCycle - the refine cycle
initialCycle - the initial cycle
w4Angles - the w4 angles
resolution - the resolution
debugDFS - the debug dfs
printResults - the print results
vecTalos - the vec talos
Returns:
the vector< pdb>
Throws:
JampackException - the jampack exception

minHelix

public java.util.Vector<Pdb> minHelix(java.util.Vector<Dipolar> rdcVec1,
                                      java.util.Vector<Dipolar> rdcVec2,
                                      double[] rdc1Cal,
                                      double[] rdc2Cal,
                                      java.util.Vector<Pdb> pdbVec,
                                      double Syy,
                                      double Szz,
                                      double rmsd1,
                                      double rmsd2,
                                      int nCycle,
                                      double weightAngles,
                                      boolean debugDFS,
                                      boolean printResults,
                                      boolean isHelix)
A recusive function to compute all the backbone Phi/Psi for an n-residue helix or the first strand.

Parameters:
rdcVec1 - an array of CH RDCs for the fragment
rdcVec2 - an array of NH RDCs for the fragment
rdc1Cal - an array for storing the back-computed RDcs
rdc2Cal - an array for storing the back-computed RDcs
pdbVec - the pdb vector previously computed or build from scratch.
debugDFS - if true, print out the information for debugging
printResults - if true, print out the information for debugging
isHelix - if true, the last \psi angle is the average value for helix, otherwise, for beta
Syy - the syy
Szz - the szz
rmsd1 - the rmsd1
rmsd2 - the rmsd2
nCycle - the n cycle
weightAngles - the weight angles
Returns:
the computed structure for the fragment

minHelix

public java.util.Vector<Pdb> minHelix(java.util.Vector<Dipolar> rdcVec1,
                                      java.util.Vector<Dipolar> rdcVec2,
                                      double[] rdc1Cal,
                                      double[] rdc2Cal,
                                      java.util.Vector<Pdb> pdbVec,
                                      double Syy,
                                      double Szz,
                                      double rmsd1,
                                      double rmsd2,
                                      int nCycle,
                                      double weightAngles,
                                      boolean debugDFS,
                                      boolean printResults,
                                      boolean isHelix,
                                      java.util.Vector vecTalos)
                               throws JampackException
A recusive function to compute all the backbone Phi/Psi for an n-residue helix or the first strand.

Parameters:
rdcVec1 - an array of CH RDCs for the fragment
rdcVec2 - an array of NH RDCs for the fragment
rdc1Cal - an array for storing the back-computed RDcs
rdc2Cal - an array for storing the back-computed RDcs
pdbVec - the pdb vector previously computed or build from scratch.
debugDFS - if true, print out the information for debugging
printResults - if true, print out the information for debugging
isHelix - if true, the last \psi angle is the average value for helix, otherwise, for beta
Syy - the syy
Szz - the szz
rmsd1 - the rmsd1
rmsd2 - the rmsd2
nCycle - the n cycle
weightAngles - the weight angles
vecTalos - the vec talos
Returns:
the computed structure for the fragment
Throws:
JampackException - the jampack exception

minHelix4RDCs

public java.util.Vector<Pdb> minHelix4RDCs(java.util.Vector<Dipolar> rdcVec1,
                                           java.util.Vector<Dipolar> rdcVec2,
                                           java.util.Vector<Dipolar> helixRdcCaCoVec,
                                           java.util.Vector<Dipolar> helixRdcCoNVec,
                                           double[] rdc1Cal,
                                           double[] rdc2Cal,
                                           java.util.Vector<Pdb> pdbVec,
                                           double Syy,
                                           double Szz,
                                           double rmsd1,
                                           double rmsd2,
                                           int nCycle,
                                           double weightAngles,
                                           boolean debugDFS,
                                           boolean printResults,
                                           boolean isHelix,
                                           java.util.Vector vecTalos,
                                           double wtCoCa,
                                           double wtCoN)
                                    throws JampackException
A recusive function to compute all the backbone Phi/Psi for an n-residue helix or the first strand.

Parameters:
rdcVec1 - an array of CH RDCs for the fragment
rdcVec2 - an array of NH RDCs for the fragment
rdc1Cal - an array for storing the back-computed RDcs
rdc2Cal - an array for storing the back-computed RDcs
pdbVec - the pdb vector previously computed or build from scratch.
debugDFS - if true, print out the information for debugging
printResults - if true, print out the information for debugging
isHelix - if true, the last \psi angle is the average value for helix, otherwise, for beta
vecTalos - talos angle table
wtCoCa - weight for CaCo rdc
wtCoN - weight for CoN RDC
helixRdcCaCoVec - the helix rdc ca co vec
helixRdcCoNVec - the helix rdc co n vec
Syy - the syy
Szz - the szz
rmsd1 - the rmsd1
rmsd2 - the rmsd2
nCycle - the n cycle
weightAngles - the weight angles
Returns:
the computed structure for the fragment
Throws:
JampackException - the jampack exception

minHelix4RDCs

public java.util.Vector<Pdb> minHelix4RDCs(java.util.Vector<Pdb> vecPrePdb,
                                           java.util.Vector<Dipolar> rdcVec1,
                                           java.util.Vector<Dipolar> rdcVec2,
                                           java.util.Vector<Dipolar> helixRdcCaCoVec,
                                           java.util.Vector<Dipolar> helixRdcCoNVec,
                                           double[] rdc1Cal,
                                           double[] rdc2Cal,
                                           java.util.Vector<Pdb> pdbVec,
                                           double Syy,
                                           double Szz,
                                           double rmsd1,
                                           double rmsd2,
                                           int nCycle,
                                           double weightAngles,
                                           boolean debugDFS,
                                           boolean printResults,
                                           boolean isHelix,
                                           java.util.Vector vecTalos,
                                           double wtCoCa,
                                           double wtCoN,
                                           int startNo,
                                           int endNo,
                                           java.util.Vector vecSeq)
                                    throws JampackException
A recusive function to compute all the backbone Phi/Psi for an n-residue helix or the first strand.

Parameters:
vecPrePdb - previous structure
rdcVec1 - an array of CH RDCs for the fragment
rdcVec2 - an array of NH RDCs for the fragment
rdc1Cal - an array for storing the back-computed RDcs
rdc2Cal - an array for storing the back-computed RDcs
pdbVec - the pdb vector previously computed or build from scratch.
debugDFS - if true, print out the information for debugging
printResults - if true, print out the information for debugging
isHelix - if true, the last \psi angle is the average value for helix, otherwise, for beta
vecTalos - talos angle table
wtCoCa - weight for CaCo rdc
wtCoN - weight for CoN RDC
helixRdcCaCoVec - the helix rdc ca co vec
helixRdcCoNVec - the helix rdc co n vec
Syy - the syy
Szz - the szz
rmsd1 - the rmsd1
rmsd2 - the rmsd2
nCycle - the n cycle
weightAngles - the weight angles
startNo - the start no
endNo - the end no
vecSeq - the vec seq
Returns:
the computed structure for the fragment
Throws:
JampackException - the jampack exception

minHelix

public java.util.Vector<Pdb> minHelix(java.util.Vector<Dipolar> rdcVec1,
                                      java.util.Vector<Dipolar> rdcVec2,
                                      double[] rdc1Cal,
                                      double[] rdc2Cal,
                                      java.util.Vector<Pdb> pdbVec,
                                      double Syy,
                                      double Szz,
                                      double rmsd1,
                                      double rmsd2,
                                      int nCycle,
                                      double weightAngles,
                                      boolean debugDFS,
                                      boolean printResults,
                                      boolean isHelix,
                                      double[] NhRdcRmsd,
                                      double[] ChRdcRmsd)
A recusive function to compute all the backbone Phi/Psi for an n-residue helix or the first strand.

Parameters:
rdcVec1 - an array of CH RDCs for the fragment
rdcVec2 - an array of NH RDCs for the fragment
rdc1Cal - an array for storing the back-computed RDcs
rdc2Cal - an array for storing the back-computed RDcs
pdbVec - the pdb vector previously computed or build from scratch.
debugDFS - if true, print out the information for debugging
printResults - if true, print out the information for debugging
isHelix - if true, the last \psi angle is the average value for helix, otherwise, for beta
Syy - the syy
Szz - the szz
rmsd1 - the rmsd1
rmsd2 - the rmsd2
nCycle - the n cycle
weightAngles - the weight angles
NhRdcRmsd - the nh rdc rmsd
ChRdcRmsd - the ch rdc rmsd
Returns:
the computed structure for the fragment

minHelix_old

public java.util.Vector minHelix_old(java.util.Vector rdcVec1,
                                     java.util.Vector rdcVec2,
                                     double[] rdc1Cal,
                                     double[] rdc2Cal,
                                     java.util.Vector pdbVec,
                                     double Syy,
                                     double Szz,
                                     double rmsd1,
                                     double rmsd2,
                                     int nCycle,
                                     double weightAngles,
                                     boolean debugDFS,
                                     boolean printResults,
                                     boolean isHelix)
A recusive function to compute all the backbone Phi/Psi for an n-residue fragment.

Parameters:
rdcVec1 - an array of CH RDCs for the fragment
rdcVec2 - an array of NH RDCs for the fragment
rdc1Cal - the rdc1 cal
rdc2Cal - the rdc2 cal
pdbVec - the pdb vec
Syy - the syy
Szz - the szz
rmsd1 - the rmsd1
rmsd2 - the rmsd2
nCycle - the n cycle
weightAngles - the weight angles
debugDFS - the debug dfs
printResults - the print results
isHelix - the is helix
Returns:
the vector

refineSaupe3

public java.util.Vector<Pdb> refineSaupe3(java.util.Vector<Pdb> pdbVec,
                                          java.util.Vector<Dipolar> nhRdc,
                                          java.util.Vector<Dipolar> cahaRdc,
                                          double[] saupeSave)
Modified by zeng for computing the alignment tensor based on structure and RDCs Update the Saupe elements for the second time.

Parameters:
pdbVec - the Pdb vector before the update
saupeSave - for saving the computed Saupe elements {Syy, Szz, rmsd4NHRDC, rmsd4CHRDC}
nhRdc - the nh rdc
cahaRdc - the caha rdc
Returns:
the refined Pdb vector.

minBeta

public java.util.Vector minBeta(java.util.Vector rdcVec1,
                                java.util.Vector rdcVec2,
                                double[] rdc1Cal,
                                double[] rdc2Cal,
                                java.util.Vector pdbVec2,
                                double Syy,
                                double Szz,
                                double rmsd1,
                                double rmsd2,
                                java.util.Vector pdbS1,
                                java.util.Vector hbVecOfE12,
                                int nCycle,
                                double weight4Angles,
                                double hbWeight,
                                boolean debugDFS,
                                boolean printResults)
A recusive function to compute all the backbone Phi/Psi for an n-residue fragment.

Parameters:
rdcVec1 - an array of CH RDCs for the fragment
rdcVec2 - an array of NH RDCs for the fragment
rdc1Cal - has the back-computed CH RDCs for handling missing data
rdc2Cal - has the back-computed NH RDCs for handling missing data
Syy - Saupe elements
Szz - Saupe elements
rmsd1 - the CH RDC rmsd before the refinement
rmsd2 - the NH RDC rmsd before the refinement
pdbS1 - the computed Strands H-bonded to the to be refined Strand
hbVecOfE12 - the vector with H-bond information between the two strands
pdbVec2 - the pdb vec2
nCycle - the n cycle
weight4Angles - the weight4 angles
hbWeight - the hb weight
debugDFS - the debug dfs
printResults - the print results
Returns:
the computed Strand

minBeta2

public java.util.Vector minBeta2(java.util.Vector rdcVec1,
                                 java.util.Vector rdcVec2,
                                 double[] rdc1Cal,
                                 double[] rdc2Cal,
                                 java.util.Vector pdbVec2,
                                 double Syy,
                                 double Szz,
                                 double rmsd1,
                                 double rmsd2,
                                 java.util.Vector pdbS1,
                                 java.util.Vector pdbS2,
                                 java.util.Vector hbVecOfE12,
                                 java.util.Vector hbVecOfE13,
                                 int nCycle,
                                 double weight4Angles,
                                 double hbWeight,
                                 boolean debugDFS,
                                 boolean printResults)
A recusive function to compute all the backbone Phi/Psi for an n-residue fragment.

Parameters:
rdcVec1 - an array of CH RDCs for the fragment
rdcVec2 - an array of NH RDCs for the fragment
rdc1Cal - has the back-computed CH RDCs for handling missing data
rdc2Cal - has the back-computed NH RDCs for handling missing data
Syy - Saupe elements
Szz - Saupe elements
rmsd1 - the CH RDC rmsd before the refinement
rmsd2 - the NH RDC rmsd before the refinement
pdbS1 - the computed Strands H-bonded to the to be refined Strand
hbVecOfE12 - the vector with H-bond information between the two strands
pdbVec2 - the pdb vec2
pdbS2 - the pdb s2
hbVecOfE13 - the hb vec of e13
nCycle - the n cycle
weight4Angles - the weight4 angles
hbWeight - the hb weight
debugDFS - the debug dfs
printResults - the print results
Returns:
the computed Strand

minTurns

public java.util.Vector minTurns(java.util.Vector h1Vec,
                                 java.util.Vector asgVec,
                                 java.util.Vector pdbVec1,
                                 java.util.Vector pdbVec2,
                                 java.util.Vector rdcVec1,
                                 java.util.Vector rdcVec2,
                                 double Syy,
                                 double Szz,
                                 int no1,
                                 int no2,
                                 double a1,
                                 double a2)
Compute the turns based on NOEs and RDCs.

Parameters:
no1 - the first residue of the fragment (turn and loop)
no2 - the last residue of the fragment (turn and loop)
h1Vec - resonance assignment sorted by H1 CS shift.
asgVec - the merged resonacs assigement and HN and HA NOEs
rdcVec1 - the CH RDC
rdcVec2 - the NH RDC
a1 - the constant used to convert the intensity to distance
a2 - the constant used to convert the intensity to distance
pdbVec1 - the structure for the beginning side of turn or loop
pdbVec2 - the structure for the end side of turn or loop
Syy - the diagnolized Saupe elements
Szz - the diagnolized Saupe elements
Returns:
the refined Pdb vector

refineSaupe4RDCsWOAT

public java.util.Vector refineSaupe4RDCsWOAT(java.util.Vector rdc1Vec,
                                             java.util.Vector rdc2Vec,
                                             java.util.Vector rdcCaCoVec,
                                             java.util.Vector rdcCoNVec,
                                             double[] saupe,
                                             double[] ramaFilter,
                                             double phiAve,
                                             double psiAve,
                                             int refineCycle,
                                             int nCycle,
                                             boolean debugDFS,
                                             boolean printResults,
                                             java.util.Vector vecTalos)
                                      throws JampackException
Refine Saupe elements from an initial model.

Parameters:
rdc1Vec - NH RDCs
rdc2Vec - CH RDCs
refineCycle - the number of cycles for iterating through the refinement and computation of Saupe matrices.
nCycle - the number of cycles for the refinement by DFS itself.
ramaFilter - the Ramachandran filter for the favorable phi and psi region
phiAve - the average phi angle
psiAve - the average psi angle
debugDFS - for monitoring the progress in systematic search-based minimization
printResults - for printing the results for each iteration
rdcCaCoVec - the rdc ca co vec
rdcCoNVec - the rdc co n vec
saupe - the saupe
vecTalos - the vec talos
Returns:
the refined Pdb vector
Throws:
JampackException - the jampack exception

refineSaupe4RDCsWOAT

public java.util.Vector refineSaupe4RDCsWOAT(java.util.Vector vecPreBB,
                                             java.util.Vector pdbVec,
                                             java.util.Vector rdc1Vec,
                                             java.util.Vector rdc2Vec,
                                             java.util.Vector rdcCaCoVec,
                                             java.util.Vector rdcCoNVec,
                                             double[] saupe,
                                             double[] ramaFilter,
                                             double phiAve,
                                             double psiAve,
                                             int refineCycle,
                                             int nCycle,
                                             boolean debugDFS,
                                             boolean printResults,
                                             java.util.Vector vecTalos,
                                             double wtCoCa,
                                             double wtCoN,
                                             int starNo,
                                             int endNo,
                                             java.util.Vector vecSeq)
                                      throws JampackException
Refine Saupe elements from an initial model.

Parameters:
rdc1Vec - NH RDCs
rdc2Vec - CH RDCs
refineCycle - the number of cycles for iterating through the refinement and computation of Saupe matrices.
nCycle - the number of cycles for the refinement by DFS itself.
ramaFilter - the Ramachandran filter for the favorable phi and psi region
phiAve - the average phi angle
psiAve - the average psi angle
debugDFS - for monitoring the progress in systematic search-based minimization
printResults - for printing the results for each iteration
vecPreBB - the vec pre bb
pdbVec - the pdb vec
rdcCaCoVec - the rdc ca co vec
rdcCoNVec - the rdc co n vec
saupe - the saupe
vecTalos - the vec talos
wtCoCa - the wt co ca
wtCoN - the wt co n
starNo - the star no
endNo - the end no
vecSeq - the vec seq
Returns:
the refined Pdb vector
Throws:
JampackException - the jampack exception

refineSaupe

public java.util.Vector refineSaupe(java.util.Vector rdc1Vec,
                                    java.util.Vector rdc2Vec,
                                    double[] saupe,
                                    double[] ramaFilter,
                                    double phiAve,
                                    double psiAve,
                                    int refineCycle,
                                    int nCycle,
                                    boolean debugDFS,
                                    boolean printResults,
                                    java.util.Vector vecTalos)
                             throws JampackException
Refine Saupe elements from an initial model.

Parameters:
rdc1Vec - NH RDCs
rdc2Vec - CH RDCs
refineCycle - the number of cycles for iterating through the refinement and computation of Saupe matrices.
nCycle - the number of cycles for the refinement by DFS itself.
ramaFilter - the Ramachandran filter for the favorable phi and psi region
phiAve - the average phi angle
psiAve - the average psi angle
debugDFS - for monitoring the progress in systematic search-based minimization
printResults - for printing the results for each iteration
saupe - the saupe
vecTalos - the vec talos
Returns:
the refined Pdb vector
Throws:
JampackException - the jampack exception

refineSaupe2

public java.util.Vector refineSaupe2(java.util.Vector pdbVec,
                                     java.util.Vector paraVec,
                                     java.util.Vector eRdc1Vec,
                                     java.util.Vector eRdc2Vec,
                                     java.util.Vector helixRdc1,
                                     java.util.Vector helixRdc2,
                                     double[] saupeSave)
This is an old function. Can be deleted. Update the Saupe elements

Parameters:
pdbVec - the Pdb vector before the update
paraVec - the set of parameters for computing fragment etc.
eRdc1Vec - RDC data for beta-strands //the following fours are just for convenience
eRdc2Vec - RDC data for beta-strands
helixRdc1 - the helix rdc1
helixRdc2 - the helix rdc2
saupeSave - the saupe save
Returns:
the refined Pdb vector.

refineHelix22

public java.util.Vector<Pdb> refineHelix22(java.util.Vector vecBB,
                                           java.util.Vector<Dipolar> rdc1Vec,
                                           java.util.Vector<Dipolar> rdc2Vec,
                                           double Syy,
                                           double Szz,
                                           double[] ramaFilter,
                                           double phiAve,
                                           double psiAve,
                                           int refineCycle,
                                           int initialCycle,
                                           double w4Angles,
                                           double resolution,
                                           boolean debugDFS,
                                           boolean printResults,
                                           double[] nhRdcRmsd,
                                           double[] chRdcRmsd)
Refine helix22.

Parameters:
vecBB - the vec bb
rdc1Vec - the rdc1 vec
rdc2Vec - the rdc2 vec
Syy - the syy
Szz - the szz
ramaFilter - the rama filter
phiAve - the phi ave
psiAve - the psi ave
refineCycle - the refine cycle
initialCycle - the initial cycle
w4Angles - the w4 angles
resolution - the resolution
debugDFS - the debug dfs
printResults - the print results
nhRdcRmsd - the nh rdc rmsd
chRdcRmsd - the ch rdc rmsd
Returns:
the vector< pdb>

refineHelix22NoGridSearch

public java.util.Vector<Pdb> refineHelix22NoGridSearch(java.util.Vector vecBB,
                                                       java.util.Vector<Dipolar> rdc1Vec,
                                                       java.util.Vector<Dipolar> rdc2Vec,
                                                       double Syy,
                                                       double Szz,
                                                       double[] ramaFilter,
                                                       double phiAve,
                                                       double psiAve,
                                                       int refineCycle,
                                                       int initialCycle,
                                                       double w4Angles,
                                                       double resolution,
                                                       boolean debugDFS,
                                                       boolean printResults,
                                                       double[] nhRdcRmsd,
                                                       double[] chRdcRmsd)
Refine helix22 no grid search.

Parameters:
vecBB - the vec bb
rdc1Vec - the rdc1 vec
rdc2Vec - the rdc2 vec
Syy - the syy
Szz - the szz
ramaFilter - the rama filter
phiAve - the phi ave
psiAve - the psi ave
refineCycle - the refine cycle
initialCycle - the initial cycle
w4Angles - the w4 angles
resolution - the resolution
debugDFS - the debug dfs
printResults - the print results
nhRdcRmsd - the nh rdc rmsd
chRdcRmsd - the ch rdc rmsd
Returns:
the vector< pdb>

refineHelix

public java.util.Vector refineHelix(java.util.Vector rdcVec1,
                                    java.util.Vector rdcVec2,
                                    double[] n2ca,
                                    double Syy,
                                    double Szz,
                                    java.util.Map heliceMap)
For computing the Helix.

Parameters:
Syy - the Saupe element
Szz - the Saupe element
rdcVec1 - the rdc vec1
rdcVec2 - the rdc vec2
n2ca - the n2ca
heliceMap - the helice map
Returns:
the refined Pdb vector

refineStrand

public java.util.Vector refineStrand(java.util.Vector rdc1Vec,
                                     java.util.Vector rdc2Vec,
                                     double Syy,
                                     double Szz,
                                     double[] ramaFilter,
                                     double phiAve,
                                     double psiAve,
                                     int refineCycle,
                                     int initialCycle,
                                     double w4Angles,
                                     double resolution,
                                     boolean debugDFS,
                                     boolean printResults)
For computing the first Strand which is NOT H-bonded to others.

Parameters:
rdc1Vec - RDCs in medium 1
rdc2Vec - RDCs in medium 2
refineCycle - the number of cycles for iterating through the refinement and computation of Saupe matrices.
initialCycle - the number of initial cycles for the DFS-based systematic search.
ramaFilter - the Ramachandran filter for the favorable phi and psi region
phiAve - the average phi angle
psiAve - the average psi angle
w4Angles - weight for the \phi and \psi angles in the score funtion
resolution - the resolution for the grid-search for the first peptide plane
debugDFS - for monitoring the progress in systematic search-based minimization
printResults - for printing the results for each iteration
Syy - the syy
Szz - the szz
Returns:
the refined Pdb vector

refineStrand

public java.util.Vector refineStrand(java.util.Vector rdc1Vec,
                                     java.util.Vector rdc2Vec,
                                     double Syy,
                                     double Szz,
                                     double phiAve,
                                     double psiAve,
                                     int refineCycle,
                                     int initialCycle,
                                     double resolution,
                                     double angleWeight,
                                     double hbWeight,
                                     java.util.Vector pdbS1,
                                     java.util.Vector hBVecOfE21,
                                     boolean printEulerSearch,
                                     boolean debugDFS,
                                     boolean printResults)
For computing the others Strands which IS H-bonded to others.

Parameters:
rdc1Vec - RDCs in medium 1
rdc2Vec - RDCs in medium 2
refineCycle - the number of cycles for iterating through the refinement and computation of Saupe matrices.
Syy - the syy
Szz - the szz
phiAve - the phi ave
psiAve - the psi ave
initialCycle - the initial cycle
resolution - the resolution
angleWeight - the angle weight
hbWeight - the hb weight
pdbS1 - the pdb s1
hBVecOfE21 - the h b vec of e21
printEulerSearch - the print euler search
debugDFS - the debug dfs
printResults - the print results
Returns:
the refined Pdb vector

refineStrand2

public java.util.Vector refineStrand2(java.util.Vector rdc1Vec,
                                      java.util.Vector rdc2Vec,
                                      double Syy,
                                      double Szz,
                                      double phiAve,
                                      double psiAve,
                                      int refineCycle,
                                      int initialCycle,
                                      double resolution,
                                      double angleWeight,
                                      double hbWeight,
                                      java.util.Vector pdbE1,
                                      java.util.Vector HbondVec,
                                      boolean printEulerSearch,
                                      boolean debugDFS,
                                      boolean printResults)
For computing the others Strands which IS H-bonded to others.

Parameters:
rdc1Vec - RDCs in medium 1
rdc2Vec - RDCs in medium 2
refineCycle - the number of cycles for iterating through the refinement and computation of Saupe matrices.
Syy - the syy
Szz - the szz
phiAve - the phi ave
psiAve - the psi ave
initialCycle - the initial cycle
resolution - the resolution
angleWeight - the angle weight
hbWeight - the hb weight
pdbE1 - the pdb e1
HbondVec - the hbond vec
printEulerSearch - the print euler search
debugDFS - the debug dfs
printResults - the print results
Returns:
the refined Pdb vector