The Gnome Chemistry Utils  0.14.0
chemistry.h
Go to the documentation of this file.
1 // -*- C -*-
2 
3 /*
4  * Gnome Chemisty Utils
5  * chemistry.h
6  *
7  * Copyright (C) 2003-2011 Jean Bréfort <jean.brefort@normalesup.org>
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License as
11  * published by the Free Software Foundation; either version 3 of the
12  * License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
22  * USA
23  */
24 
25 
44 #ifndef GCU_CHEMISTRY_H
45 #define GCU_CHEMISTRY_H
46 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
63 #define MAX_ELT 116
64 
75 {
76  GCU_N_A_SPIN,
77  GCU_LOW_SPIN,
78  GCU_HIGH_SPIN
79 };
80 
94 {
95  GCU_RADIUS_UNKNOWN,
96  GCU_ATOMIC,
97  GCU_IONIC,
98  GCU_METALLIC,
99  GCU_COVALENT,
100  GCU_VAN_DER_WAALS
101 };
102 
106 typedef struct
107 {
109  double value;
111  int prec;
113  int delta;
114 } GcuValue;
115 
119 typedef struct
120 {
122  double value;
124  int prec;
126  int delta;
128  const char *unit;
130 
134 typedef struct
135 {
137  unsigned char Z;
143  char charge;
145  char const* scale;
147  char cn; //coordination number: -1: unspecified
151 
155 typedef struct
156 {
158  unsigned char Z;
162  char const *scale;
164 
168 typedef struct
169 {
171  unsigned char A;
173  char *name;
179  char spin;
181  char *decay_modes;
184 } GcuIsotope;
185 
192 const double* gcu_element_get_default_color (int Z);
198 const char* gcu_element_get_symbol (int Z);
203 const char* gcu_element_get_name (int Z);
209 int gcu_element_get_Z (char* symbol);
275 char const *gcu_element_get_electronic_configuration (int Z);
282 const GcuAtomicRadius** gcu_element_get_radii (int Z);
296 void gcu_element_load_databases (char const *name, ...);
297 
304 char* gcu_value_get_string (GcuValue const *value);
305 
313 
314 #ifdef __cplusplus
315 } // extern "C"
316 #endif
317 
318 #endif //GCU_CHEMISTRY_H