Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

gcu::Element Class Reference

#include <gcu/element.h>

List of all members.

Public Member Functions

double GetWeight (int Z, int &prec)
int GetZ ()
const char * GetSymbol ()
char GetDefaultValence ()
unsigned GetMaxBonds ()
bool GetBestSide ()
double * GetDefaultColor ()
const char * GetName ()
const GcuAtomicRadius ** GetRadii ()
const GcuElectronegativity ** GetElectronegativities ()
unsigned GetValenceElectrons ()
unsigned GetTotalValenceElectrons ()
unsigned GetMaxValenceElectrons ()
double GetWeight (int &prec)
IsotopicPatternGetIsotopicPattern (unsigned natoms)
string const & GetElectronicConfiguration ()
map< string, string > const & GetNames ()
GcuDimensionalValue const * GetIonizationEnergy (unsigned rank=1)
GcuDimensionalValue const * GetElectronAffinity (unsigned rank=1)

Static Public Member Functions

static const gchar * Symbol (gint Z)
static bool BestSide (gint Z)
static gint Z (const gchar *symbol)
static ElementGetElement (gint Z)
static ElementGetElement (const gchar *symbol)
static bool GetRadius (GcuAtomicRadius *radius)
static bool GetElectronegativity (GcuElectronegativity *en)
static unsigned GetMaxBonds (gint Z)
static void LoadRadii ()
static void LoadElectronicProps ()
static void LoadIsotopes ()
static void LoadAllData ()


Detailed Description

Represents a chemical element. This class has no public constructor or destructor. The instances are created by the framework from data in the elements.xml file and a user cannot create a new element.

Definition at line 51 of file element.h.


Member Function Documentation

static bool gcu::Element::BestSide gint  Z  )  [static]
 

Parameters:
Z: the atomic number of a chemical element.
This static method is used to know on what side of the symbol of the element whose atomic number is Z attached hydrogens should be written.
Returns:
true if hydrogens should be written on the right and false when it should be written on the left side.

bool gcu::Element::GetBestSide  )  [inline]
 

This static method is used to know on what side of the symbol of the element attached hydrogens should be written.

Returns:
true if hydrogens should be written on the right and false when it should be written on the left side.

Definition at line 182 of file element.h.

double* gcu::Element::GetDefaultColor  )  [inline]
 

Retreives the default color used for the element.

Returns:
an array of three double values for the red, green and blue components of the color.

Definition at line 187 of file element.h.

char gcu::Element::GetDefaultValence  )  [inline]
 

Returns:
The default valence of the element for some elements, mainly non metals. For others, the returned value is -1 and should not be taken into account.

Definition at line 170 of file element.h.

GcuDimensionalValue const* gcu::Element::GetElectronAffinity unsigned  rank = 1  ) 
 

Parameters:
rank: the rank of the electron affinity.
Returns:
the requested electron affinity as a &GcuDimensionalValue. For most elements, only the first is known.

const GcuElectronegativity** gcu::Element::GetElectronegativities  ) 
 

Returns:
a pointer to the array of pointers to GcuElectronegativity structures for all known electronegativities for the element. Last value in the array is NULL.

static bool gcu::Element::GetElectronegativity GcuElectronegativity en  )  [static]
 

Parameters:
en: a pointer to a GcuElectronegativity structure.
Before calling this function, the following fields in the GcuElectronegativity structure must be filled:
  • Z: the atomic number, mandatory
  • type: the gcu_radius_type, mandatory
  • charge: the charge of the atom, mandatory; must be 0 for non ionic radii and non null for ionic radii.
  • scale: the name of the scale (e.g. "Pauling") or NULL

The programs searches an electronegativity value for the element in the scale if given. If one is found the value and the scale (if NULL on calling) are given the corresponding values of the first match before returning.

Returns:
true if a match has been found and false if not.

string const& gcu::Element::GetElectronicConfiguration  )  [inline]
 

Returns:
the fundamental electronic configuration for the element. The returned string is formated as a pango markup, with electron numbers for each sublevel as superscript.

Definition at line 234 of file element.h.

static Element* gcu::Element::GetElement const gchar *  symbol  )  [static]
 

Parameters:
symbol: the symbol of a chemical element.
Returns:
a pointer to the Element whose symbol is used as parameter or NULL if the element is unknown.

static Element* gcu::Element::GetElement gint  Z  )  [static]
 

Parameters:
Z: the atomic number of a chemical element.
Returns:
a pointer to the Element whose atomic number is Z or NULL if the element is unknown.

GcuDimensionalValue const* gcu::Element::GetIonizationEnergy unsigned  rank = 1  ) 
 

Parameters:
rank: the rank of the ionization.
Returns:
the requested ionization energy as a &GcuDimensionalValue.

IsotopicPattern* gcu::Element::GetIsotopicPattern unsigned  natoms  ) 
 

Parameters:
natoms: atoms count.
Returns:
the isotopic pattern correponding to a fragment containing n atoms of the element.

unsigned gcu::Element::GetMaxBonds  )  [inline]
 

The value returned by this method might be too low in some cases and is only indicative. Instances of the Atom class accept any number of bonds. This behavior might change in future versions.

Returns:
the maximum number of bonds an atom of the element can be involved in.

Definition at line 176 of file element.h.

static unsigned gcu::Element::GetMaxBonds gint  Z  )  [static]
 

Parameters:
Z: the atomic number of a chemical element.
The value returned by this method might be too low in some cases and is only indicative. Instances of the Atom class accept any number of bonds. This behavior might change in future versions.
Returns:
the maximum number of bonds an atom of the element can be involved in.

unsigned gcu::Element::GetMaxValenceElectrons  )  [inline]
 

Returns:
the maximume number of valence electrons of the neutral atom, including d and f electrons.

Definition at line 215 of file element.h.

const char* gcu::Element::GetName  )  [inline]
 

Returns:
the name of the element in the current locale or in english if the current locale is not supported in the database.

Definition at line 191 of file element.h.

map<string, string> const& gcu::Element::GetNames  )  [inline]
 

Returns:
the map of known names for the element indexed by language.

Definition at line 238 of file element.h.

const GcuAtomicRadius** gcu::Element::GetRadii  ) 
 

Returns:
a pointer to the array of pointers to GcuAtomicRadius structures for all known radii for the element. Last value in the array is NULL.

static bool gcu::Element::GetRadius GcuAtomicRadius radius  )  [static]
 

Parameters:
radius: a pointer to a GcuAtomicRadius structure.
Before calling this function, most fields in the GcuAtomicRadius structure must be filled:
  • Z: the atomic number, mandatory
  • type: the type of the radius searched
  • charge: the charge of the atom. 0 for all radii except ionic radii.
  • cn: the coordination number or -1 if not significant
  • spin: the spin state or GCU_N_A_SPIN if not significant
  • scale: the name of the scale (e.g. "Pauling") or NULL

The programs searches a value corresponding to the fields having a non default value. If one is found the other fields are given the corresponding values f the first match before returning.

Returns:
true if a radius has been found and false if not.

const char* gcu::Element::GetSymbol  )  [inline]
 

Returns:
The chemical symbol of the element.

Definition at line 165 of file element.h.

unsigned gcu::Element::GetTotalValenceElectrons  )  [inline]
 

Returns:
the number of valence electrons of the neutral atom, including d and f electrons.

Definition at line 210 of file element.h.

unsigned gcu::Element::GetValenceElectrons  )  [inline]
 

Returns:
the number of valence electrons of the neutral atom.

Definition at line 205 of file element.h.

double gcu::Element::GetWeight int &  prec  )  [inline]
 

Parameters:
prec: receive the number of significant digits.
Returns:
the atomic mass of the element.

Definition at line 221 of file element.h.

double gcu::Element::GetWeight int  Z,
int &  prec
 

Parameters:
Z: the atomic number of a chemical element.
prec: receive the number of significant digits.
Returns:
the atomic mass of the element.

int gcu::Element::GetZ  )  [inline]
 

Returns:
The atomic number of the chemical element.

Definition at line 161 of file element.h.

static void gcu::Element::LoadAllData  )  [static]
 

Loads all databases.

static void gcu::Element::LoadElectronicProps  )  [static]
 

Loads the atomic electronic properties database.

static void gcu::Element::LoadIsotopes  )  [static]
 

Loads the isotopes database.

static void gcu::Element::LoadRadii  )  [static]
 

Loads the atomic radii database.

static const gchar* gcu::Element::Symbol gint  Z  )  [static]
 

Parameters:
Z: the atomic number of a chemical element.
Returns:
The chemical symbol of the element whose atomic number is Z or NULL if the element is unknown.

static gint gcu::Element::Z const gchar *  symbol  )  [static]
 

Parameters:
symbol: the symbol of a chemical element.
Returns:
The atomic number of the element whose chemical symbol is used as parameter or 0 if the element is unknown.


The documentation for this class was generated from the following file:
Generated on Mon Feb 27 09:56:07 2006 for The Gnome Chemistry Utils by  doxygen 1.4.1