|
JavaGenes, NASA Ames. Written largely by Al Globus | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.alsUtility.Mark
gov.nasa.javaGenes.graph.GraphElement
gov.nasa.javaGenes.graph.Edge
gov.nasa.javaGenes.chemistry.Bond
Represent a chemical bond. Note: class Molecule takes care of saving Bond state during a checkpoint and restoring it during a restore.
Field Summary | |
protected int |
valence
|
Fields inherited from class gov.nasa.javaGenes.graph.Edge |
vertices |
Constructor Summary | |
Bond()
create a single bond |
|
Bond(Atom a1,
Atom a2,
int v)
Create a bond between the two atoms. |
|
Bond(int v)
create a bond. |
Method Summary | |
boolean |
canAcceptVerticesOf(Edge e)
can the atoms of the argument be connected by this bond (e)? |
boolean |
dissimilarEdgeCompatibleWithVertices(Edge e)
|
Atom |
getAtom(int i)
|
int |
getBondTypeIntegerCode()
Return a value to be used as an array index (starting at 0). |
static int |
getMaximumBondTypes()
Return the highest number that can represent a bond type (3 for triple presently) |
int |
getValence()
Return the amount of valence this bond uses |
boolean |
isCompatible(Compatible c)
Is the argument a bond with the same order? |
boolean |
isSame(Edge e)
is the type and valence of these bonds the same? |
void |
makeCompatibleWithVertices()
Force the type (single, double, or triple) of this bond to be compatible with the valence of its atoms. |
void |
makeValenceCompatible()
Force the type (single, double, or triple) of this bond to be compatible with the valence of its atoms. |
java.lang.String |
toString()
|
Methods inherited from class gov.nasa.javaGenes.graph.Edge |
clone, commonVertex, doesConnect, getTypeString, getVertex, isLegal, otherVertex, removeVertices, replaceVertex, setVertices, shallowCopyEdge, stealVertices |
Methods inherited from class gov.nasa.alsUtility.Mark |
getMark, isMarked, setMark |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int valence
Constructor Detail |
public Bond()
public Bond(int v)
public Bond(Atom a1, Atom a2, int v)
v
- indicates single, double,
or triple bond.Method Detail |
public Atom getAtom(int i)
public void makeCompatibleWithVertices()
makeCompatibleWithVertices
in class Edge
public void makeValenceCompatible()
public boolean isCompatible(Compatible c)
isCompatible
in interface Compatible
isCompatible
in class Edge
public boolean isSame(Edge e)
isSame
in class Edge
public boolean canAcceptVerticesOf(Edge e)
canAcceptVerticesOf
in class Edge
e
- must be a Bondpublic boolean dissimilarEdgeCompatibleWithVertices(Edge e)
dissimilarEdgeCompatibleWithVertices
in class Edge
e
- must be a Bondpublic static int getMaximumBondTypes()
public int getBondTypeIntegerCode()
public int getValence()
public java.lang.String toString()
toString
in class Edge
|
JavaGenes, NASA Ames. Written largely by Al Globus | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |