~ubuntu-branches/debian/stretch/openbabel/stretch

« back to all changes in this revision

Viewing changes to include/inchi103/incomdef.h

  • Committer: Package Import Robot
  • Author(s): Daniel Leidert
  • Date: 2013-05-22 19:08:27 UTC
  • mfrom: (1.1.11) (7.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20130522190827-72q0fnx5y2nm3bc0
Tags: 2.3.2+dfsg-1
* New upstream release.
* debian/control: Dropped DM-Upload-Allowed field.
  (Standards-Version): Bumped to 3.9.4.
* debian/copyright: Massive update.
* debian/upstream: Author name update.
* debian/get-orig-source.sh: Remove the windows-*/ directory too.
* debian/openbabel.install: Removed roundtrip manpage.
* debian/openbabel-gui.install: Fixed manpage name.
* debian/openbabel-gui.links: Removed unused file.
* debian/rules: Enable OpenMP. Disable tests on `nocheck'.
* debian/patches/gaussformat_nosym.patch: Dropped. Applied upstream.
* debian/patches/moldenformat_coordonly.patch: Ditto.
* debian/patches/obspectrophore_man.patch: Ditto.
* debian/patches/fix_ftbfs.patch: Added.
  - Fix several FTBFS issues in upstream build system.
* debian/patches/series: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * International Chemical Identifier (InChI)
3
 
 * Version 1
4
 
 * Software version 1.03
5
 
 * May 9, 2010
6
 
 *
7
 
 * Originally developed at NIST
8
 
 * Modifications and additions by IUPAC and the InChI Trust
9
 
 *
10
 
 * The InChI library and programs are free software developed under the
11
 
 * auspices of the International Union of Pure and Applied Chemistry (IUPAC);
12
 
 * you can redistribute this software and/or modify it under the terms of 
13
 
 * the GNU Lesser General Public License as published by the Free Software 
14
 
 * Foundation:
15
 
 * http://www.opensource.org/licenses/lgpl-2.1.php
16
 
 */
17
 
 
18
 
 
19
 
/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20
 
Former COMDEF.H
21
 
Renamed 06/12/07 to avoid occassional conflict with Microsoft's COMDEF.H
22
 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
23
 
/* common definitions -- do not change */
24
 
#ifndef __INCOMDEF_H__
25
 
#define __INCOMDEF_H__
26
 
 
27
 
#include "ichisize.h"
28
 
 
29
 
 
30
 
/* SDF treatment */
31
 
#define MAX_SDF_HEADER        64 /* max length of the SDFile data header */
32
 
#define MAX_SDF_VALUE        255 /* max lenght of the SDFile data value */
33
 
 
34
 
/* size resrictions */
35
 
#define ATOM_EL_LEN           6  /* length of atom name string including zero termination */
36
 
#define ATOM_INFO_LEN         36 /* inf_ATOM output string ^123Al^+2H12..(+)/999/999/999/999: 32 chars */
37
 
#define MAXVAL                20 /* max number of bonds per atom */
38
 
#define MAX_STEREO_BONDS      3  /* max number of stereogenic bonds per atom */
39
 
#define NUM_H_ISOTOPES        3  /* number of hydrogen isotopes: protium, deuterium, tritium */
40
 
#define ATW_H                 1  /* hydrogen atomic weight */
41
 
 
42
 
/* input bond type definition */
43
 
#define MIN_INPUT_BOND_TYPE 1
44
 
#define MAX_INPUT_BOND_TYPE 4
45
 
 
46
 
#define BOND_TYPE_SINGLE    1
47
 
#define BOND_TYPE_DOUBLE    2
48
 
#define BOND_TYPE_TRIPLE    3
49
 
#define BOND_TYPE_ALTERN    4
50
 
 
51
 
#define STEREO_SNGL_UP       1
52
 
#define STEREO_SNGL_EITHER   4
53
 
#define STEREO_SNGL_DOWN     6
54
 
#define STEREO_DBLE_EITHER   3
55
 
 
56
 
 
57
 
/* MOlfile */
58
 
#define INPUT_STEREO_SNGL_UP       1
59
 
#define INPUT_STEREO_SNGL_EITHER   4
60
 
#define INPUT_STEREO_SNGL_DOWN     6
61
 
#define INPUT_STEREO_DBLE_EITHER   3
62
 
 
63
 
/*
64
 
#define BOND_MARK_ODD      0x10
65
 
#define BOND_MARK_EVEN     0x20
66
 
*/
67
 
#define BOND_MARK_PARITY    0x30
68
 
#define BOND_MARK_HIGHLIGHT 0x40  /* highlight equivalent components */
69
 
 
70
 
#define BOND_MARK_ODD      '-'
71
 
#define BOND_MARK_EVEN     '+'
72
 
#define BOND_MARK_UNDF     '?'
73
 
#define BOND_MARK_UNKN     'u'
74
 
#define BOND_MARK_ERR      '*'
75
 
 
76
 
#define SALT_DONOR_H      1
77
 
#define SALT_DONOR_Neg    2
78
 
#define SALT_ACCEPTOR     4
79
 
#define SALT_p_DONOR      8  /* >C-SH   */
80
 
#define SALT_p_ACCEPTOR  16  /* >C-S(-) */
81
 
#define SALT_DONOR_ALL     (SALT_DONOR_Neg | SALT_DONOR_H | SALT_p_ACCEPTOR | SALT_p_DONOR)
82
 
#define SALT_DONOR_Neg2    (SALT_DONOR_Neg | SALT_p_ACCEPTOR)
83
 
#define SALT_DONOR_H2      (SALT_DONOR_H   | SALT_p_DONOR)
84
 
#define SALT_DONOR         (SALT_DONOR_Neg | SALT_DONOR_H)
85
 
 
86
 
#define SALT_SELECTED    32
87
 
 
88
 
/* radical definitions */
89
 
#define RADICAL_SINGLET 1
90
 
#define RADICAL_DOUBLET 2
91
 
#define RADICAL_TRIPLET 3
92
 
 
93
 
/* metal definition */
94
 
#define METAL           1          /* definition of an element: lowest valence */
95
 
#define METAL2          3          /* definition of an element: lowest and next to it valence */
96
 
#define IS_METAL        3          /* metal bitmap */
97
 
/* isotopic shift */
98
 
#define ZERO_ATW_DIFF        127   /* mark mass of the most abundant isotope */
99
 
 
100
 
/* other types */
101
 
 
102
 
#define UCINT  (int)(unsigned char)
103
 
 
104
 
#ifndef INCHI_US_CHAR_DEF
105
 
typedef signed char   S_CHAR;
106
 
typedef unsigned char U_CHAR;
107
 
#define INCHI_US_CHAR_DEF
108
 
#endif
109
 
 
110
 
#ifndef INCHI_US_SHORT_DEF
111
 
typedef signed short   S_SHORT;
112
 
typedef unsigned short U_SHORT;
113
 
#define INCHI_US_SHORT_DEF
114
 
#endif
115
 
 
116
 
/* BILLY 8/6/04 */
117
 
#ifndef INCHI_ALL_CPP
118
 
#ifdef __cplusplus
119
 
extern "C" {
120
 
#endif
121
 
#endif
122
 
 
123
 
#define STR_ERR_LEN 256
124
 
int AddMOLfileError( char *pStrErr, const char *szMsg );
125
 
 
126
 
/* allocator */
127
 
#ifndef inchi_malloc
128
 
void *inchi_malloc(size_t c);
129
 
#endif
130
 
#ifndef inchi_calloc
131
 
void *inchi_calloc(size_t c, size_t n);
132
 
#endif
133
 
#ifndef inchi_free
134
 
void inchi_free(void *p);
135
 
#endif
136
 
 
137
 
 
138
 
 
139
 
/* sorting etc */
140
 
void inchi_swap ( char *a, char *b, size_t width );
141
 
int insertions_sort( void *base, size_t num, size_t width, int ( *compare )(const void *e1, const void *e2 ) );
142
 
int insertions_sort_AT_NUMBERS( AT_NUMB *base, int num, int ( *compare )(const void *e1, const void *e2 ) );
143
 
 
144
 
 
145
 
#define MOLFILE_ERR_FIN(err, new_err, err_fin, msg) \
146
 
        if ( !(err) && (new_err) ) { (err) = (new_err);} AddMOLfileError(pStrErr, (msg)); goto err_fin
147
 
#define MOLFILE_ERR_SET(err, new_err, msg) \
148
 
        if ( !(err) && (new_err) ) { (err) = (new_err);} AddMOLfileError(pStrErr, (msg))
149
 
 
150
 
 
151
 
/* BILLY 8/6/04 */
152
 
#ifndef INCHI_ALL_CPP
153
 
#ifdef __cplusplus
154
 
}
155
 
#endif
156
 
#endif
157
 
 
158
 
#endif  /* __INCOMDEF_H__ */
159