IMolecule, java.io.SerializableMoleculeOrientedpublic class Molecule extends java.lang.Object implements IMolecule, java.io.Serializable
| Modifier and Type | Field | Description | 
|---|---|---|
| protected AtomArrayList | childList | |
| protected int | index | |
| protected ISpecies | species | 
| Constructor | Description | 
|---|---|
| Molecule(ISpecies species,
        int numLeafAtoms) | 
| Modifier and Type | Method | Description | 
|---|---|---|
| void | addChildAtom(IAtom newChildAtom) | Adds the given Atom as a child of this Atom. | 
| IAtomList | getChildList() | Returns the atoms in the molecule as an IAtomList. | 
| int | getIndex() | Returns this IMolecule's index, which is its place in the list of
 molecules of its ISpecies in its Box. | 
| ISpecies | getType() | Returns the ISpecies of this IMolecule. | 
| void | removeChildAtom(IAtom oldChildAtom) | Removes the given child Atom from this AtomGroup. | 
| void | setIndex(int newIndex) | Informs the IMolecule of its index. | 
| java.lang.String | signature() | Returns a string of digits that uniquely identifies this atom. | 
| java.lang.String | toString() | Returns a string formed by concatenating the signature of this atom
 to a string that identifies it as a molecule. | 
protected int index
protected final AtomArrayList childList
protected final ISpecies species
public Molecule(ISpecies species, int numLeafAtoms)
public java.lang.String signature()
public final java.lang.String toString()
toString in class java.lang.Objectpublic void addChildAtom(IAtom newChildAtom)
java.lang.IllegalArgumentException - if the given atom already has a parent.public void removeChildAtom(IAtom oldChildAtom)
java.lang.IllegalArgumentException - if the given atom is not a child.public final IAtomList getChildList()
IMoleculegetChildList in interface IMoleculepublic final void setIndex(int newIndex)
IMoleculepublic final int getIndex()
IMolecule