org.jscience.chemistry.quantum
Class Atom

java.lang.Object
  extended by org.jscience.chemistry.quantum.Atom
All Implemented Interfaces:
java.lang.Cloneable

public class Atom
extends java.lang.Object
implements java.lang.Cloneable

This class define the structure of an Atom


Constructor Summary
Atom(java.lang.String symbol, double charge, Point3D atomCenter)
          Creates a new instance of Atom
Atom(java.lang.String symbol, double charge, Point3D atomCenter, int atomIndex)
          Creates a new instance of Atom
 
Method Summary
 java.lang.String capitalise(java.lang.String theString)
          Method to capitalise a string .. not the correct palce!
 java.lang.Object clone()
          i do some cloning business ;)
 double distanceFrom(Atom atom)
          Simple method to find the distance between two atom centers.
 double distanceFrom(Point3D point)
          Simple method to find the distance between atom center and an point.
 boolean equals(java.lang.Object obj)
          overloaded equals() method
 Point3D getAtomCenter()
          Getter for property atomCenter.
 double getCharge()
          Getter for property charge.
 int getIndex()
          Getter for property index.
 java.lang.String getSymbol()
          Getter for property symbol.
 double getX()
          Getter for property x.
 double getY()
          Getter for property y.
 double getZ()
          Getter for property z.
 int hashCode()
          overriden hashCode() method
 void setAtomCenter(Point3D atomCenter)
          Setter for property atomCenter.
 void setCharge(double charge)
          Setter for property charge.
 void setIndex(int index)
          Setter for property index.
 void setSymbol(java.lang.String symbol)
          Setter for property symbol.
 java.lang.String toString()
          overloaded toString() method.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Atom

public Atom(java.lang.String symbol,
            double charge,
            Point3D atomCenter)
Creates a new instance of Atom

Parameters:
symbol - The atom symbol
charge - The charge on the atom
atomCenter - The nuclear center of the atom in cartesian coordinates

Atom

public Atom(java.lang.String symbol,
            double charge,
            Point3D atomCenter,
            int atomIndex)
Creates a new instance of Atom

Parameters:
symbol - The atom symbol
charge - The charge on the atom
atomCenter - The nuclear center of the atom in cartesian coordinates
atomIndex - DOCUMENT ME!
Method Detail

getSymbol

public java.lang.String getSymbol()
Getter for property symbol.

Returns:
Value of property symbol.

capitalise

public java.lang.String capitalise(java.lang.String theString)
Method to capitalise a string .. not the correct palce!, but dumped here

Parameters:
theString - string to be capitalised
Returns:
the string which is capitalised

setSymbol

public void setSymbol(java.lang.String symbol)
Setter for property symbol.

Parameters:
symbol - New value of property symbol.

getCharge

public double getCharge()
Getter for property charge.

Returns:
Value of property charge.

setCharge

public void setCharge(double charge)
Setter for property charge.

Parameters:
charge - New value of property charge.

getAtomCenter

public Point3D getAtomCenter()
Getter for property atomCenter.

Returns:
Value of property atomCenter.

setAtomCenter

public void setAtomCenter(Point3D atomCenter)
Setter for property atomCenter.

Parameters:
atomCenter - New value of property atomCenter.

getX

public double getX()
Getter for property x.

Returns:
Value of property x.

getY

public double getY()
Getter for property y.

Returns:
Value of property y.

getZ

public double getZ()
Getter for property z.

Returns:
Value of property z.

toString

public java.lang.String toString()
overloaded toString() method.

Overrides:
toString in class java.lang.Object
Returns:
A description of Atom object

hashCode

public int hashCode()
overriden hashCode() method

Overrides:
hashCode in class java.lang.Object
Returns:
int - the hashCode

equals

public boolean equals(java.lang.Object obj)
overloaded equals() method

Overrides:
equals in class java.lang.Object
Parameters:
obj - The object to be compared with
Returns:
true : they are same else not

distanceFrom

public double distanceFrom(Atom atom)
Simple method to find the distance between two atom centers.

Parameters:
atom - - the atom from which the distance is to be found
Returns:
the distance between the two atom centers

distanceFrom

public double distanceFrom(Point3D point)
Simple method to find the distance between atom center and an point.

Parameters:
point - - the point to which the distance is to be found
Returns:
the distance between the point and the atom center

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
i do some cloning business ;)

Overrides:
clone in class java.lang.Object
Returns:
A copy of the present object
Throws:
java.lang.CloneNotSupportedException - If that isn't possible

getIndex

public int getIndex()
Getter for property index.

Returns:
Value of property index.

setIndex

public void setIndex(int index)
Setter for property index.

Parameters:
index - New value of property index.