org.jscience.chemistry.quantum
Class Molecule

java.lang.Object
  extended by org.jscience.chemistry.quantum.Molecule

public class Molecule
extends java.lang.Object

The Molecule class


Constructor Summary
Molecule()
          Creates a new instance of MoleculeImpl
Molecule(java.lang.String title)
          Creates a new Molecule object.
 
Method Summary
 void addAtom(Atom atom)
          Overloaded addAtom() method.
 void addAtom(java.lang.String symbol, double x, double y, double z)
          Adds an atom to this molecule object.
 void addAtom(java.lang.String symbol, double charge, double x, double y, double z)
          Overloaded addAtom() method.
 void addAtom(java.lang.String symbol, double x, double y, double z, int index)
          Adds an atom to this molecule object.
 void addAtom(java.lang.String symbol, double charge, Point3D atomCenter)
          Overloaded addAtom() method.
 void addAtom(java.lang.String symbol, Point3D atomCenter)
          Overloaded addAtom() method.
 Atom getAtom(int atomIndex)
          Method to get a particular atom from the lists of atoms.
 java.util.Iterator getAtoms()
          Method to get a particular atom from the lists of atoms.
 int getNumberOfAtoms()
          Method to get total number of atoms in the molecule.
 int getNumberOfElectrons()
          Getter for property numberOfElectrons.
 java.lang.String getTitle()
          Returns the title.
 void removeAtom(Atom atom)
          remove an atom from this Molecule
 void removeAtomAt(int atomIndex)
          remove an atom from this Molecule at a given index May throw runtime exception, if invalid index
 void setTitle(java.lang.String title)
          sets the title.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Molecule

public Molecule()
Creates a new instance of MoleculeImpl


Molecule

public Molecule(java.lang.String title)
Creates a new Molecule object.

Parameters:
title - DOCUMENT ME!
Method Detail

getTitle

public java.lang.String getTitle()
Returns the title.

Returns:
String identifying the title of the Molecule object

addAtom

public void addAtom(Atom atom)
Overloaded addAtom() method.

Parameters:
atom - the instance of atom class

removeAtomAt

public void removeAtomAt(int atomIndex)
remove an atom from this Molecule at a given index May throw runtime exception, if invalid index

Parameters:
atomIndex - the atom index to be removed

removeAtom

public void removeAtom(Atom atom)
remove an atom from this Molecule

Parameters:
atom - the instance of atom class

addAtom

public void addAtom(java.lang.String symbol,
                    Point3D atomCenter)
Overloaded addAtom() method.

Parameters:
symbol - the atom symbol
atomCenter - the cartesian coordinates of the atom stored as Point3D object

addAtom

public void addAtom(java.lang.String symbol,
                    double charge,
                    Point3D atomCenter)
Overloaded addAtom() method.

Parameters:
symbol - the atom symbol
charge - is the charge on the atom (the atomic number in many cases)
atomCenter - the cartesian coordinates of the atom stored as Point3D object

addAtom

public void addAtom(java.lang.String symbol,
                    double x,
                    double y,
                    double z)
Adds an atom to this molecule object.

Parameters:
symbol - the atom symbol
x - y, z the cartesian coordinates of the atom
y - DOCUMENT ME!
z - DOCUMENT ME!

addAtom

public void addAtom(java.lang.String symbol,
                    double x,
                    double y,
                    double z,
                    int index)
Adds an atom to this molecule object.

Parameters:
symbol - the atom symbol
x - y, z the cartesian coordinates of the atom
y - DOCUMENT ME!
z - DOCUMENT ME!
index - the atom index of this atom

addAtom

public void addAtom(java.lang.String symbol,
                    double charge,
                    double x,
                    double y,
                    double z)
Overloaded addAtom() method.

Parameters:
symbol - the atom symbol
charge - is the charge on the atom (the atomic number in many cases)
x - y, z the cartesian coordinates of the atom
y - DOCUMENT ME!
z - DOCUMENT ME!

getAtom

public Atom getAtom(int atomIndex)
Method to get a particular atom from the lists of atoms.

Parameters:
atomIndex - DOCUMENT ME!
Returns:
Atom the instance of atom class

getAtoms

public java.util.Iterator getAtoms()
Method to get a particular atom from the lists of atoms.

Returns:
an iterator object containing a linear list of atoms in the Molecule!

setTitle

public void setTitle(java.lang.String title)
sets the title.

Parameters:
title - identifying the title of the Molecule object

getNumberOfAtoms

public int getNumberOfAtoms()
Method to get total number of atoms in the molecule.

Returns:
number of atoms in the Molecule

getNumberOfElectrons

public int getNumberOfElectrons()
Getter for property numberOfElectrons.

Returns:
Value of property numberOfElectrons.