JSci.chemistry
Class Molecule

java.lang.Object
  extended by JSci.physics.Particle
      extended by JSci.chemistry.Molecule
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AminoAcid

public class Molecule
extends Particle

A class representing molecules.

See Also:
Serialized Form

Constructor Summary
Molecule(Atom[] a)
          Constructs a molecule from an array of atoms.
Molecule(Atom a, Atom b)
          Constructs a molecule from two atoms.
Molecule(java.lang.String formula)
          Constructs a molecule from a chemical formula.
 
Method Summary
 Molecule bind(Atom a)
          Binds with an atom.
 Molecule bind(Molecule m)
          Binds with a molecule.
 java.util.Set getAtoms()
          Returns the atoms in this molecule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Molecule

public Molecule(java.lang.String formula)
Constructs a molecule from a chemical formula.


Molecule

public Molecule(Atom a,
                Atom b)
Constructs a molecule from two atoms.


Molecule

public Molecule(Atom[] a)
Constructs a molecule from an array of atoms.

Method Detail

getAtoms

public java.util.Set getAtoms()
Returns the atoms in this molecule.


bind

public Molecule bind(Atom a)
Binds with an atom.

Returns:
this.

bind

public Molecule bind(Molecule m)
Binds with a molecule.

Returns:
this.