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 
00057 #define MAX_ELT 116
00058 
00068 enum gcu_spin_state
00069 {
00070         GCU_N_A_SPIN,
00071         GCU_LOW_SPIN,
00072         GCU_HIGH_SPIN
00073 };
00074 
00087 enum gcu_radius_type
00088 {
00089         GCU_RADIUS_UNKNOWN,
00090         GCU_ATOMIC,
00091         GCU_IONIC,
00092         GCU_METALLIC,
00093         GCU_COVALENT,
00094         GCU_VAN_DER_WAALS
00095 };
00096 
00100 typedef struct
00101 {
00103         double value;
00105         int prec;
00107         int delta;
00108 } GcuValue;
00109 
00113 typedef struct
00114 {
00116         double value;
00118         int prec;
00120         int delta;
00122         const char *unit;
00123 } GcuDimensionalValue;
00124 
00128 typedef struct
00129 {
00131         unsigned char Z;
00133         enum gcu_radius_type type;
00135         GcuDimensionalValue value;
00137         char charge;
00139         char* scale;
00141         char cn;        //coordination number: -1: unspecified
00143         enum gcu_spin_state spin;
00144 } GcuAtomicRadius;
00145 
00149 typedef struct
00150 {
00152         unsigned char Z;
00154         GcuValue value;
00156         char* scale;
00157 } GcuElectronegativity;
00158 
00162 typedef struct
00163 {
00165         unsigned char A;
00167         char *name;
00169         GcuValue abundance;
00171         GcuValue mass;
00173         char spin;
00175         char *decay_modes;
00177         GcuDimensionalValue decay_period;
00178 } GcuIsotope;
00179 
00186 const gdouble* gcu_element_get_default_color (gint Z);
00192 const gchar* gcu_element_get_symbol (gint Z);
00197 const gchar* gcu_element_get_name (gint Z);
00203 gint gcu_element_get_Z (gchar* symbol);
00221 gboolean gcu_element_get_radius (GcuAtomicRadius* radius);
00234 gboolean gcu_element_get_electronegativity (GcuElectronegativity* en);
00244 GcuDimensionalValue const *gcu_element_get_ionization_energy (int Z, int N);
00257 GcuDimensionalValue const *gcu_element_get_electron_affinity (int Z, int N);
00264 const GcuAtomicRadius** gcu_element_get_radii (gint Z);
00271 const GcuElectronegativity** gcu_element_get_electronegativities (gint Z);
00278 void gcu_element_load_databases (char* name, ...);
00279 
00286 gchar* gcu_value_get_string (GcuValue const *value);
00287 
00294 gchar* gcu_dimensional_value_get_string (GcuDimensionalValue const *value);
00295 
00296 G_END_DECLS
00297 
00298 #endif //GCU_CHEMISTRY_H

Generated on Tue Aug 15 10:47:35 2006 for The Gnome Chemistry Utils by  doxygen 1.4.7