IAtom
, java.io.Serializable
AtomLeafDynamic
, AtomOriented
, AtomOrientedQuaternion
public class Atom extends java.lang.Object implements IAtom, java.io.Serializable
Modifier and Type | Field | Description |
---|---|---|
protected int |
index |
|
protected int |
leafIndex |
|
protected IMolecule |
parent |
|
protected Vector |
position |
|
protected AtomType |
type |
Constructor | Description |
---|---|
Atom(Space space) |
Makes a simple atom for the given space.
|
Atom(Space space,
AtomType type) |
Modifier and Type | Method | Description |
---|---|---|
int |
getIndex() |
|
int |
getLeafIndex() |
Returns the global index (within the Box) of this Atom.
|
IMolecule |
getParentGroup() |
|
Vector |
getPosition() |
|
AtomType |
getType() |
|
void |
setIndex(int newIndex) |
Informs the IAtom of its index within the atoms of its parent molecule.
|
void |
setLeafIndex(int newLeafIndex) |
Sets the atom's global index to the give value.
|
void |
setParent(IMolecule newParent) |
Informs the Atom that the given AtomGroup is its parent.
|
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 species master, species agent,
molecule, group, or (leaf) atom.
|
protected final AtomType type
protected final Vector position
protected int index
protected IMolecule parent
protected int leafIndex
public Atom(Space space)
public java.lang.String signature()
public final java.lang.String toString()
toString
in class java.lang.Object
public final int getIndex()
public final void setIndex(int newIndex)
IAtom
public void setParent(IMolecule newParent)
public IMolecule getParentGroup()
getParentGroup
in interface IAtom
public Vector getPosition()
getPosition
in interface IAtom
public int getLeafIndex()
IAtom
getLeafIndex
in interface IAtom
public void setLeafIndex(int newLeafIndex)
IAtom
setLeafIndex
in interface IAtom