org.jmol.smiles
Class SmilesAtom

java.lang.Object
  extended by org.jmol.smiles.SmilesAtom

public class SmilesAtom
extends java.lang.Object

This class represents an atom in a SmilesMolecule.


Field Summary
private  int atomicMass
           
private  SmilesBond[] bonds
           
private  int bondsCount
           
private  int charge
           
private  java.lang.String chiralClass
           
static java.lang.String CHIRALITY_ALLENE
          Constant used for Allene chirality.
static java.lang.String CHIRALITY_OCTAHEDRAL
          Constant used for Octahedral chirality.
static java.lang.String CHIRALITY_SQUARE_PLANAR
          Constant used for Square Planar chirality.
static java.lang.String CHIRALITY_TETRAHEDRAL
          Constant used for Tetrahedral chirality.
static java.lang.String CHIRALITY_TRIGONAL_BIPYRAMIDAL
          Constant used for Trigonal Bipyramidal chirality.
private  int chiralOrder
           
static java.lang.String DEFAULT_CHIRALITY
          Constant used for default chirality.
private  int hydrogenCount
           
private static int INITIAL_BONDS
           
private  int matchingAtom
           
private  int number
           
private  java.lang.String symbol
           
 
Constructor Summary
SmilesAtom(int number)
          Constructs a SmilesAtom.
 
Method Summary
 void addBond(SmilesBond bond)
          Add a bond to the atom.
 void createMissingHydrogen(SmilesMolecule molecule)
          Creates missing hydrogen atoms in a SmilesMolecule.
 int getAtomicMass()
          Returns the atomic mass of the atom.
 SmilesBond getBond(int number)
          Returns the bond at index number.
 int getBondsCount()
          Returns the number of bonds of this atom.
 int getCharge()
          Returns the charge of the atom.
 java.lang.String getChiralClass()
          Returns the chiral class of the atom.
 int getChiralOrder()
          Returns the chiral order of the atom.
 int getHydrogenCount()
          Returns the number of hydrogen atoms bonded with this atom.
 int getMatchingAtom()
          Returns the number of a matching atom in a molecule.
 int getNumber()
          Returns the atom number of the atom.
 java.lang.String getSymbol()
          Returns the symbol of the atom.
 void setAtomicMass(int mass)
          Sets the atomic mass of the atom.
 void setCharge(int charge)
          Sets the charge of the atom.
 void setChiralClass(java.lang.String chiralClass)
          Sets the chiral class of the atom.
 void setChiralOrder(int chiralOrder)
          Sets the chiral order of the atom.
 void setHydrogenCount(int count)
          Sets the number of hydrogen atoms bonded with this atom.
 void setMatchingAtom(int atom)
          Sets the number of a matching atom in a molecule.
 void setSymbol(java.lang.String symbol)
          Sets the symbol of the atm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

number

private int number

symbol

private java.lang.String symbol

atomicMass

private int atomicMass

charge

private int charge

hydrogenCount

private int hydrogenCount

matchingAtom

private int matchingAtom

chiralClass

private java.lang.String chiralClass

chiralOrder

private int chiralOrder

bonds

private SmilesBond[] bonds

bondsCount

private int bondsCount

INITIAL_BONDS

private static final int INITIAL_BONDS
See Also:
Constant Field Values

DEFAULT_CHIRALITY

public static final java.lang.String DEFAULT_CHIRALITY
Constant used for default chirality.

See Also:
Constant Field Values

CHIRALITY_ALLENE

public static final java.lang.String CHIRALITY_ALLENE
Constant used for Allene chirality.

See Also:
Constant Field Values

CHIRALITY_OCTAHEDRAL

public static final java.lang.String CHIRALITY_OCTAHEDRAL
Constant used for Octahedral chirality.

See Also:
Constant Field Values

CHIRALITY_SQUARE_PLANAR

public static final java.lang.String CHIRALITY_SQUARE_PLANAR
Constant used for Square Planar chirality.

See Also:
Constant Field Values

CHIRALITY_TETRAHEDRAL

public static final java.lang.String CHIRALITY_TETRAHEDRAL
Constant used for Tetrahedral chirality.

See Also:
Constant Field Values

CHIRALITY_TRIGONAL_BIPYRAMIDAL

public static final java.lang.String CHIRALITY_TRIGONAL_BIPYRAMIDAL
Constant used for Trigonal Bipyramidal chirality.

See Also:
Constant Field Values
Constructor Detail

SmilesAtom

public SmilesAtom(int number)
Constructs a SmilesAtom.

Parameters:
number - Atom number in the molecule.
Method Detail

createMissingHydrogen

public void createMissingHydrogen(SmilesMolecule molecule)
Creates missing hydrogen atoms in a SmilesMolecule.

Parameters:
molecule - Molecule containing the atom.

getNumber

public int getNumber()
Returns the atom number of the atom.

Returns:
Atom number.

getSymbol

public java.lang.String getSymbol()
Returns the symbol of the atom.

Returns:
Atom symbol.

setSymbol

public void setSymbol(java.lang.String symbol)
Sets the symbol of the atm.

Parameters:
symbol - Atom symbol.

getAtomicMass

public int getAtomicMass()
Returns the atomic mass of the atom.

Returns:
Atomic mass.

setAtomicMass

public void setAtomicMass(int mass)
Sets the atomic mass of the atom.

Parameters:
mass - Atomic mass.

getCharge

public int getCharge()
Returns the charge of the atom.

Returns:
Charge.

setCharge

public void setCharge(int charge)
Sets the charge of the atom.

Parameters:
charge - Charge.

getMatchingAtom

public int getMatchingAtom()
Returns the number of a matching atom in a molecule. This value is temporary, it is used during the pattern matching algorithm.

Returns:
matching atom.

setMatchingAtom

public void setMatchingAtom(int atom)
Sets the number of a matching atom in a molecule. This value is temporary, it is used during the pattern matching algorithm.

Parameters:
atom - Temporary: number of a matching atom in a molecule.

getChiralClass

public java.lang.String getChiralClass()
Returns the chiral class of the atom. (see CHIRALITY_... constants)

Returns:
Chiral class.

setChiralClass

public void setChiralClass(java.lang.String chiralClass)
Sets the chiral class of the atom. (see CHIRALITY_... constants)

Parameters:
chiralClass - Chiral class.

getChiralOrder

public int getChiralOrder()
Returns the chiral order of the atom.

Returns:
Chiral order.

setChiralOrder

public void setChiralOrder(int chiralOrder)
Sets the chiral order of the atom.

Parameters:
chiralOrder - Chiral order.

getHydrogenCount

public int getHydrogenCount()
Returns the number of hydrogen atoms bonded with this atom.

Returns:
Number of hydrogen atoms.

setHydrogenCount

public void setHydrogenCount(int count)
Sets the number of hydrogen atoms bonded with this atom.

Parameters:
count - Number of hydrogen atoms.

getBondsCount

public int getBondsCount()
Returns the number of bonds of this atom.

Returns:
Number of bonds.

getBond

public SmilesBond getBond(int number)
Returns the bond at index number.

Parameters:
number - Bond number.
Returns:
Bond.

addBond

public void addBond(SmilesBond bond)
Add a bond to the atom.

Parameters:
bond - Bond to add.