The Gnome Chemistry Utils  0.12.11
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-2006 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 2 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 
43 #ifndef GCU_CHEMISTRY_H
44 #define GCU_CHEMISTRY_H
45 
46 #include <glib.h>
47 
57 G_BEGIN_DECLS
58 
62 #define MAX_ELT 116
63 
74 {
75  GCU_N_A_SPIN,
76  GCU_LOW_SPIN,
77  GCU_HIGH_SPIN
78 };
79 
93 {
94  GCU_RADIUS_UNKNOWN,
95  GCU_ATOMIC,
96  GCU_IONIC,
97  GCU_METALLIC,
98  GCU_COVALENT,
99  GCU_VAN_DER_WAALS
100 };
101 
105 typedef struct
106 {
108  double value;
110  int prec;
112  int delta;
113 } GcuValue;
114 
118 typedef struct
119 {
121  double value;
123  int prec;
125  int delta;
127  const char *unit;
129 
133 typedef struct
134 {
136  unsigned char Z;
142  char charge;
144  char const* scale;
146  char cn; //coordination number: -1: unspecified
150 
154 typedef struct
155 {
157  unsigned char Z;
161  char const *scale;
163 
167 typedef struct
168 {
170  unsigned char A;
172  char *name;
178  char spin;
180  char *decay_modes;
183 } GcuIsotope;
184 
191 const gdouble* gcu_element_get_default_color (gint Z);
197 const gchar* gcu_element_get_symbol (gint Z);
202 const gchar* gcu_element_get_name (gint Z);
208 gint gcu_element_get_Z (gchar* symbol);
226 gboolean gcu_element_get_radius (GcuAtomicRadius* radius);
269 const GcuAtomicRadius** gcu_element_get_radii (gint Z);
283 void gcu_element_load_databases (char const *name, ...);
284 
291 gchar* gcu_value_get_string (GcuValue const *value);
292 
300 
301 G_END_DECLS
302 
303 #endif //GCU_CHEMISTRY_H