gov.nasa.javaGenes.chemistry
Class Molecule
java.lang.Object
gov.nasa.javaGenes.core.Evolvable
gov.nasa.javaGenes.graph.Graph
gov.nasa.javaGenes.chemistry.Molecule
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- Direct Known Subclasses:
- Benzene, Purine, Pyridine
- public class Molecule
- extends Graph
note: during evolution Graph objects will be created from Molecule populations. The nature
of vertices and edges indicates that the Graph is actually a Molecule.
- See Also:
- Serialized Form
Methods inherited from class gov.nasa.javaGenes.graph.Graph |
add, add, add, canMate, changed, clone, deepCopyGraph, delete, distanceFrom, executeOnEdges, executeOnVertices, getConnectedSubgraph, getConnectionTable, getEdge, getEdgeIterator, getEdgesSize, getEquivalent, getEquivalent, getExtendedVertexTypesCounter, getNodeTypePairsShortestTrailCounts, getNumberOfCycles, getRandomEdge, getRandomEdge, getRandomVertex, getRandomVertex, getSize, getStringKey, getTrailBetween, getVertex, getVertexAndTrailIterator, getVertexIterator, getVerticesSize, hasVertexPairCloserThan, isConnected, numberVertices, numberVerticesReverse, remove, remove, removeLastNVertices, replaceEdge, replaceVertex, setAllMarks, setEdgeMarks, setVertexMarks, shallowClone, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
energyPropertyName
public static final java.lang.String energyPropertyName
- See Also:
- Constant Field Values
unitCellPropertyName
public static final java.lang.String unitCellPropertyName
- See Also:
- Constant Field Values
dimerForcePropertyName
public static final java.lang.String dimerForcePropertyName
- See Also:
- Constant Field Values
Molecule
public Molecule()
Molecule
public Molecule(VertexAndEdgeProvider provider,
int numberOfVertices,
int numberOfCycles)
scaleBy
public void scaleBy(double factor)
copy
public Molecule copy()
getComment
public java.lang.String getComment()
setComment
public void setComment(java.lang.String c)
hasUnitCell
public boolean hasUnitCell()
getUnitCell
public UnitCell getUnitCell()
setUnitCell
public void setUnitCell(UnitCell inUnitCell)
getEnergy
public double getEnergy()
getDimerForce
public double getDimerForce()
setDimerForce
public void setDimerForce(double inForce)
setEnergy
public void setEnergy(double energy)
setPropertiesFromComment
public void setPropertiesFromComment()
setCommentFromProperties
public void setCommentFromProperties()
getNumberOfAtoms
public int getNumberOfAtoms()
getAtom
public Atom getAtom(int index)
makeBond
public Bond makeBond(int vertex1,
int vertex2,
int valence)
- make a bond between two atoms numbered starting at 1 (the way chemists count)
and add the bond to the molecule.
randomizeAtomicPositions
public void randomizeAtomicPositions()
- set the positions of atoms to random numbers
randomizeAtomicPositionsBy
public void randomizeAtomicPositionsBy(double distance)
- set the positions of atoms to random numbers
randomizeAtomicPositionsBy
public void randomizeAtomicPositionsBy(double distance,
boolean gaussianDistribution)
randomizeAtomicPositionsBy
public void randomizeAtomicPositionsBy(double distance,
boolean gaussianDistribution,
int numberOfAtomsToMove)
moveAtomsIntoUnitCell
public void moveAtomsIntoUnitCell()
getAtom
public Atom getAtom(java.lang.String element)
removeLastNAtoms
public void removeLastNAtoms(int n)
getAllAtoms
public Atom[] getAllAtoms(java.lang.String element)
isLegal
public boolean isLegal()
- Overrides:
isLegal
in class Graph