edu.davidson.chm.equilibria
Class ChemSpecies

java.lang.Object
  extended by edu.davidson.chm.equilibria.ChemSpecies
Direct Known Subclasses:
Hydrogen_Ion, Hydroxide_Ion, Water

public class ChemSpecies
extends java.lang.Object

A ChemicalSpecies is a molecule or ion. This class contains the description of the intrinsic properties of the chemical species. The Species class contains a ChemicalSpecies and extensive properties for the species.

See Also:
Species

Constructor Summary
ChemSpecies()
           
ChemSpecies(java.lang.String _label, double _charge, double _fw)
           
 
Method Summary
static ChemSpecies[] createAcidBase(java.lang.String _baseLabel, double _baseCharge, double _baseFW, int _n)
          Returns an array of ChemSpecies for a sequence of acid-base reactions.
static ChemSpecies createChemSpecies(java.lang.String _data)
          Returns a ChemSpecies based upon the properties defined by the string (_data).
static ChemSpecies[] createComplexes(java.lang.String _metalLabel, double _metalCharge, double _metalFW, java.lang.String _ligandLabel, double _ligandCharge, double _ligandFW, int _n)
          Returns an array of ChemSpecies for a sequence of complexation reactions.
 double getCharge()
          Returns the charge of the ChemicalSpecies.
 double getFW()
          Returns the formula weight (g/mole) of the ChemicalSpecies.
 double getIonSize()
          Returns the Debye-Huckel ion-size parameter in angstroms.
 java.lang.String getLabel()
          Returns the descriptive label of the ChemSpecies.
 void setCharge(double _charge)
          Sets the charge of the ChemicalSpecies.
 void setFW(double _fw)
          Sets the formula weight of the ChemicalSpecies.
 void setIonSize(double _ionSize)
          Sets the Debye-Huckel ion-size parameter in angstroms.
 void setLabel(java.lang.String _label)
          Sets the descriptive label of the ChemicalSpecies.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChemSpecies

public ChemSpecies()

ChemSpecies

public ChemSpecies(java.lang.String _label,
                   double _charge,
                   double _fw)
Method Detail

createAcidBase

public static ChemSpecies[] createAcidBase(java.lang.String _baseLabel,
                                           double _baseCharge,
                                           double _baseFW,
                                           int _n)
Returns an array of ChemSpecies for a sequence of acid-base reactions. If _baseLabel = "base" and _charge = -1, the labels are "base-1", "Hbase", "H2base+1", .... In the returned array, element i contains the ChemSpecies with i protons.

Parameters:
_baseLabel - label for the fully deprotonated base
_baseCharge - charge on the fully deprotonated base
_baseFW - formula weight of the fully deprotonated base
_n - number of acidic protons on fully protonated acid

createChemSpecies

public static ChemSpecies createChemSpecies(java.lang.String _data)
Returns a ChemSpecies based upon the properties defined by the string (_data). The syntax is

label, charge, formula weight[, ion-size parameter];

All information after the ; is disregarded, and all spaces are disregarded.

Returns null if the definition is invalid.


createComplexes

public static ChemSpecies[] createComplexes(java.lang.String _metalLabel,
                                            double _metalCharge,
                                            double _metalFW,
                                            java.lang.String _ligandLabel,
                                            double _ligandCharge,
                                            double _ligandFW,
                                            int _n)
Returns an array of ChemSpecies for a sequence of complexation reactions. If _metalLabel = "Cu", _metalCharge = +1, _ligandLabel = "L", and _ligandCharge = -1, the labels are "L-", "Cu+2", "CuL-", "Cu(L)2", "Cu(L)3-", "Cu(L)4-2", etc. In the returned array, element 0 contains the free ligand, element 1 contains the free metal, and element i contains the complex with i-1 ligands.

Parameters:
_metalLabel - label for the free metal
_metalCharge - charge on the free metal
_metalFW - formula weight of the free metal
_ligandLabel - label for the free ligand
_ligandCharge - charge on the free ligand
_ligandFW - formula weight of the free ligand
_n - number of ligands on the fully complexed metal

getCharge

public double getCharge()
Returns the charge of the ChemicalSpecies. The charge is a multiple of the magnitude of the electron charge.


getFW

public double getFW()
Returns the formula weight (g/mole) of the ChemicalSpecies.


getIonSize

public double getIonSize()
Returns the Debye-Huckel ion-size parameter in angstroms.


getLabel

public java.lang.String getLabel()
Returns the descriptive label of the ChemSpecies.


setCharge

public void setCharge(double _charge)
Sets the charge of the ChemicalSpecies. The charge is a multiple of the magnitude of the electron charge.


setFW

public void setFW(double _fw)
Sets the formula weight of the ChemicalSpecies.


setIonSize

public void setIonSize(double _ionSize)
Sets the Debye-Huckel ion-size parameter in angstroms.


setLabel

public void setLabel(java.lang.String _label)
Sets the descriptive label of the ChemicalSpecies.