chemistry.h

Go to the documentation of this file.
00001 // -*- C -*-
00002 
00003 /* 
00004  * Gnome Chemisty Utils
00005  * chemistry.h 
00006  *
00007  * Copyright (C) 2003-2006 Jean Bréfort <jean.brefort@normalesup.org>
00008  *
00009  * This program is free software; you can redistribute it and/or 
00010  * modify it under the terms of the GNU General Public License as 
00011  * published by the Free Software Foundation; either version 2 of the
00012  * License, or (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
00022  * USA
00023  */
00024 
00025 
00042 #ifndef GCU_CHEMISTRY_H
00043 #define GCU_CHEMISTRY_H
00044 
00045 #include <glib.h>
00046 
00056 G_BEGIN_DECLS
00057 
00061 #define MAX_ELT 116
00062 
00072 enum gcu_spin_state
00073 {
00074         GCU_N_A_SPIN,
00075         GCU_LOW_SPIN,
00076         GCU_HIGH_SPIN
00077 };
00078 
00091 enum gcu_radius_type
00092 {
00093         GCU_RADIUS_UNKNOWN,
00094         GCU_ATOMIC,
00095         GCU_IONIC,
00096         GCU_METALLIC,
00097         GCU_COVALENT,
00098         GCU_VAN_DER_WAALS
00099 };
00100 
00104 typedef struct
00105 {
00107         double value;
00109         int prec;
00111         int delta;
00112 } GcuValue;
00113 
00117 typedef struct
00118 {
00120         double value;
00122         int prec;
00124         int delta;
00126         const char *unit;
00127 } GcuDimensionalValue;
00128 
00132 typedef struct
00133 {
00135         unsigned char Z;
00137         enum gcu_radius_type type;
00139         GcuDimensionalValue value;
00141         char charge;
00143         char const* scale;
00145         char cn;        //coordination number: -1: unspecified
00147         enum gcu_spin_state spin;
00148 } GcuAtomicRadius;
00149 
00153 typedef struct
00154 {
00156         unsigned char Z;
00158         GcuValue value;
00160         char const *scale;
00161 } GcuElectronegativity;
00162 
00166 typedef struct
00167 {
00169         unsigned char A;
00171         char *name;
00173         GcuValue abundance;
00175         GcuValue mass;
00177         char spin;
00179         char *decay_modes;
00181         GcuDimensionalValue decay_period;
00182 } GcuIsotope;
00183 
00190 const gdouble* gcu_element_get_default_color (gint Z);
00196 const gchar* gcu_element_get_symbol (gint Z);
00201 const gchar* gcu_element_get_name (gint Z);
00207 gint gcu_element_get_Z (gchar* symbol);
00225 gboolean gcu_element_get_radius (GcuAtomicRadius* radius);
00238 gboolean gcu_element_get_electronegativity (GcuElectronegativity* en);
00248 GcuDimensionalValue const *gcu_element_get_ionization_energy (int Z, int N);
00261 GcuDimensionalValue const *gcu_element_get_electron_affinity (int Z, int N);
00268 const GcuAtomicRadius** gcu_element_get_radii (gint Z);
00275 const GcuElectronegativity** gcu_element_get_electronegativities (gint Z);
00282 void gcu_element_load_databases (char const *name, ...);
00283 
00290 gchar* gcu_value_get_string (GcuValue const *value);
00291 
00298 gchar* gcu_dimensional_value_get_string (GcuDimensionalValue const *value);
00299 
00300 G_END_DECLS
00301 
00302 #endif //GCU_CHEMISTRY_H

Generated on Sat Aug 23 23:10:07 2008 for The Gnome Chemistry Utils by  doxygen 1.5.6