|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.proteinshader.structure.Drawable org.proteinshader.structure.Bond
public class Bond
Extends abstract class Drawable to add data that is unique to a bond
between two atoms.
The xyz-coordinates for the center of the bond are specified in
Drawable. All Drawables must have a position for their center, so
that they can be sorted by their distance from the camera. The
xyz-coordinates at each end of a bond must be found by going to the
src (source) or dst (destination) atom for the bond.
For non-standard groups (heterogens), the bonds between atoms are
specified in the CONECT records near the end of a PDB formatted file.
For a standard group such as an amino acid, the connectivity is
implied by the name of the amino acid.
Field Summary |
---|
Fields inherited from class org.proteinshader.structure.Drawable |
---|
DEFAULT_ALPHA, DEFAULT_BLUE, DEFAULT_GREEN, DEFAULT_RADIUS, DEFAULT_RED, DEFAULT_SPECULAR_EXP |
Constructor Summary | |
---|---|
Bond(Atom srcAtom,
Atom dstAtom,
BondEnum type,
VisibilityEnum visibility)
Constructs a Bond for the source and destination Atoms given as arguments. |
Method Summary | |
---|---|
void |
accept(Visitor visitor)
Accepts a Visitor and does a callback. |
double |
getDirX()
Returns the x-coordinate of the source to destination Atom direction vector. |
double |
getDirY()
Returns the y-coordinate of the source to destination Atom direction vector. |
double |
getDirZ()
Returns the z-coordinate of the source to destination Atom direction vector. |
Atom |
getDstAtom()
Returns the destination Atom for this Bond. |
double |
getDstDirX()
Returns the x-coordinate of the center to destination Atom direction vector. |
double |
getDstDirY()
Returns the y-coordinate of the center to destination Atom direction vector. |
double |
getDstDirZ()
Returns the z-coordinate of the center to destination Atom direction vector. |
double |
getHalfLength()
Returns the half-length of the Bond in angstroms. |
double |
getLength()
Returns the length of the Bond in angstroms. |
Segment |
getSegment()
Returns the Segment the Bond is associated with (or null if the Bond is not associated with any Segment). |
Atom |
getSrcAtom()
Returns the source Atom for this Bond. |
double |
getSrcDirX()
Returns the x-coordinate of the center to source Atom direction vector. |
double |
getSrcDirY()
Returns the y-coordinate of the center to source Atom direction vector. |
double |
getSrcDirZ()
Returns the z-coordinate of the center to source Atom direction vector. |
BondEnum |
getType()
Returns the Bond's type as an enum (SINGLE, DOUBLE, PEPTIDE, etc.). |
void |
setColorToDefault()
Uses the Bond type to set the Drawable color to the default CPK color value specified in BondEnum. |
void |
setRadiusToDefault()
Uses the Bond type to set the radius to the default radius specified in BondEnum. |
void |
setSegment(Segment s)
Sets the Segment the Bond is associated with. |
void |
setType(BondEnum type)
Sets the Bond's type as an enum (SINGLE, DOUBLE, PEPTIDE, etc.). |
String |
toString()
Returns a String with the IDs of the source and destination atoms. |
Methods inherited from class org.proteinshader.structure.Drawable |
---|
distance, getAlpha, getAngstromsPerPixel, getBlue, getCameraDepth, getCameraDistance, getColor, getDrawableType, getGreen, getPoint, getRadius, getRed, getSpecularExp, getTranslation, getVisibility, getX, getY, getZ, minus, scaleRadius, setAlpha, setAlphaToDefault, setAngstromsPerPixel, setCameraDepth, setCameraDistance, setColor, setColor, setColor, setRadius, setRGBAToDefault, setRGBToDefault, setSpecularExp, setSpecularExpToDefault, setVisibility |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Bond(Atom srcAtom, Atom dstAtom, BondEnum type, VisibilityEnum visibility)
srcAtom
- the source Atom for this Bond.dstAtom
- the destination Atom for this Bond.type
- the type of Bond (SINGLE, DOUBLE, etc. )visibility
- visibility status (OPAQUE, TRANSLUCENT,
INVISIBLE)
NullPointerException
- if srcAtom or dstAtom is null.Method Detail |
---|
public void accept(Visitor visitor) throws VisitorException
accept
in interface Visitable
accept
in class Drawable
visitor
- the Visitor to do a callback with.
VisitorException
- if an error occurs while an object is
being visited.public Atom getSrcAtom()
public Atom getDstAtom()
public BondEnum getType()
public double getDirX()
public double getDirY()
public double getDirZ()
public double getSrcDirX()
public double getSrcDirY()
public double getSrcDirZ()
public double getDstDirX()
public double getDstDirY()
public double getDstDirZ()
public double getHalfLength()
public double getLength()
public Segment getSegment()
public void setSegment(Segment s)
s
- the Segment.public void setType(BondEnum type)
type
- the Bond's type.public void setRadiusToDefault()
setRadiusToDefault
in class Drawable
public void setColorToDefault()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |