2
* International Chemical Identifier (InChI)
4
* Software version 1.03
7
* Originally developed at NIST
8
* Modifications and additions by IUPAC and the InChI Trust
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
15
* http://www.opensource.org/licenses/lgpl-2.1.php
19
#ifndef __INCHICMP_H__
20
#define __INCHICMP_H__
22
typedef enum tagInchiCompareDiffBits {
23
INCHIDIFF_ZERO = 0x00000000,
24
INCHIDIFF_PROBLEM = 0x00000001, /* severe: at least one InChI does not exist */
25
INCHIDIFF_NUM_AT = 0x00000001, /* severe: different number of atoms in the skeleton */
26
INCHIDIFF_ATOMS = 0x00000001, /* severe: diiferent types of skeleton atoms */
27
INCHIDIFF_NUM_EL = 0x00000001, /* severe: formulas differ in another element */
28
INCHIDIFF_CON_LEN = 0x00000001, /* severe: different connection table lengths */
29
INCHIDIFF_CON_TBL = 0x00000001, /* severe: different connection tables */
30
INCHIDIFF_POSITION_H = 0x00000002, /* difference in non-taut (Mobile-H) or all H (Fixed-H) location/number */
31
INCHIDIFF_MORE_FH = 0x00000004, /* extra fixed H */
32
INCHIDIFF_LESS_FH = 0x00000004, /* missing fixed H */
33
INCHIDIFF_MORE_H = 0x00000008, /* formulas differ in number of H */
34
INCHIDIFF_LESS_H = 0x00000008, /* formulas differ in number of H */
35
INCHIDIFF_NO_TAUT = 0x00000010, /* restored structure has no taut groups while the original InChI has some */
36
INCHIDIFF_WRONG_TAUT = 0x00000020, /* restored has tautomerism while the original does not have it */
37
INCHIDIFF_SINGLE_TG = 0x00000040, /* restored has 1 taut. group while the original InChI has multiple tg */
38
INCHIDIFF_MULTIPLE_TG = 0x00000080, /* restored has multiple tg while the original InChI has only one tg */
39
INCHIDIFF_EXTRA_TG_ENDP = 0x00000100, /* extra tautomeric endpoint(s) in restored structure */
40
INCHIDIFF_MISS_TG_ENDP = 0x00000100, /* one or more tg endpoint is not in the restored structure */
41
INCHIDIFF_DIFF_TG_ENDP = 0x00000100, /* lists of tg endpoints are different */
42
INCHIDIFF_NUM_TG = 0x00000200, /* different number of tautomeric groups */
43
INCHIDIFF_TG = 0x00000200, /* different tautomeric groups */
44
INCHIDIFF_NUM_ISO_AT = 0x00000400, /* ?severe: restored struct. has different number of isotopic atoms */
45
INCHIDIFF_ISO_AT = 0x00000400, /* ?severe: restored struct. has different locations/isotopes of isotopic atoms */
46
INCHIDIFF_REM_ISO_H = 0x00000800, /* isotopic H removed */
47
INCHIDIFF_MOB_ISO_H = 0x00001000, /* different number of mobile exchangeable isotopic H */
48
INCHIDIFF_CHARGE = 0x00002000, /* restored structure has different charge */
49
INCHIDIFF_REM_PROT = 0x00004000, /* proton(s) removed/added from the restored structure */
50
INCHIDIFF_MOBH_PROTONS = 0x00008000, /* different proton balance */
51
INCHIDIFF_SC_INV = 0x00010000, /* restores structure has different inversion stereocenter mark */
52
INCHIDIFF_SC_PARITY = 0x00020000, /* restored structure has stereoatoms or allenes with different parity */
53
INCHIDIFF_SC_EXTRA_UNDF = 0x00040000, /* restored structure has extra undefined stereocenter(s) */
54
INCHIDIFF_SC_EXTRA = 0x00080000, /* restored structure has extra stereocenter(s) */
55
INCHIDIFF_SC_MISS_UNDF = 0x00100000, /* restored structure has not some undefined stereocenter(s) */
56
INCHIDIFF_SC_MISS = 0x00200000, /* restored structure has not some stereocenters that are not undefined */
57
INCHIDIFF_SB_PARITY = 0x00400000, /* restored structure has stereobonds or cumulenes with different parity */
58
INCHIDIFF_SB_EXTRA_UNDF = 0x00800000, /* restored structure has extra undefined stereobond(s) */
59
INCHIDIFF_SB_EXTRA = 0x01000000, /* restored structure has extra stereobond(s) */
60
INCHIDIFF_SB_MISS_UNDF = 0x02000000, /* restored structure has not some undefined stereocenters */
61
INCHIDIFF_SB_MISS = 0x04000000, /* restored structure has not some stereobonds that are not undefined */
62
INCHIDIFF_COMP_HLAYER = 0x08000000, /* Restored component has Mobile-H layer instead of both Mobile-H & Fixed-H or both instead of one */
63
INCHIDIFF_COMP_NUMBER = 0x10000000, /* wrong number of components */
64
INCHIDIFF_STR2INCHI_ERR = 0x20000000 /* Restored structure to InChI conversion error */
71
typedef enum tagtagCompareInchiMsgGroupID {
85
} CMP_INCHI_MSG_GROUP_ID;
88
typedef struct tagCompareInchiMsg {
90
CMP_INCHI_MSG_GROUP_ID nGroupID;
94
typedef struct tagCompareInchiMsgGroup {
95
CMP_INCHI_MSG_GROUP_ID nGroupID;
96
const char *szGroupName;
97
} CMP_INCHI_MSG_GROUP;
104
#define INCHIDIFF_SB (INCHIDIFF_SB_PARITY | INCHIDIFF_SB_EXTRA_UNDF | INCHIDIFF_SB_EXTRA | INCHIDIFF_SB_MISS_UNDF | INCHIDIFF_SB_MISS)
105
#define INCHIDIFF_SC (INCHIDIFF_SC_PARITY | INCHIDIFF_SC_EXTRA_UNDF | INCHIDIFF_SC_EXTRA | INCHIDIFF_SC_MISS_UNDF | INCHIDIFF_SC_MISS)
107
#define INCHIDIFF_CONSTIT (INCHIDIFF_POSITION_H | INCHIDIFF_MORE_FH | INCHIDIFF_LESS_FH | INCHIDIFF_MORE_H | INCHIDIFF_LESS_H |\
108
INCHIDIFF_NO_TAUT | INCHIDIFF_WRONG_TAUT | INCHIDIFF_SINGLE_TG | INCHIDIFF_MULTIPLE_TG | \
109
INCHIDIFF_NUM_TG | INCHIDIFF_EXTRA_TG_ENDP | INCHIDIFF_MISS_TG_ENDP | INCHIDIFF_TG | \
110
INCHIDIFF_NUM_ISO_AT | INCHIDIFF_ISO_AT | INCHIDIFF_CHARGE | INCHIDIFF_REM_PROT | INCHIDIFF_REM_ISO_H |\
111
INCHIDIFF_DIFF_TG_ENDP)
112
#define INCHIDIFF_STEREO (INCHIDIFF_SC_INV | INCHIDIFF_SC_PARITY | INCHIDIFF_SC_EXTRA_UNDF | INCHIDIFF_SC_EXTRA | \
113
INCHIDIFF_SC_MISS_UNDF | INCHIDIFF_SC_MISS | INCHIDIFF_SB_PARITY | INCHIDIFF_SB_EXTRA_UNDF |\
114
INCHIDIFF_SB_EXTRA | INCHIDIFF_SB_MISS_UNDF | INCHIDIFF_SB_MISS)
116
#endif /* __INCHICMP_H__ */