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

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-2004
00008  *
00009  * Developed by Jean Bréfort <jean.brefort@normalesup.org>
00010  *
00011  * This program is free software; you can redistribute it and/or 
00012  * modify it under the terms of the GNU General Public License as 
00013  * published by the Free Software Foundation; either version 2 of the
00014  * License, or (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software
00023  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
00024  * USA
00025  */
00026 
00027 
00042 #ifndef GCU_CHEMISTRY_H
00043 #define GCU_CHEMISTRY_H
00044 
00045 #include <glib.h>
00046 
00056 G_BEGIN_DECLS
00057 
00058 #define MAX_ELT 116
00059 
00069 enum gcu_spin_state
00070 {
00071         GCU_N_A_SPIN,
00072         GCU_LOW_SPIN,
00073         GCU_HIGH_SPIN
00074 };
00075 
00088 enum gcu_radius_type
00089 {
00090         GCU_RADIUS_UNKNOWN,
00091         GCU_ATOMIC,
00092         GCU_IONIC,
00093         GCU_METALLIC,
00094         GCU_COVALENT,
00095         GCU_VAN_DER_WAALS
00096 };
00097 
00101 typedef struct
00102 {
00104         double value;
00106         int prec;
00108         int delta;
00109 } GcuValue;
00110 
00114 typedef struct
00115 {
00117         double value;
00119         int prec;
00121         int delta;
00123         const char *unit;
00124 } GcuDimensionalValue;
00125 
00129 typedef struct
00130 {
00132         unsigned char Z;
00134         enum gcu_radius_type type;
00136         GcuValue value;
00138         char charge;
00140         char* scale;
00142         char cn;        //coordination number: -1: unspecified
00144         enum gcu_spin_state spin;
00145 } GcuAtomicRadius;
00146 
00150 typedef struct
00151 {
00153         unsigned char Z;
00155         GcuValue value;
00157         char* scale;
00158 } GcuElectronegativity;
00159 
00163 typedef struct
00164 {
00166         unsigned char A;
00168         char *name;
00170         GcuValue abundance;
00172         GcuValue mass;
00174         char spin;
00176         char *decay_modes;
00178         GcuDimensionalValue decay_period;
00179 } GcuIsotope;
00180 
00187 const gdouble* gcu_element_get_default_color (gint Z);
00193 const gchar* gcu_element_get_symbol (gint Z);
00198 const gchar* gcu_element_get_name (gint Z);
00204 gint gcu_element_get_Z (gchar* symbol);
00222 gboolean gcu_element_get_radius (GcuAtomicRadius* radius);
00235 gboolean gcu_element_get_electronegativity (GcuElectronegativity* en);
00245 GcuDimensionalValue const *gcu_element_get_ionization_energy (int Z, int N);
00258 GcuDimensionalValue const *gcu_element_get_electron_affinity (int Z, int N);
00265 const GcuAtomicRadius** gcu_element_get_radii (gint Z);
00272 const GcuElectronegativity** gcu_element_get_electronegativities (gint Z);
00279 void gcu_element_load_databases (char* name, ...);
00280 
00281 gchar* gcu_value_get_string (GcuValue const *value);
00282 gchar* gcu_dimensional_value_get_string (GcuDimensionalValue const *value);
00283 
00284 G_END_DECLS
00285 
00286 #endif //GCU_CHEMISTRY_H

Generated on Sun Jan 1 14:15:49 2006 for The Gnome Chemistry Utils by  doxygen 1.4.1