00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
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;
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