1 // -*- C++ -*-
2 
3 /*
4  * Gnome Chemistry Utils
5  * gcu/objprops.h
6  *
7  * Copyright (C) 2007-2012 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 #ifndef GCU_OBJ_PROPS_H
26 #define GCU_OBJ_PROPS_H
27 
28 /*!\file
29 This file contains the list of symbolic Ids for objects properties as used in
30 gcu::Object::GetProperty and gcu::Object::SetProperty in conjunction with
31  serialization using the gcu::Loader class.
32 */
33 enum {
34 	// Common properties
35 /*!
36 The unique Id of the object.
37 */
38 	GCU_PROP_ID,
39 /*!
40 The position of an object in a 2D representation.
41 */
42 	GCU_PROP_POS2D,
43 /*!
44 The position of an object in a 3D representation.
45 */
46 	GCU_PROP_POS3D,
47 	// Document properties
48 /*!
49 The x coordinate of an object
50 */
51 	GCU_PROP_X,
52 /*!
53 The y coordinate of an object
54 */
55 	GCU_PROP_Y,
56 /*!
57 The z coordinate of an object
58 */
59 	GCU_PROP_Z,
60 /*!
61 The fractional x coordinate of an object
62 */
63 	GCU_PROP_XFRACT,
64 /*!
65 The fractional y coordinate of an object
66 */
67 	GCU_PROP_YFRACT,
68 /*!
69 The fractional z coordinate of an object
70 */
71 	GCU_PROP_ZFRACT,
72 /*!
73 The file name.
74 */
75 	GCU_PROP_DOC_FILENAME,
76 /*!
77 The mime type.
78 */
79 	GCU_PROP_DOC_MIMETYPE,
80 /*!
81 The title of the document.
82 */
83 	GCU_PROP_DOC_TITLE,
84 /*!
85 A text added to the document as comment.
86 */
87 	GCU_PROP_DOC_COMMENT,
88 /*!
89 Who created the file or the main author.
90 */
91 	GCU_PROP_DOC_CREATOR,
92 /*!
93 Who created the file or the main author.
94 */
95 	GCU_PROP_DOC_CREATOR_EMAIL,
96 /*!
97 The date of file creation.
98 */
99 	GCU_PROP_DOC_CREATION_TIME,
100 /*!
101 The date of the last file modification.
102 */
103 	GCU_PROP_DOC_MODIFICATION_TIME,
104 	// Theme related properties (might be doc properties in some formats)
105 /*!
106 The default bond length, to use when importing files with an unknown theme.
107 */
108 	GCU_PROP_THEME_BOND_LENGTH,
109 /*!
110 The number of coordinates units in one real unit. This is to import files with
111 a known theme but a scaled unit (like CDX).
112 */
113 	GCU_PROP_THEME_SCALE,
114 	// Atom properties
115 /*!
116 The symbol of an atom.
117 */
118 	GCU_PROP_ATOM_SYMBOL,
119 /*!
120 The atomic number of an atom.
121 */
122 	GCU_PROP_ATOM_Z,
123 /*!
124 The charge of an atom.
125 */
126 	GCU_PROP_ATOM_CHARGE,
127 /*!
128 The parity of an atom: a positive or negative integer followed by the ids of the four (or less) bonded atoms.
129 */
130 	GCU_PROP_ATOM_PARITY,
131 	// Bond properties
132 /*!
133 The Id of the atom at the first extremity of the bond.
134 */
135 	GCU_PROP_BOND_BEGIN,
136 /*!
137 The Id of the atom at the last extremity of the bond.
138 */
139 	GCU_PROP_BOND_END,
140 /*!
141 The bond order.
142 */
143 	GCU_PROP_BOND_ORDER,
144 /*!
145 The bond type: normal, hash, wedge,...
146 	 */
147 	GCU_PROP_BOND_TYPE, //normal, hash, wedge,...
148 /*!
149 The second line position of a double bond when seent from the start atom.
150 Legal values are auto, center, left and right. Anythin else is interpreted
151 as auto.
152 */
153 	GCU_PROP_BOND_DOUBLE_POSITION,
154 	// Text properties
155 /*!
156 The position of a text object. For a simple text, it is equivalent to
157 GCU_PROP_POS2D, but it is different for the text representing a chemical
158 fragment.
159 */
160 	GCU_PROP_TEXT_POSITION,
161 /*!
162 The text of a textual object.
163 */
164 	GCU_PROP_TEXT_TEXT,
165 /*!
166 The markup of a textual object.
167 */
168 	GCU_PROP_TEXT_MARKUP,
169 /*!
170 The alignment of a textual object.
171 */
172 	GCU_PROP_TEXT_ALIGNMENT,
173 /*!
174 The justification of a textual object.
175 */
176 	GCU_PROP_TEXT_JUSTIFICATION,
177 /*!
178 The distance between to consecutive lines.
179 */
180 	GCU_PROP_TEXT_INTERLINE,
181 /*!
182 The maximum line height.
183 */
184 	GCU_PROP_TEXT_MAX_LINE_HEIGHT,
185 /*!
186 true if line height is variable.
187 */
188 	GCU_PROP_TEXT_VARIABLE_LINE_HEIGHT,
189 /*!
190 The position in bytes of the bonded atom in a group of atoms.
191 */
192 	GCU_PROP_FRAGMENT_ATOM_START, // index of the start of the symbol of the bonded atom if any
193 /*!
194 The Id of the bonded atom in a group of atoms.
195 */
196 	GCU_PROP_FRAGMENT_ATOM_ID,
197 	// Arrows properties
198 /*!
199 The 2D coordinates of the start and end points of the arrow in the order xstart, ystart,
200 xend, yend, separated by white spaces.
201 */
202 	GCU_PROP_ARROW_COORDS,
203 /*!
204 The Id of the object representing the reactants.
205 */
206 	GCU_PROP_ARROW_START_ID,
207 /*!
208 The Id of the object representing the products.
209 */
210 	GCU_PROP_ARROW_END_ID,
211 /*!
212 The Id of the object representing the mesomer.
213 */
214 	GCU_PROP_MESOMER,
215 /*!
216 The Id of the stoichimetry coefficient.
217 */
218 	GCU_PROP_STOICHIOMETRY,
219 /*!
220 The Id of a molecule or of the text representing the molecule
221 */
222 	GCU_PROP_MOLECULE,
223 /*!
224 The Id of a molecule or text attached to an arrow
225 */
226 	GCU_PROP_ARROW_OBJECT,
227 /*!
228 The type of a reaction arrow ("double" for a reversible arrow).
229 */
230 	GCU_PROP_REACTION_ARROW_TYPE,
231 /*!
232 The a parameter of a crystal cell.
233 */
234 	GCU_PROP_CELL_A,
235 /*!
236 The b parameter of a crystal cell.
237 */
238 	GCU_PROP_CELL_B,
239 /*!
240 The c parameter of a crystal cell.
241 */
242 	GCU_PROP_CELL_C,
243 /*!
244 The alpha angle of a crystal cell.
245 */
246 	GCU_PROP_CELL_ALPHA,
247 /*!
248 The beta angle of a crystal cell.
249 */
250 	GCU_PROP_CELL_BETA,
251 /*!
252 The gamme angle of a crystal cell.
253 */
254 	GCU_PROP_CELL_GAMMA,
255 /*!
256 The common name of the chemical entity.
257 */
258 	GCU_PROP_CHEMICAL_NAME_COMMON,
259 /*!
260 The IUPAC name of the chemical entity.
261 */
262 	GCU_PROP_CHEMICAL_NAME_SYSTEMATIC,
263 /*!
264 The name of the mineral (see http://www.iucr.org/__data/iucr/cifdic_html/1/cif_core.dic/Ichemical_name_mineral.html).
265 */
266 	GCU_PROP_CHEMICAL_NAME_MINERAL,
267 /*!
268 The name of the structure type (see http://www.iucr.org/__data/iucr/cifdic_html/1/cif_core.dic/Ichemical_name_structure_type.html).
269 */
270 	GCU_PROP_CHEMICAL_NAME_STRUCTURE,
271 /*!
272 The name of the space group for a crystal. The Hall name is used as it is unique.
273 */
274 	GCU_PROP_SPACE_GROUP,
275 /******************************************************************************
276  * Spectrum related properties
277  ******************************************************************************/
278 /*!
279 The spectrum type, acceptable values are:
280 	"INFRARED SPECTRUM",
281 	"RAMAN SPECTRUM",
282 	"INFRARED PEAK TABLE",
283 	"INFRARED INTERFEROGRAM",
284 	"INFRARED TRANSFORMED SPECTRUM",
285 	"UV-VISIBLE SPECTRUM",
286 	"NMR SPECTRUM",
287 	"NMR FID",
288 	"NMR PEAK TABLE",
289 	"NMR PEAK ASSIGNMENTS",
290 	"MASS SPECTRUM",
291 	"UV-VIS SPECTRUM",
292 	"UV/VISIBLE SPECTRUM",
293 	"UV/VIS SPECTRUM".
294 */
295 	GCU_PROP_SPECTRUM_TYPE,
296 /*!
297 The data number of a spectrum.
298 */
299 	GCU_PROP_SPECTRUM_NPOINTS,
300 /*!
301 The x data of a spectrum.
302 */
303 	GCU_PROP_SPECTRUM_DATA_X,
304 /*!
305 The y data of a spectrum.
306 */
307 	GCU_PROP_SPECTRUM_DATA_Y,
308 /*!
309 The real components of a spectrum made of complex data.
310 */
311 	GCU_PROP_SPECTRUM_DATA_REAL,
312 /*!
313 The imaginary components of a spectrum made of complex data.
314 */
315 	GCU_PROP_SPECTRUM_DATA_IMAGINARY,
316 /*!
317 The x data unit for a spectrum, acceptable values are:
318 	"1/CM",
319 	"TRANSMITTANCE",
320 	"ABSORBANCE",
321 	"PPM",
322 	"NANOMETERS",
323 	"MICROMETERS",
324 	"SECONDS",
325 	"HZ",
326 	"M/Z",
327 	"RELATIVE ABUNDANCE".
328 */
329 	GCU_PROP_SPECTRUM_X_UNIT,
330 /*!
331 The lowest x datum of a spectrum.
332 */
333 	GCU_PROP_SPECTRUM_X_MIN,
334 /*!
335 The largest x datum of a spectrum.
336 */
337 	GCU_PROP_SPECTRUM_X_MAX,
338 /*!
339 The offset x datum of a spectrum.
340 */
341 	GCU_PROP_SPECTRUM_X_OFFSET,
342 /*!
343 The NMR spectrometer frequency.
344 */
345 	GCU_PROP_SPECTRUM_NMR_FREQ,
346 /*!
347 The first invalid value. It might be used as an error value.
348 */
349 	GCU_PROP_MAX
350 };
351 
352 #endif	//	GCU_OBJ_PROPS_H
353