org.jscience.chemistry
Class Atom

java.lang.Object
  extended by org.jscience.chemistry.Atom

public class Atom
extends java.lang.Object

A class representing atoms.


Constructor Summary
Atom(Element e)
          Constructs an atom, using default isotope.
Atom(Element e, int isotope)
           
 
Method Summary
 void addBond(Bond b)
           
 void addElectron()
           
 Atom breakBond(Bond b)
           
 Atom breakFullBond(Bond b)
           
 double computeExactMass()
           
 double computeMeanMass()
           
 java.util.Set getAllNeighbors()
           
 java.util.Set getBonds()
           
 Element getCorrespondingElement()
           
 int getExcessElectrons()
           
 Molecule getMolecule()
           
 java.util.Set getNeighbors()
           
 int getNumElectrons()
           
 boolean isAtomic()
           
 boolean isInMolecule()
           
 boolean isIon()
           
 Molecule promoteAtom()
          public boolean isMolecule() {

Iterator iterator; boolean found;

//check that there is no unbounded atom iterator = getAllNeighbors().iterator(); found = false; while (iterator.hasNext() && !

 void removeElectron()
           
 void setCharge(int value)
           
protected  void setMolecule(Molecule molecule)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Atom

public Atom(Element e)
Constructs an atom, using default isotope.


Atom

public Atom(Element e,
            int isotope)
Method Detail

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;

}