RdcPanda
Class vdw

java.lang.Object
  extended by RdcPanda.vdw

public class vdw
extends java.lang.Object

A class for computing the vdw repellsion. Written by Lincong Wang (2001-2005) and Jianyang (Michael) Zeng (2005-2009).


Nested Class Summary
static class vdw.VdwComparator
          The Class VdwComparator.
static class vdw.VdwNoeComparator
          The Class VdwNoeComparator.
 
Constructor Summary
vdw()
          Instantiates a new vdw.
vdw(java.lang.String id2, double[] coord2)
          Instantiates a new vdw.
vdw(java.util.Vector vecPp, double sc)
          Instantiates a new vdw.
vdw(java.util.Vector vecPp, double sc, double noe_sc)
          Instantiates a new vdw.
vdw(java.util.Vector vecPp, double sc, double nhRms, double chRms, int enID, int modID)
          Instantiates a new vdw.
vdw(java.util.Vector vecPp, double sc, double noe_sc, int modID)
          Instantiates a new vdw.
vdw(java.util.Vector vecPp, double sc, double noe_sc, int modID, java.lang.String id)
          Instantiates a new vdw.
 
Method Summary
 boolean checkStericClash(java.util.Vector vdwVec, double[] vdwValue, double vdwLevel, boolean printVDWViolation, boolean isHelix, double stericThreshold, int numThreshold, int[] clashIndex)
          check the steric clashes, if the number of steric clashes is larger than some threshold, ruturn true, else return false.
 double checkVDW(java.lang.String atom1, java.lang.String atom2, double distance, boolean isHbond)
          Check vdw.
 boolean computeVDW(java.util.Vector vdwVec, double[] vdwValue, boolean isHelix)
          Compute the vdw energy.
 boolean computeVDW(java.util.Vector vdwVec, double[] vdwValue, double vdwLevel, boolean printVDWViolation)
          Compute the vdw energy.
 boolean computeVDW(java.util.Vector vdwVec, double[] vdwValue, double vdwLevel, boolean printVDWViolation, boolean isHelix)
          Compute the vdw energy.
 java.util.Vector convert2VDW(Pdb[] pdbVec)
          To convert the PDB coordinates into a flat structure for speed.
 java.util.Vector convert2VDW(java.util.Vector pdbVec)
          To convert the PDB coordinates into a flat structure for speed.
 int countStericClash(java.util.Vector vdwVec, double[] vdwValue, double vdwLevel, boolean printVDWViolation, boolean isHelix, double stericThreshold)
          count the number of steric clash, given the threshold of penetration, ruturn true, else return false.
 int countStericClashBetweenTwo(java.util.Vector vdwVec, java.util.Vector vdwVec2, double[] vdwValue, double vdwLevel, boolean printVDWViolation, boolean isHelix, double stericThreshold)
          count the number of steric clash between two structures, given the threshold of penetration, ruturn true, else return false.
 double getChRmsd()
          Gets the ch rmsd.
 double[] getCoord()
          Gets the coord.
 double getEnsembleID()
          Gets the ensemble id.
 java.lang.String getID()
          Gets the iD.
 double getModelID()
          Gets the model id.
 double getNhRmsd()
          Gets the nh rmsd.
 double getNoeRmsd()
          Gets the noe rmsd.
 java.util.Vector getPDB()
          Gets the pDB.
 java.lang.String getStringID()
          Gets the string id.
 double getVdwScore()
          Gets the vdw score.
 double[] internuclearVec(double[] n1, double[] n2)
          Internuclear vec.
 boolean isBonded(int no1, int no2, java.lang.String atom1, java.lang.String atom2)
          Only for polyalanine.
 boolean isBonded(java.lang.String resid, int no1, int no2, java.lang.String atom1, java.lang.String atom2)
          Checks if is bonded.
 double length(double[] v1)
          Length.
static void main(java.lang.String[] argv)
          The main method.
 void measureVDW4Ensemble()
          Measure vd w4 ensemble.
 void mergeAndCluster(java.lang.String src, java.lang.String srcOut, java.lang.String strPreEnsemb, int maxStr, int maxEnsemSize, double resolution, java.lang.String strNewEnsemb, java.lang.String strDelimit)
          merge all structures in previous ensemble into one enemble (with the same pdb name) and cluster them according to given resolution.
 void mergeAndClusterAll(java.lang.String src, java.lang.String srcOut, double resolution, java.lang.String strNewEnsemb)
          similar to "mergeAndCluster", but cluster all structures in one directory as an ensemble merge all structures in previous ensemble into one enemble (with the same pdb name) and cluster them according to given resolution.
 int OutputStericClashResidues(java.util.Vector vdwVec, double[] vdwValue, double vdwLevel, boolean printVDWViolation, boolean isHelix, double stericThreshold, int numThreshold, boolean[] resClash, boolean isPrint)
          check the steric clashes, if the number of steric clashes is larger than some threshold, ruturn true, else return false.
 void setCoord(double[] coord2)
          Sets the coord.
 void setID(java.lang.String id2)
          Sets the iD.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

vdw

public vdw()
Instantiates a new vdw.


vdw

public vdw(java.util.Vector vecPp,
           double sc)
Instantiates a new vdw.

Parameters:
vecPp - the vec pp
sc - the sc

vdw

public vdw(java.util.Vector vecPp,
           double sc,
           double noe_sc)
Instantiates a new vdw.

Parameters:
vecPp - the vec pp
sc - the sc
noe_sc - the noe_sc

vdw

public vdw(java.util.Vector vecPp,
           double sc,
           double noe_sc,
           int modID)
Instantiates a new vdw.

Parameters:
vecPp - the vec pp
sc - the sc
noe_sc - the noe_sc
modID - the mod id

vdw

public vdw(java.util.Vector vecPp,
           double sc,
           double noe_sc,
           int modID,
           java.lang.String id)
Instantiates a new vdw.

Parameters:
vecPp - the vec pp
sc - the sc
noe_sc - the noe_sc
modID - the mod id
id - the id

vdw

public vdw(java.util.Vector vecPp,
           double sc,
           double nhRms,
           double chRms,
           int enID,
           int modID)
Instantiates a new vdw.

Parameters:
vecPp - the vec pp
sc - the sc
nhRms - the nh rms
chRms - the ch rms
enID - the en id
modID - the mod id

vdw

public vdw(java.lang.String id2,
           double[] coord2)
Instantiates a new vdw.

Parameters:
id2 - the id2
coord2 - the coord2
Method Detail

getPDB

public java.util.Vector getPDB()
Gets the pDB.

Returns:
the pDB

getVdwScore

public double getVdwScore()
Gets the vdw score.

Returns:
the vdw score

getNoeRmsd

public double getNoeRmsd()
Gets the noe rmsd.

Returns:
the noe rmsd

getEnsembleID

public double getEnsembleID()
Gets the ensemble id.

Returns:
the ensemble id

getModelID

public double getModelID()
Gets the model id.

Returns:
the model id

getStringID

public java.lang.String getStringID()
Gets the string id.

Returns:
the string id

getNhRmsd

public double getNhRmsd()
Gets the nh rmsd.

Returns:
the nh rmsd

getChRmsd

public double getChRmsd()
Gets the ch rmsd.

Returns:
the ch rmsd

getID

public java.lang.String getID()
Gets the iD.

Returns:
the iD

getCoord

public double[] getCoord()
Gets the coord.

Returns:
the coord

setID

public void setID(java.lang.String id2)
Sets the iD.

Parameters:
id2 - the new iD

setCoord

public void setCoord(double[] coord2)
Sets the coord.

Parameters:
coord2 - the new coord

length

public double length(double[] v1)
Length.

Parameters:
v1 - the v1
Returns:
the double

internuclearVec

public double[] internuclearVec(double[] n1,
                                double[] n2)
Internuclear vec.

Parameters:
n1 - the n1
n2 - the n2
Returns:
the double[]

convert2VDW

public java.util.Vector convert2VDW(java.util.Vector pdbVec)
To convert the PDB coordinates into a flat structure for speed.

Parameters:
pdbVec - the pdb vec
Returns:
the vector

convert2VDW

public java.util.Vector convert2VDW(Pdb[] pdbVec)
To convert the PDB coordinates into a flat structure for speed.

Parameters:
pdbVec - the pdb vec
Returns:
the vector

computeVDW

public boolean computeVDW(java.util.Vector vdwVec,
                          double[] vdwValue,
                          boolean isHelix)
Compute the vdw energy.

Parameters:
vdwVec - coordinate object in a flat form
vdwValue - for returning the computed vdwEnergy
isHelix - is a boolean for treating specifically the H-bond for a helix
Returns:
true, if compute vdw

computeVDW

public boolean computeVDW(java.util.Vector vdwVec,
                          double[] vdwValue,
                          double vdwLevel,
                          boolean printVDWViolation)
Compute the vdw energy.

Parameters:
vdwVec - coordinate object in a flat form
vdwValue - for returning the computed vdwEnergy
vdwLevel - if the vdwEnergy > vdwLevel and printVDWViolation is true, print out the violation for checking
printVDWViolation - whether to print the vdw violation
Returns:
true, if compute vdw

computeVDW

public boolean computeVDW(java.util.Vector vdwVec,
                          double[] vdwValue,
                          double vdwLevel,
                          boolean printVDWViolation,
                          boolean isHelix)
Compute the vdw energy.

Parameters:
vdwVec - coordinate object in a flat form
vdwValue - for returning the computed vdwEnergy
vdwLevel - if the vdwEnergy > vdwLevel and printVDWViolation is true, print out the violation for checking
printVDWViolation - whether to print the vdw violation
isHelix - the is helix
Returns:
true, if compute vdw

OutputStericClashResidues

public int OutputStericClashResidues(java.util.Vector vdwVec,
                                     double[] vdwValue,
                                     double vdwLevel,
                                     boolean printVDWViolation,
                                     boolean isHelix,
                                     double stericThreshold,
                                     int numThreshold,
                                     boolean[] resClash,
                                     boolean isPrint)
check the steric clashes, if the number of steric clashes is larger than some threshold, ruturn true, else return false.

Parameters:
vdwVec - coordinate object in a flat form
vdwValue - for returning the computed vdwEnergy
vdwLevel - if the vdwEnergy > vdwLevel and printVDWViolation is true, print out the violation for checking
printVDWViolation - whether to print the vdw violation
isHelix - whether it is helix
stericThreshold - the distance threshold for checking steric clash (default:0.6A)
numThreshold - the number threshold for reporting steric clashes(default:1)
resClash - store the residue indexes of steric clash, true if the residue envolves in steric clash
isPrint - the is print
Returns:
the int

checkStericClash

public boolean checkStericClash(java.util.Vector vdwVec,
                                double[] vdwValue,
                                double vdwLevel,
                                boolean printVDWViolation,
                                boolean isHelix,
                                double stericThreshold,
                                int numThreshold,
                                int[] clashIndex)
check the steric clashes, if the number of steric clashes is larger than some threshold, ruturn true, else return false.

Parameters:
vdwVec - coordinate object in a flat form
vdwValue - for returning the computed vdwEnergy
vdwLevel - if the vdwEnergy > vdwLevel and printVDWViolation is true, print out the violation for checking
printVDWViolation - whether to print the vdw violation
isHelix - whether it is helix
stericThreshold - the distance threshold for checking steric clash (default:0.6A)
numThreshold - the number threshold for reporting steric clashes(default:1)
clashIndex - store the residue indexes of steric clash
Returns:
true, if check steric clash

countStericClash

public int countStericClash(java.util.Vector vdwVec,
                            double[] vdwValue,
                            double vdwLevel,
                            boolean printVDWViolation,
                            boolean isHelix,
                            double stericThreshold)
count the number of steric clash, given the threshold of penetration, ruturn true, else return false.

Parameters:
vdwVec - coordinate object in a flat form
vdwValue - for returning the computed vdwEnergy
vdwLevel - if the vdwEnergy > vdwLevel and printVDWViolation is true, print out the violation for checking. Not used here.
printVDWViolation - whether to print the vdw violation. Not used here.
isHelix - whether it is helix
stericThreshold - the distance threshold for checking steric clash (default:0.6A)
Returns:
the int

countStericClashBetweenTwo

public int countStericClashBetweenTwo(java.util.Vector vdwVec,
                                      java.util.Vector vdwVec2,
                                      double[] vdwValue,
                                      double vdwLevel,
                                      boolean printVDWViolation,
                                      boolean isHelix,
                                      double stericThreshold)
count the number of steric clash between two structures, given the threshold of penetration, ruturn true, else return false.

Parameters:
vdwVec - coordinate object in a flat form
vdwValue - for returning the computed vdwEnergy
vdwLevel - if the vdwEnergy > vdwLevel and printVDWViolation is true, print out the violation for checking. Not used here.
printVDWViolation - whether to print the vdw violation. Not used here.
isHelix - whether it is helix
stericThreshold - the distance threshold for checking steric clash (default:0.6A)
vdwVec2 - the vdw vec2
Returns:
the int

isBonded

public boolean isBonded(int no1,
                        int no2,
                        java.lang.String atom1,
                        java.lang.String atom2)
Only for polyalanine.

Parameters:
no1 - the no1
no2 - the no2
atom1 - the atom1
atom2 - the atom2
Returns:
true, if checks if is bonded

isBonded

public boolean isBonded(java.lang.String resid,
                        int no1,
                        int no2,
                        java.lang.String atom1,
                        java.lang.String atom2)
Checks if is bonded.

Parameters:
resid - the resid
no1 - the no1
no2 - the no2
atom1 - the atom1
atom2 - the atom2
Returns:
true, if is bonded

checkVDW

public double checkVDW(java.lang.String atom1,
                       java.lang.String atom2,
                       double distance,
                       boolean isHbond)
Check vdw.

Parameters:
atom1 - the atom1
atom2 - the atom2
distance - the distance
isHbond - the is hbond
Returns:
the double

mergeAndCluster

public void mergeAndCluster(java.lang.String src,
                            java.lang.String srcOut,
                            java.lang.String strPreEnsemb,
                            int maxStr,
                            int maxEnsemSize,
                            double resolution,
                            java.lang.String strNewEnsemb,
                            java.lang.String strDelimit)
                     throws JampackException
merge all structures in previous ensemble into one enemble (with the same pdb name) and cluster them according to given resolution.

Parameters:
src - current input directory
strPreEnsemb - the common name in the old ensembles Note: the prvious ensemble ID and structure ID are assumely delimited by "000"
strNewEnsemb - the new name of the clutered ensembles
resolution - the resolution for the clustering step.
maxStr - max number of structures in previous each ensemble
maxEnsemSize - max number of in previous ensembles
strDelimit - the delimited string between enesmble and structure IDs
srcOut - the src out
Throws:
JampackException - the jampack exception

mergeAndClusterAll

public void mergeAndClusterAll(java.lang.String src,
                               java.lang.String srcOut,
                               double resolution,
                               java.lang.String strNewEnsemb)
                        throws JampackException
similar to "mergeAndCluster", but cluster all structures in one directory as an ensemble merge all structures in previous ensemble into one enemble (with the same pdb name) and cluster them according to given resolution.

Parameters:
src - the input directory of all structures in the ensemble
strNewEnsemb - the new name of the clutered ensembles
resolution - the resolution for the clustering step.
srcOut - the src out
Throws:
JampackException - the jampack exception

main

public static void main(java.lang.String[] argv)
                 throws JampackException
The main method.

Parameters:
argv - the arguments
Throws:
JampackException - the jampack exception

measureVDW4Ensemble

public void measureVDW4Ensemble()
Measure vd w4 ensemble.