|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.proteinshader.structure.visitor.BondPredictor
public class BondPredictor
Knows how to test if the distance between two Atoms is acceptable for
a covalent Bond. There is also a method to test whether a Bond
between two Atoms of the same AminoAcid should be a double Bond.
Acceptable Bond Lengths
The calculated Bond length is obtained by using the xyz-coordinates
of the source and destination Atoms:
calculated length =
sqrt( (dstX - srcX)^2 + (dstY - srcY)^2 + (dstZ - srcZ)^2 )
The maximum acceptable Bond length is obtained by adding the covalent
radii of the source and destination Atoms plus a tolerance value:
maximum length =
source Atom radius + destination Atom radius + tolerance
The covalent radii are given in AtomEnum and are based on values
published by the
Cambridge Crystallographic Data Center. The tolerance value is
set to DEFAULT_TOLERANCE by the no-arg constructor, but it can be set
to any desired value by the other constructor or by the setTolerance()
method.
The minimum acceptable Bond length is set to DEFAULT_MIN_BOND_LENGTH
by the no-arg constructor, but another value can be set by the other
constructor or by the setMinBondLength() method.
Field Summary | |
---|---|
static double |
DEFAULT_MIN_BOND_LENGTH
The default minimum Bond length is 0.40 Angstroms. |
static double |
DEFAULT_TOLERANCE
The default tolerance for determining if a Bond length is acceptable is 0.56 Angstroms (the same value used by the RasMol program). |
Constructor Summary | |
---|---|
BondPredictor()
Constructs a BondPredictor with the Bond length tolerance and minimum acceptable length set to DEFAULT_TOLERANCE and DEFAULT_MIN_BOND_LENGTH, respectively. |
|
BondPredictor(double tolerance,
double minBondLength)
Constructs a BondPredictor with the requested tolerance and minimum Bond length. |
Method Summary | |
---|---|
double |
getMinBondLength()
Returns the minimum acceptable Bond length that is currently in use. |
double |
getTolerance()
Returns the Bond length tolerance that is currently in use. |
boolean |
isDistanceAcceptable(Atom srcAtom,
Atom dstAtom)
Determines if two Atoms are within an acceptable distance for a covalent Bond. |
boolean |
isDoubleBond(Atom srcAtom,
Atom dstAtom,
AminoAcidEnum aminoAcidType)
Uses the Atom IDs (from Atom name field in a PDB record) and the AminoAcid type to determine if the Atoms should have a double Bond (assuming that they both belong to the same AminoAcid). |
void |
setMinBondLength(double minBondLength)
Sets the minimum acceptable Bond length. |
void |
setTolerance(double tolerance)
Sets the Bond length tolerance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double DEFAULT_TOLERANCE
public static final double DEFAULT_MIN_BOND_LENGTH
Constructor Detail |
---|
public BondPredictor()
public BondPredictor(double tolerance, double minBondLength)
tolerance
- the tolerance in Angstroms.minBondLength
- the minimum Bond length in Angstroms.Method Detail |
---|
public double getTolerance()
public void setTolerance(double tolerance)
tolerance
- the Bond length tolerance in Angstroms.public double getMinBondLength()
public void setMinBondLength(double minBondLength)
minBondLength
- the minimum Bond length in Angstroms.public boolean isDistanceAcceptable(Atom srcAtom, Atom dstAtom)
srcAtom
- the source Atom for the Bond.dstAtom
- the destination Atom for the Bond.public boolean isDoubleBond(Atom srcAtom, Atom dstAtom, AminoAcidEnum aminoAcidType)
srcAtom
- source Atom for the Bond about to be formed.dstAtom
- destination Atom for the Bond about to be formed.aminoAcidType
- AminoAcid type as an enum.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |