org.jscience.chemistry
Class Atom
java.lang.Object
org.jscience.chemistry.Atom
public class Atom
- extends java.lang.Object
A class representing atoms.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Atom
public Atom(Element e)
- Constructs an atom, using default isotope.
Atom
public Atom(Element e,
int isotope)
getCorrespondingElement
public Element getCorrespondingElement()
computeExactMass
public double computeExactMass()
computeMeanMass
public double computeMeanMass()
getExcessElectrons
public int getExcessElectrons()
getNumElectrons
public int getNumElectrons()
isIon
public boolean isIon()
addElectron
public void addElectron()
removeElectron
public void removeElectron()
isAtomic
public boolean isAtomic()
setCharge
public void setCharge(int value)
getBonds
public java.util.Set getBonds()
addBond
public void addBond(Bond b)
breakBond
public Atom breakBond(Bond b)
breakFullBond
public Atom breakFullBond(Bond b)
getNeighbors
public java.util.Set getNeighbors()
getAllNeighbors
public java.util.Set getAllNeighbors()
isInMolecule
public boolean isInMolecule()
getMolecule
public Molecule getMolecule()
setMolecule
protected void setMolecule(Molecule molecule)
promoteAtom
public Molecule promoteAtom()
- public boolean isMolecule() {
Iterator iterator;
boolean found;
//check that there is no unbounded atom
iterator = getAllNeighbors().iterator();
found = false;
while (iterator.hasNext() && !found) {
found = ((Atom)iterator.next()).hasFreeElectrons();
}
return !found;
}