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-2006
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 
00043 #ifndef GCU_CHEMISTRY_H
00044 #define GCU_CHEMISTRY_H
00045 
00046 #include <glib.h>
00047 
00057 G_BEGIN_DECLS
00058 
00059 #define MAX_ELT 116
00060 
00070 enum gcu_spin_state
00071 {
00072         GCU_N_A_SPIN,
00073         GCU_LOW_SPIN,
00074         GCU_HIGH_SPIN
00075 };
00076 
00089 enum gcu_radius_type
00090 {
00091         GCU_RADIUS_UNKNOWN,
00092         GCU_ATOMIC,
00093         GCU_IONIC,
00094         GCU_METALLIC,
00095         GCU_COVALENT,
00096         GCU_VAN_DER_WAALS
00097 };
00098 
00102 typedef struct
00103 {
00105         double value;
00107         int prec;
00109         int delta;
00110 } GcuValue;
00111 
00115 typedef struct
00116 {
00118         double value;
00120         int prec;
00122         int delta;
00124         const char *unit;
00125 } GcuDimensionalValue;
00126 
00130 typedef struct
00131 {
00133         unsigned char Z;
00135         enum gcu_radius_type type;
00137         GcuDimensionalValue value;
00139         char charge;
00141         char* scale;
00143         char cn;        //coordination number: -1: unspecified
00145         enum gcu_spin_state spin;
00146 } GcuAtomicRadius;
00147 
00151 typedef struct
00152 {
00154         unsigned char Z;
00156         GcuValue value;
00158         char* scale;
00159 } GcuElectronegativity;
00160 
00164 typedef struct
00165 {
00167         unsigned char A;
00169         char *name;
00171         GcuValue abundance;
00173         GcuValue mass;
00175         char spin;
00177         char *decay_modes;
00179         GcuDimensionalValue decay_period;
00180 } GcuIsotope;
00181 
00188 const gdouble* gcu_element_get_default_color (gint Z);
00194 const gchar* gcu_element_get_symbol (gint Z);
00199 const gchar* gcu_element_get_name (gint Z);
00205 gint gcu_element_get_Z (gchar* symbol);
00223 gboolean gcu_element_get_radius (GcuAtomicRadius* radius);
00236 gboolean gcu_element_get_electronegativity (GcuElectronegativity* en);
00246 GcuDimensionalValue const *gcu_element_get_ionization_energy (int Z, int N);
00259 GcuDimensionalValue const *gcu_element_get_electron_affinity (int Z, int N);
00266 const GcuAtomicRadius** gcu_element_get_radii (gint Z);
00273 const GcuElectronegativity** gcu_element_get_electronegativities (gint Z);
00280 void gcu_element_load_databases (char* name, ...);
00281 
00288 gchar* gcu_value_get_string (GcuValue const *value);
00289 
00296 gchar* gcu_dimensional_value_get_string (GcuDimensionalValue const *value);
00297 
00298 G_END_DECLS
00299 
00300 #endif //GCU_CHEMISTRY_H

Generated on Wed Feb 8 09:59:43 2006 for The Gnome Chemistry Utils by  doxygen 1.4.1