org.jmol.smiles

Class SmilesAtom

public class SmilesAtom extends Object

This class represents an atom in a SmilesMolecule.
Field Summary
intatomicMass
SmilesBond[]bonds
intbondsCount
intcharge
StringchiralClass
intchiralOrder
static StringCHIRALITY_ALLENE
Constant used for Allene chirality.
static StringCHIRALITY_OCTAHEDRAL
Constant used for Octahedral chirality.
static StringCHIRALITY_SQUARE_PLANAR
Constant used for Square Planar chirality.
static StringCHIRALITY_TETRAHEDRAL
Constant used for Tetrahedral chirality.
static StringCHIRALITY_TRIGONAL_BIPYRAMIDAL
Constant used for Trigonal Bipyramidal chirality.
static StringDEFAULT_CHIRALITY
Constant used for default chirality.
inthydrogenCount
static intINITIAL_BONDS
intmatchingAtom
intnumber
Stringsymbol
Constructor Summary
SmilesAtom(int number)
Constructs a SmilesAtom.
Method Summary
voidaddBond(SmilesBond bond)
Add a bond to the atom.
voidcreateMissingHydrogen(SmilesMolecule molecule)
Creates missing hydrogen atoms in a SmilesMolecule.
intgetAtomicMass()
Returns the atomic mass of the atom.
SmilesBondgetBond(int number)
Returns the bond at index number.
intgetBondsCount()
Returns the number of bonds of this atom.
intgetCharge()
Returns the charge of the atom.
StringgetChiralClass()
Returns the chiral class of the atom. (see CHIRALITY_... constants)
intgetChiralOrder()
Returns the chiral order of the atom.
intgetHydrogenCount()
Returns the number of hydrogen atoms bonded with this atom.
intgetMatchingAtom()
Returns the number of a matching atom in a molecule.
intgetNumber()
Returns the atom number of the atom.
StringgetSymbol()
Returns the symbol of the atom.
voidsetAtomicMass(int mass)
Sets the atomic mass of the atom.
voidsetCharge(int charge)
Sets the charge of the atom.
voidsetChiralClass(String chiralClass)
Sets the chiral class of the atom. (see CHIRALITY_... constants)
voidsetChiralOrder(int chiralOrder)
Sets the chiral order of the atom.
voidsetHydrogenCount(int count)
Sets the number of hydrogen atoms bonded with this atom.
voidsetMatchingAtom(int atom)
Sets the number of a matching atom in a molecule.
voidsetSymbol(String symbol)
Sets the symbol of the atm.

Field Detail

atomicMass

private int atomicMass

bonds

private SmilesBond[] bonds

bondsCount

private int bondsCount

charge

private int charge

chiralClass

private String chiralClass

chiralOrder

private int chiralOrder

CHIRALITY_ALLENE

public static final String CHIRALITY_ALLENE
Constant used for Allene chirality.

CHIRALITY_OCTAHEDRAL

public static final String CHIRALITY_OCTAHEDRAL
Constant used for Octahedral chirality.

CHIRALITY_SQUARE_PLANAR

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

CHIRALITY_TETRAHEDRAL

public static final String CHIRALITY_TETRAHEDRAL
Constant used for Tetrahedral chirality.

CHIRALITY_TRIGONAL_BIPYRAMIDAL

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

DEFAULT_CHIRALITY

public static final String DEFAULT_CHIRALITY
Constant used for default chirality.

hydrogenCount

private int hydrogenCount

INITIAL_BONDS

private static final int INITIAL_BONDS

matchingAtom

private int matchingAtom

number

private int number

symbol

private String symbol

Constructor Detail

SmilesAtom

public SmilesAtom(int number)
Constructs a SmilesAtom.

Parameters: number Atom number in the molecule.

Method Detail

addBond

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

Parameters: bond Bond to add.

createMissingHydrogen

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

Parameters: molecule Molecule containing the atom.

getAtomicMass

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

Returns: Atomic mass.

getBond

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

Parameters: number Bond number.

Returns: Bond.

getBondsCount

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

Returns: Number of bonds.

getCharge

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

Returns: Charge.

getChiralClass

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

Returns: Chiral class.

getChiralOrder

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

Returns: Chiral order.

getHydrogenCount

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

Returns: Number of hydrogen atoms.

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.

getNumber

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

Returns: Atom number.

getSymbol

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

Returns: Atom symbol.

setAtomicMass

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

Parameters: mass Atomic mass.

setCharge

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

Parameters: charge Charge.

setChiralClass

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

Parameters: chiralClass Chiral class.

setChiralOrder

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

Parameters: chiralOrder Chiral order.

setHydrogenCount

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

Parameters: count Number of hydrogen atoms.

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.

setSymbol

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

Parameters: symbol Atom symbol.