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

gcu::Element Class Reference

#include <chemistry/element.h>

List of all members.

Public Member Functions

int GetZ ()
const char * GetSymbol ()
char GetDefaultValence ()
unsigned GetMaxBonds ()
bool GetBestSide ()
double * GetDefaultColor ()
const char * GetName ()
const GcuAtomicRadius ** GetRadii ()
const GcuElectronegativity ** GetElectronegativities ()

Static Public Member Functions

const gchar * Symbol (gint Z)
bool BestSide (gint Z)
gint Z (const gchar *symbol)
ElementGetElement (gint Z)
ElementGetElement (const gchar *symbol)
bool GetRadius (GcuAtomicRadius *radius)
bool GetElectronegativity (GcuElectronegativity *en)
unsigned GetMaxBonds (gint Z)


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

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 156 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 161 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 144 of file element.h.

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.

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
  • 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.

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.

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.

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 150 of file element.h.

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.

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 165 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.

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 139 of file element.h.

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

Returns:
The atomic number of the chemical element.

Definition at line 135 of file element.h.

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.

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 Sun Feb 8 10:31:58 2004 for The Gnome Chemistry Utils by doxygen 1.3.3