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 
00041 #ifndef GCU_CHEMISTRY_H
00042 #define GCU_CHEMISTRY_H
00043 
00044 #include <glib.h>
00045 
00055 G_BEGIN_DECLS
00056 
00060 #define MAX_ELT 116
00061 
00071 enum gcu_spin_state
00072 {
00073         GCU_N_A_SPIN,
00074         GCU_LOW_SPIN,
00075         GCU_HIGH_SPIN
00076 };
00077 
00090 enum gcu_radius_type
00091 {
00092         GCU_RADIUS_UNKNOWN,
00093         GCU_ATOMIC,
00094         GCU_IONIC,
00095         GCU_METALLIC,
00096         GCU_COVALENT,
00097         GCU_VAN_DER_WAALS
00098 };
00099 
00103 typedef struct
00104 {
00106         double value;
00108         int prec;
00110         int delta;
00111 } GcuValue;
00112 
00116 typedef struct
00117 {
00119         double value;
00121         int prec;
00123         int delta;
00125         const char *unit;
00126 } GcuDimensionalValue;
00127 
00131 typedef struct
00132 {
00134         unsigned char Z;
00136         enum gcu_radius_type type;
00138         GcuDimensionalValue value;
00140         char charge;
00142         char const* scale;
00144         char cn;        //coordination number: -1: unspecified
00146         enum gcu_spin_state spin;
00147 } GcuAtomicRadius;
00148 
00152 typedef struct
00153 {
00155         unsigned char Z;
00157         GcuValue value;
00159         char const *scale;
00160 } GcuElectronegativity;
00161 
00165 typedef struct
00166 {
00168         unsigned char A;
00170         char *name;
00172         GcuValue abundance;
00174         GcuValue mass;
00176         char spin;
00178         char *decay_modes;
00180         GcuDimensionalValue decay_period;
00181 } GcuIsotope;
00182 
00189 const gdouble* gcu_element_get_default_color (gint Z);
00195 const gchar* gcu_element_get_symbol (gint Z);
00200 const gchar* gcu_element_get_name (gint Z);
00206 gint gcu_element_get_Z (gchar* symbol);
00224 gboolean gcu_element_get_radius (GcuAtomicRadius* radius);
00237 gboolean gcu_element_get_electronegativity (GcuElectronegativity* en);
00247 GcuDimensionalValue const *gcu_element_get_ionization_energy (int Z, int N);
00260 GcuDimensionalValue const *gcu_element_get_electron_affinity (int Z, int N);
00267 const GcuAtomicRadius** gcu_element_get_radii (gint Z);
00274 const GcuElectronegativity** gcu_element_get_electronegativities (gint Z);
00281 void gcu_element_load_databases (char* name, ...);
00282 
00289 gchar* gcu_value_get_string (GcuValue const *value);
00290 
00297 gchar* gcu_dimensional_value_get_string (GcuDimensionalValue const *value);
00298 
00299 G_END_DECLS
00300 
00301 #endif //GCU_CHEMISTRY_H

Generated on Sun Jan 27 05:15:54 2008 for The Gnome Chemistry Utils by  doxygen 1.5.4