InChI
 
Loading...
Searching...
No Matches
inchi_api.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: MIT
3 * Copyright (c) 2024 IUPAC and InChI Trust
4 */
5
6
7#ifndef _INHCH_API_H_
8#define _INHCH_API_H_
9
10
11#ifndef FIND_RING_SYSTEMS
12#define FIND_RING_SYSTEMS 1
13#endif
14#ifndef FIND_RINS_SYSTEMS_DISTANCES
15#define FIND_RINS_SYSTEMS_DISTANCES 0
16#endif
17
18
19#ifndef FIX_DOCANON_RETCODE_RESET_BUG
20#define FIX_DOCANON_RETCODE_RESET_BUG 1
21#endif
22
23/* radical definitions */
30
31/* bond type definitions */
40 /* stereocenter-related; positive: the sharp end points to this atom */
45 /* stereocenter-related; negative: the sharp end points to the opposite atom */
49 /* stereobond-related */
50 INCHI_BOND_STEREO_DOUBLE_EITHER = 3 /* unknown stereobond geometry */
52/*************************************************************************
53 * Notes on using INCHI_BOND_STEREO_SINGLE_* from inchi_BondStereo2D *
54 * *
55 * These stereo markings are used by InChI to characterize a stereogenic *
56 * atom if and only if all neighbors of this atom have same z-coordinate *
57 * as this atom (that is, in case of 2D fragment). *
58 * The only exception is INCHI_BOND_STEREO_SINGLE_?EITHER marking which *
59 * always assigns to the atom an "unknown" parity (u). *
60 * *
61 * Note the behavior which is default for InChI software v.1.04/03/02std *
62 * (at -NEWPSOFF option is not supplied) 2D stereo interpretation: *
63 * only bonds that have sharp end pointing to the stereogenic atom are *
64 * considered as being out of plane and only sharp ends of *
65 * INCHI_BOND_STEREO_SINGLE_?EITHER bonds are considered to determine *
66 * whether the stereochemistry is unknown. *
67 *************************************************************************/
68
69 /* sizes definitions */
70#define MAXVAL 50 /* max number of bonds per atom */ /* @nnuk : Changed from 20 -> 50 for testing purposes, to account for some structures with one atom having more than 20 bonds */
71#define ATOM_EL_LEN 6 /* length of ASCIIZ element symbol field */
72#define NUM_H_ISOTOPES 3 /* number of hydrogen isotopes: protium, D, T */
73#define ISOTOPIC_SHIFT_FLAG 10000 /* add to isotopic mass if isotopic_mass = */
74 /* (isotopic mass - average atomic mass) */
75#define ISOTOPIC_SHIFT_MAX 100 /* max abs(isotopic mass - average atomic mass) */
76
77#ifndef INCHI_US_CHAR_DEF
78typedef signed char S_CHAR;
79typedef unsigned char U_CHAR;
80#define INCHI_US_CHAR_DEF
81#endif
82
83#ifndef INCHI_US_SHORT_DEF
84typedef signed short S_SHORT;
85typedef unsigned short U_SHORT;
86#define INCHI_US_SHORT_DEF
87#endif
88
89typedef S_SHORT AT_NUM; /* atom number; starts from 0 */
90
91/*************************************************
92 *
93 *
94 * A T O M S a n d C O N N E C T I V I T Y
95 *
96 *
97 *************************************************/
98
99typedef struct tagInchiAtom {
100 /* atom coordinates */
101 double x;
102 double y;
103 double z;
104 /* connectivity */
105 AT_NUM neighbor[MAXVAL]; /* adjacency list: ordering numbers of */
106 /* the adjacent atoms, >= 0 */
107 S_CHAR bond_type[MAXVAL]; /* inchi_BondType */
108 /* 2D stereo */
109 S_CHAR bond_stereo[MAXVAL]; /* inchi_BondStereo2D; negative if the */
110 /* sharp end points to opposite atom */
111/* other atom properties */
112 char elname[ATOM_EL_LEN]; /* zero-terminated chemical element name:*/
113 /* "H", "Si", etc. */
114 AT_NUM num_bonds; /* number of neighbors, bond types and bond*/
115 /* stereo in the adjacency list */
116 S_CHAR num_iso_H[NUM_H_ISOTOPES + 1]; /* implicit hydrogen atoms */
117 /* [0]: number of implicit non-isotopic H
118 (exception: num_iso_H[0]=-1 means INCHI
119 adds implicit H automatically),
120 [1]: number of implicit isotopic 1H (protium),
121 [2]: number of implicit 2H (deuterium),
122 [3]: number of implicit 3H (tritium) */
123 AT_NUM isotopic_mass; /* 0 => non-isotopic; isotopic mass or */
124 /* ISOTOPIC_SHIFT_FLAG + mass - (average atomic mass) */
125 S_CHAR radical; /* inchi_Radical */
126 S_CHAR charge; /* positive or negative; 0 => no charge */
128
129/*******************************************************************
130 * Notes: 1. Atom ordering numbers (i, k, and atom[i].neighbor[j] below)
131 * start from zero; max. ordering number is (num_atoms-1).
132 * 2. inchi_Atom atom[i] is connected to the atom[atom[i].neighbor[j]]
133 * by a bond that has type atom[i].bond_type[j] and 2D stereo type
134 * atom[i].bond_stereo[j] (in case of no stereo
135 * atom[i].bond_stereo[j] = INCHI_BOND_STEREO_NONE)
136 * Index j is in the range 0 <= j <= (atom[i].num_bonds-1)
137 * 3. Any connection (represented by atom[i].neighbor[j],
138 * atom[i].bond_type[j], and atom[i].bond_stereo[j])
139 * should be present in one or both adjacency list:
140 * if k = atom[i].neighbor[j] then i may or may not be present in
141 * atom[k].neighbor[] list. For example, the adjacency lists may be
142 * populated with only such neighbors that atom[i].neighbor[j] < i
143 * All elements of an adjacency list must be different, that is,
144 * a bond must be specified in an adjacency list only once.
145 * 4. in Molfiles usually
146 * (number of implicit H) = Valence - SUM(bond_type[])
147 * 5. Seemingly illogical order of the inchi_Atom members was
148 * chosen in an attempt to avoid alignment problems when
149 * accessing inchi_Atom from unrelated to C programming
150 * languages such as Visual Basic.
151 *******************************************************************/
152
153 /*******************************************************************
154 0D Stereo Parity and Type definitions
155 *******************************************************************
156 Note:
157 =====
158 o Below #A is the ordering number of atom A, starting from 0
159 o See parity values corresponding to 'o', 'e', and 'u' in
160 inchi_StereoParity0D definition below)
161
162 =============================================
163 stereogenic bond >A=B< or cumulene >A=C=C=B<
164 =============================================
165
166 neighbor[4] : {#X,#A,#B,#Y} in this order
167 X central_atom : NO_ATOM
168 \ X Y type : INCHI_StereoType_DoubleBond
169 A==B \ /
170 \ A==B
171 Y
172
173 parity= 'e' parity= 'o' unknown parity = 'u'
174
175 Limitations:
176 ============
177 o Atoms A and B in cumulenes MUST be connected by a chain of double bonds;
178 atoms A and B in a stereogenic 'double bond' may be connected by a double,
179 single, or alternating bond.
180 o One atom may belong to up to 3 stereogenic bonds (i.g. in a fused
181 aromatic structure).
182 o Multiple stereogenic bonds incident to any given atom should
183 either all except possibly one have (possibly different) defined
184 parities ('o' or 'e') or should all have an unknown parity 'u'.
185
186 Note on parities of alternating stereobonds
187 ===========================================
188 D--E
189 In large rings (see Fig. 1, all // \\
190 atoms are C) all alternating bonds B--C F--G
191 are treated as stereogenic. // \\
192 To avoid "undefined" bond parities A H
193 for bonds BC, DE, FG, HI, JK, LM, AN \ /
194 it is recommended to mark them with N==M J==I
195 parities. \ /
196 L==K Fig. 1
197 Such a marking will make
198 the stereochemical layer unambiguous
199 and it will be different from the B--C F--G
200 stereochemical layer of the second // \\ // \\
201 structure (Fig. 2). A D--E H
202 \ /
203 N==M J==I
204 By default, double and alternating \ /
205 bonds in 8-member and greater rings L==K Fig. 2
206 are treated by InChI as stereogenic.
207
208
209 =============================================
210 tetrahedral atom
211 =============================================
212
213 4 neighbors
214
215 X neighbor[4] : {#W, #X, #Y, #Z}
216 | central_atom: #A
217 W--A--Y type : INCHI_StereoType_Tetrahedral
218 |
219 Z
220 parity: if (X,Y,Z) are clockwize when seen from W then parity is 'e' otherwise 'o'
221 Example (see AXYZW above): if W is above the plane XYZ then parity = 'e'
222
223 3 neighbors
224
225 Y Y neighbor[4] : {#A, #X, #Y, #Z}
226 / / central_atom: #A
227 X--A (e.g. O=S ) type : INCHI_StereoType_Tetrahedral
228 \ \
229 Z Z
230
231 parity: if (X,Y,Z) are clockwize when seen from A then parity is 'e',
232 otherwise 'o'
233 unknown parity = 'u'
234 Example (see AXYZ above): if A is above the plane XYZ then parity = 'e'
235 This approach may be used also in case of an implicit H attached to A.
236
237 =============================================
238 allene
239 =============================================
240
241 X Y neighbor[4] : {#X,#A,#B,#Y}
242 \ / central_atom : #C
243 A=C=B type : INCHI_StereoType_Allene
244
245 Y X
246 | |
247 when seen from A along A=C=B: X-A Y-A
248
249 parity: 'e' 'o'
250
251 parity: if A, B, Y are clockwise when seen from X then parity is 'e',
252 otherwise 'o'
253 unknown parity = 'u'
254 Example (see XACBY above): if X on the diagram is above the plane ABY
255 then parity is 'o'
256
257 Limitations
258 ===========
259 o Atoms A and B in allenes MUST be connected by a chain of double bonds;
260
261
262 How InChI uses 0D parities
263 ==========================
264
265 1. 0D parities are used if all atom coordinates are zeroes.
266
267 In addition to that:
268
269 2. 0D parities are used for Stereobonds, Allenes, or Cumulenes if:
270
271 2a. A bond to the end-atom is shorter than MIN_BOND_LEN=0.000001
272 2b. A ratio of two bond lengths to the end-atom is smaller than MIN_SINE=0.03
273 2c. In case of a linear fragment X-A=B end-atom A is treated as satisfying 2a-b
274
275 0D parities are used if 2a or 2b or 2c applies to one or both end-atoms.
276
277 3. 0D parities are used for Tetrahedral Atoms if at least one of 3a-c is true:
278
279 3a. One of bonds to the central atom is shorter than MIN_BOND_LEN=0.000001
280 3b. A ratio of two bond lengths to the central atom is smaller than MIN_SINE=0.03
281 3c. The four neighbors are almost in one plane or the central atom and
282 its only 3 explicit neighbors are almost in one plane
283
284 Notes on 0D parities and 'undefined' stereogenic elements
285 =========================================================
286
287 If 0D parity is to be used according to 1-3 but CH3 CH3
288 has not been provided then the corresponding \ /
289 stereogenic element is considered 'undefined'. C=CH
290 /
291 For example, if in the structure (Fig. 3) H
292 the explicit H has been moved so that it Fig. 3
293 has same coordinates as atom >C= (that is,
294 the length of the bond H-C became zero)
295 then the double bond is assigned 'undefined' CH3 CH3
296 parity which by default is omitted from the \ /
297 Identifier. CH=CH
298
299 However, the structure on Fig. 4 will have double Fig. 4
300 bond parity 'o' and its parity in the Identifier is (-).
301
302 Notes on 0D parities in structures containing metals
303 ====================================================
304 Since InChI disconnects bonds to metals the 0D parities upon the
305 disconnection may change in several different ways:
306
307 1) previously non-stereogenic bond may become stereogenic:
308
309 \ / \ /
310 CH==CH disconnection CH==CH
311 \ / ======>
312 M M
313
314 before the disconnection: after the disconnection:
315 atoms C have valence=5 and the double bond may become
316 the double bond is not stereogenic
317 recognized as stereogenic
318
319 2) previously stereogenic bond may become non-stereogenic:
320
321 M M(+)
322 \ / /
323 N==C disconnection (-)N==C
324 \ ======> \
325
326 3) Oddball structures, usually resulting from projecting 3D
327 structures on the plane, may contain fragment like that
328 depicted on Fig. 5:
329
330 M A M A
331 |\ / B / B
332 | X / disconnection / /
333 |/ \ / ======> / /
334 C===C C===C
335 Fig. 5
336 (X stands for bond intersection)
337
338 A-C=C-B parity is A-C=C-B parity is
339 trans (e) cis (o) or undefined
340 because the bond because C valence = 3,
341 orientation is same not 4.
342 as on Fig, 6 below:
343
344 A M
345 \ / Removal of M from the structure
346 C===C on Fig. 5 changes the geometry from trans
347 / \ to cis.
348 M' B Removal of M and M' from the structure
349 Fig. 6 on Fig. 6 does not change the A-C=C-B
350 geometry: it is trans.
351
352 To resolve the problem InChI API accepts the second parity
353 corresponding to the metal-disconnected structure.
354 To store both bond parities use left shift by 3 bits:
355
356 inchi_Stereo0D::parity = ParityOfConnected | (ParityOfDisconnected<<3)
357
358 In case when only disconnected structure parity exists set
359 ParityOfConnected = INCHI_PARITY_UNDEFINED.
360 This is the only case when INCHI_PARITY_UNDEFINED parity
361 may be fed to the InChI.
362
363 In cases when the bond parity in a disconnected structure exists and
364 differs from the parity in the connected structure the atoms A and B
365 should be non-metals.
366
367 ****************************************************************************/
368
369#define NO_ATOM (-1) /* non-existent (central) atom */
370
371 /* 0D parity types */
378
379/* 0D parities */
382 INCHI_PARITY_ODD = 1, /* 'o' */
383 INCHI_PARITY_EVEN = 2, /* 'e' */
384 INCHI_PARITY_UNKNOWN = 3, /* 'u' */ /* (see also readinch.c)
385 used in: Extract0DParities, InchiToAtom */
386 INCHI_PARITY_UNDEFINED = 4 /* '?' -- should not be used; however, see Note above */
388
389
390/*************************************************
391 *
392 *
393 * 0D - S T E R E O (if no coordinates given)
394 *
395 *
396 *************************************************/
397
398
399typedef struct tagINCHIStereo0D {
400 AT_NUM neighbor[4]; /* 4 atoms always */
401 AT_NUM central_atom; /* central tetrahedral atom or a central */
402 /* atom of allene; otherwise NO_ATOM */
403 S_CHAR type; /* inchi_StereoType0D */
404 S_CHAR parity; /* inchi_StereoParity0D: may be a combination of two parities: */
405 /* ParityOfConnected | (ParityOfDisconnected << 3), see Note above */
407
408
409
410
411/*************************************************
412 *
413 *
414 * I N C h I D L L I n p u t
415 *
416 *
417 *************************************************/
418
419
420 /*
421 Structure -> InChI
422
423 GetINCHI()
424 GetStdINCHI()
425 GetINCHIEx()
426
427 */
428
429
430typedef struct tagINCHI_Input
431{
432 /* the caller is responsible for the data allocation and deallocation */
433 inchi_Atom* atom; /* array of num_atoms elements */
434 inchi_Stereo0D* stereo0D; /* array of num_stereo0D 0D stereo elements or NULL */
435 char* szOptions; /* InChI options: space-delimited; each is preceded by*/
436 /* '/' or '-' depending on OS and compiler */
437 AT_NUM num_atoms; /* number of atoms in the structure < MAX_ATOMS */
438 AT_NUM num_stereo0D; /* number of 0D stereo elements */
440
441
442/*
443 Extended input supporting v. 1.05+ extensions: V3000; polymers
444
445 Mainly follows Accelrys CTFile cpecification.
446
447 See:
448 CTFile Formats. Accelrys, December 2011.
449 http://accelrys.com/products/collaborative-science/biovia-draw/ctfile-no-fee.html
450
451 Note that V3000 extensions are supported onlyprovisionally: the data are read but not used
452
453*/
454
455
456/* Polymers */
457
459{
460 int id; /* Unit id; it is what is called 'Sgroup number' */
461 /* in CTFile (not used, kept for compatibility) */
462 int type; /* Unit type as per CTFile format (STY) */
463 int subtype; /* Unit subtype as per CTFile format (SST) */
464 int conn; /* Unit connection scheme as per CTFile format (SCN) */
465 int label; /* One more unit id; what is called 'unique Sgroup */
466 /* identifier' in CTFile (not used, for compatibility) */
467 int na; /* Number of atoms in the unit */
468 int nb; /* Number of bonds in the unit */
469 double xbr1[4]; /* Bracket ends coordinates (SDI) */
470 double xbr2[4]; /* Bracket ends coordinates (SDI) */
471 char smt[80]; /* Sgroup Subscript (SMT) ('n' or so ) */
472 int* alist; /* List of atoms in the unit (SAL), atomic numbers */
473 int* blist; /* List of crossing bonds of unit: */
474 /* [bond1end1, bond1end2, bond2end1, bond2end2] */
476
477
479{
480 /* List of pointers to polymer units */
482 int n; /* Number of polymer units */
484
485
486/*
487 V3000 Extensions
488
489 Note that V3000 extensions are supported only
490 provisionally, the data are read but not used
491*/
492typedef struct inchi_Input_V3000
493{
496 int* atom_index_orig; /* Index as supplied for atoms */
497 int* atom_index_fin; /* = index or -1 for star atom */
498 int n_sgroups; /* Not used yet. */
499 int n_3d_constraints; /* Not used yet. */
503 int** lists_haptic_bonds; /* Haptic_bonds[i] is pointer to int */
504 /* array which contains: */
505 /* bond_type, non-star atom number, */
506 /* nendpts, then endpts themselves */
507/* Enhanced stereo collections */
509 int** lists_steabs; /* steabs[k][0] - not used */
510 /* steabs[k][1] - number of members in collection */
511 /* steabs[k][2..] - member atom numbers */
513 int** lists_sterel; /* sterel[k][0] - n from "STERELn" tag */
514 /* sterel[k][1] - number of members in collection */
515 /* sterel[k][2..] - member atom numbers */
517 int** lists_sterac; /* sterac[k][0] - n from "STERACn" tag */
518 /* sterac[k][1] - number of members in collection */
519 /* sterac[k][0] - number from "STERACn" tag */
521
522
523/* Input data structure for GetINCHIEx() */
524
525
526typedef struct inchi_InputEx
527{
528 /* the caller is responsible for the data allocation and deallocation */
529
530 /* same as in older inchi_Input */
531 inchi_Atom* atom; /* array of num_atoms elements */
532 /* same as in older inchi_Input */
533 inchi_Stereo0D* stereo0D; /* array of num_stereo0D 0D stereo elements or NULL */
534 /* same as in older inchi_Input */
535 char* szOptions; /* InChI options: space-delimited; each is preceded by */
536 /* '/' or '-' depending on OS and compiler */
537/* same as in older inchi_Input */
538 AT_NUM num_atoms; /* number of atoms in the structure */
539 /* same as in older inchi_Input */
540 AT_NUM num_stereo0D; /* number of 0D stereo elements */
541 inchi_Input_Polymer* polymer; /* v. 1.05+ extended data, polymers */
542 /* NULL if not a polymer */
543 inchi_Input_V3000* v3000; /* v. 1.05+ extended data, V3000 Molfile features */
544 /* NULL if no V3000 extensions present */
546
547
548/*
549 InChI -> Structure
550
551 GetStructFromINCHI()
552 GetStructFromStdINCHI()
553 GetStructFromINCHIEx()
554*/
556{
557 /* the caller is responsible for the data allocation and deallocation */
558 char* szInChI; /* InChI ASCIIZ string to be converted to a strucure */
559 char* szOptions; /* InChI options: space-delimited; each is preceded by */
560 /* '/' or '-' depending on OS and compiler */
562
563
567
568
569
570
571/*************************************************
572 *
573 *
574 * I N C h I D L L O u t p u t
575 *
576 *
577 *************************************************/
578
579
580
581 /*
582 Structure -> InChI
583 */
584
585
586typedef struct tagINCHI_Output
587{
588 /* zero-terminated C-strings allocated by GetStdINCHI() */
589 /* to deallocate all of them call FreeStdINCHI() (see below) */
590 char* szInChI; /* InChI ASCIIZ string */
591 char* szAuxInfo; /* Aux info ASCIIZ string */
592 char* szMessage; /* Error/warning ASCIIZ message */
593 char* szLog; /* log-file ASCIIZ string, contains a human-readable list */
594 /* of recognized options and possibly an Error/warning message */
596
597
598/* InChI -> Structure */
599
601{
602 /* Pointers are allocated by GetStructFromINCHI()/GetStructFromStdINCHI() */
603 /* to deallocate all of them call FreeStructFromStdINCHI()/FreeStructFromStdINCHI() */
604 inchi_Atom* atom; /* array of num_atoms elements */
605 inchi_Stereo0D* stereo0D; /* array of num_stereo0D 0D stereo elements or NULL */
606 AT_NUM num_atoms; /* number of atoms in the structure */
607 AT_NUM num_stereo0D; /* number of 0D stereo elements */
608 char* szMessage; /* Error/warning ASCIIZ message */
609 char* szLog; /* log-file ASCIIZ string, contains a human-readable list */
610 /* of recognized options and possibly an Error/warn message */
611 unsigned long WarningFlags[2][2]; /* warnings, see INCHIDIFF in inchicmp.h */
612 /* [x][y]: */
613 /* x=0 => Reconnected if present in InChI */
614 /* otherwise Disconnected/Normal */
615 /* x=1 => Disconnected layer if Reconn. layer is present */
616 /* y=1 => Main layer or Mobile-H */
617 /* y=0 => Fixed-H layer */
619
620
621
623{
624 /* Pointers are allocated by GetStructFromINCHIEx() */
625 /* to deallocate all of them call FreeStructFromNCHIEx() */
626 inchi_Atom* atom; /* array of num_atoms elements */
627 inchi_Stereo0D* stereo0D; /* array of num_stereo0D 0D stereo elements or NULL */
628 AT_NUM num_atoms; /* number of atoms in the structure */
629 AT_NUM num_stereo0D; /* number of 0D stereo elements */
630 char* szMessage; /* Error/warning ASCIIZ message */
631 char* szLog; /* log-file ASCIIZ string, contains a human-readable list */
632 /* of recognized options and possibly an Error/Warn message */
633 unsigned long WarningFlags[2][2];/* warnings, see INCHIDIFF in inchicmp.h */
634 /* [x][y]: x=0 => Reconnected if present in InChI */
635 /* otherwise Disconnected/Normal */
636 /* x=1 => Disconnected layer if Reconne layer is present */
637 /* y=1 => Main layer or Mobile-H */
638 /* y=0 => Fixed-H layer */
639 inchi_Output_Polymer* polymer; /* v. 1.05+ extended data, polymers */
640 inchi_Output_V3000* v3000; /* v. 1.05+ extended data, V3000 Molfile features */
642
644
645
646
647/*************************************************
648 *
649 *
650 * I N C h I D L L I n t e r f a c e
651 *
652 *
653 *************************************************/
654
655
656#if (defined( _WIN32 ) && defined( _MSC_VER ) && defined(BUILD_LINK_AS_DLL) )
657 /* Win32 & MS VC ++, compile and link as a DLL */
658#ifdef _USRDLL
659 /* InChI library dll */
660#define INCHI_API __declspec(dllexport)
661#define EXPIMP_TEMPLATE
662#define INCHI_DECL
663#else
664 /* calling the InChI dll program */
665#define INCHI_API __declspec(dllimport)
666#define EXPIMP_TEMPLATE extern
667#define INCHI_DECL
668#endif
669#else
670 /* create a statically linked InChI library or link to an executable */
671#define INCHI_API
672#define EXPIMP_TEMPLATE
673#define INCHI_DECL
674#endif
675
676/* Return codes for
677 GetINCHI
678 GetStdINCHI
679 GetINCHIEx
680 Get_inchi_Input_FromAuxInfo
681 Get_std_inchi_Input_FromAuxInfo
682 GetStructFromINCHI
683 GetStructFromStdINCHI
684 GetStructFromINCHIEx
685*/
686
688{
690 inchi_Ret_SKIP = -2, /* not used in InChI library */
691 inchi_Ret_EOF = -1, /* no structural data has been provided */
692 inchi_Ret_OKAY = 0, /* Success; no errors or warnings */
693 inchi_Ret_WARNING = 1, /* Success; warning(s) issued */
694 inchi_Ret_ERROR = 2, /* Error: no InChI has been created */
695 inchi_Ret_FATAL = 3, /* Severe error: no InChI has been created (typically, memory allocation failure) */
696 inchi_Ret_UNKNOWN = 4, /* Unknown program error */
697 inchi_Ret_BUSY = 5 /* Previuos call to InChI has not returned yet */
699
700/* Return codes for
701 MakeINCHIFromMolfileText
702*/
704{
705 mol2inchi_Ret_OKAY = 0, /* Success; no errors or warnings */
706 mol2inchi_Ret_WARNING = 1, /* Success; warning(s) issued */
707 mol2inchi_Ret_EOF = -1, /* generic Error: no InChI has been created */
708 mol2inchi_Ret_ERROR = 2, /* generic Error: no InChI has been created */
709 mol2inchi_Ret_ERROR_get = 4, /* get structure Error: no InChI has been created */
710 mol2inchi_Ret_ERROR_comp = 5 /* compute InChI Error: no InChI has been created */
712
713
714
715/* Return codes for CheckINCHI */
726
727
728
729/* to compile all InChI code as a C++ code #define COMPILE_ALL_CPP */
730#ifndef COMPILE_ALL_CPP
731#ifdef __cplusplus
732extern "C" {
733#endif
734#endif
735
736
737 /* InChI PREFIX */
738#define INCHI_STRING_PREFIX "InChI="
739#define LEN_INCHI_STRING_PREFIX 6
740
741/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
742Format:
743
744 Standard InChI starts with: InChI=1S/
745 Non-standard one with: InChI=1/
746 Empty std InChI: InChI=1S//
747 Empty InChI: InChI=1//
748 AuxInfo=1//
749 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
750
751
752
753
754 /* EXPORTED FUNCTIONS */
755
756
757
758
759 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
760 GetINCHI / GetStdINCHI
761
762
763 inchi_Input is created by the user; strings in inchi_Output are allocated and deallocated by InChI
764 inchi_Output does not need to be initilized out to zeroes; see FreeNCHI()/FreeSTDINCHI() on how to deallocate it
765
766
767 Valid options for GetINCHI:
768 (use - instead of / for O.S. other than MS Windows)
769
770 Structure perception (compatible with stdInChI)
771 /NEWPSOFF /DoNotAddH /SNon
772 Stereo interpretation (lead to generation of non-standard InChI)
773 /SRel /SRac /SUCF /ChiralFlagON /ChiralFlagOFF
774 InChI creation options (lead to generation of non-standard InChI)
775 /SUU /SLUUD /FixedH /RecMet /KET /15T
776
777
778 GetINCHI produces standard InChI if no InChI creation/stereo modification options
779 are specified. Inveresely, if any of SUU/SLUUD/RecMet/FixedH/Ket/15T/SRel/SRac/SUCF
780 options are specified, generated InChI will be non-standard one.
781
782
783 GetStdINCHI produces standard InChI only.
784 The valid structure perception options are:
785 /NEWPSOFF /DoNotAddH /SNon
786
787
788 Other options are:
789 /AuxNone Omit auxiliary information (default: Include)
790 /Wnumber Set time-out per structure in seconds; W0 means unlimited
791 In InChI library the default value is unlimited
792 /WMnumber Set time-out per structure in milliseconds; WM0 means unlimited
793 In InChI library the default value is unlimited
794 /OutputSDF Output SDfile instead of InChI
795 /WarnOnEmptyStructure
796 Warn and produce empty InChI for empty structure
797 /SaveOpt Save custom InChI creation options (non-standard InChI)
798
799 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
802
803
804 /* Extended version of GetINCHI supporting v. 1.05+ extensions: V3000; polymers */
806
807
808 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
809 FreeINCHI / FreeStdINCHI
810
811 should be called to deallocate char* pointers
812 obtained from each GetINCHI /GetStdINCHI call
813
814 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
817
818
819
820 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
821 GetStringLength
822
823 helper: get string length
824
825 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
827
828
829 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
830 GetStructFromINCHI / GetStructFromStdINCHI / GetStructFromINCHIEx
831
832 inchi_Inputinchi_InputINCHI is created by the user; pointers in inchi_OutputStruct are allocated and deallocated by InChI
833 inchi_OutputStruct does not need to be initialized out to zeroes; see FreeStructFromStdINCHI() on how to deallocate it
834 Option /Inchi2Struct is not needed for GetStructFromINCHI()/GetStructFromStdINCHI()
835
836 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
840
841
842 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
843 FreeStructFromINCHI / FreeStructFromStdINCHI / FreeStructFromINCHIEx
844
845 should be called to deallocate pointers obtained from each
846 GetStructFromStdINCHI / GetStructFromINCHI / GetStructFromINCHIEx
847
848 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
852
853
854 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
855 GetINCHIfromINCHI
856
857 GetINCHIfromINCHI does same as -InChI2InChI option: converts InChI into InChI for validation purposes
858 It may also be used to filter out specific layers. For instance, /Snon would remove stereochemical layer
859 Omitting /FixedH and/or /RecMet would remove Fixed-H or Reconnected layers
860 To keep all InChI layers use options string "/FixedH /RecMet"; option /InChI2InChI is not needed
861 inchi_InputINCHI is created by the user; strings in inchi_Output are allocated and deallocated by InChI
862 inchi_Output does not need to be initilized out to zeroes; see FreeINCHI() on how to deallocate it
863
864 Note: there is no explicit tool to conversion from/to standard InChI
865
866 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
868
869#ifndef COMPILE_ALL_CPP
870#ifdef __cplusplus
871}
872#endif
873#endif
874
875
876/*****************************************************************
877 *
878 *
879 * C o n v e r s i o n: InChI AuxInfo string => inchi_Input
880 *
881 *
882 *****************************************************************/
883
884#ifndef STR_ERR_LEN
885#define STR_ERR_LEN 256
886#endif
887
888typedef struct tagInchiInpData {
889 inchi_Input* pInp; /* a pointer to pInp that has all items 0 or NULL */
890 int bChiral; /* 1 => the structure was marked as chiral, 2=> not chiral, 0=> not marked */
893
894/* to compile all InChI code as a C++ code #define COMPILE_ALL_CPP */
895#ifndef COMPILE_ALL_CPP
896#ifdef __cplusplus
897extern "C" {
898#endif
899#endif
900
901
902
903 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
904 Get_inchi_Input_FromAuxInfo / Get_std_inchi_Input_FromAuxInfo
905
906 Input:
907 szInchiAuxInfo: contains ASCIIZ string of InChI output for a single
908 structure or only the AuxInfo line
909 bDoNotAddH: if 0 then InChI will be allowed to add implicit H
910 bDiffUnkUndfStereo
911 if not 0, use different labels for unknown and undefined stereo
912 pInchiInp: should have a valid pointer pInchiInp->pInp to an empty
913 (all members = 0) inchi_Input structure
914
915 Output:
916 pInchiInp: The following members of pInp may be filled during the call:
917 atom, num_atoms, stereo0D, num_stereo0D
918 Return value: see RetValGetINCHI
919
920 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
922 char* szInchiAuxInfo,
923 int bDoNotAddH,
924 int bDiffUnkUndfStereo,
925 InchiInpData* pInchiInp);
927 int bDoNotAddH,
928 InchiInpData* pInchiInp);
929
930
931
932 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
933 Free_inchi_Input / Free_std_inchi_Input
934
935 To deallocate and write zeroes into the changed members of pInchiInp->pInp call
936 Free_inchi_Input( inchi_Input *pInp )
937
938 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
941
942
943
944 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
945 CheckINCHI
946
947 Check if the string represents valid InChI/standard InChI.
948 Input:
949 szINCHI source InChI
950 strict if 0, just briefly check for proper layout (prefix, version, etc.)
951 The result may not be strict.
952 If not 0, try to perform InChI2InChI conversion and
953 returns success if a resulting InChI string exactly match source.
954 The result may be 'false alarm' due to imperfectness of conversion.
955 Returns:
956 success/errors codes
957
958 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
959 EXPIMP_TEMPLATE INCHI_API int INCHI_DECL CheckINCHI(const char* szINCHI, const int strict);
960
961
962#ifndef COMPILE_ALL_CPP
963#ifdef __cplusplus
964}
965#endif
966#endif
967
968
969
970/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
971
972 InChIKey API
973
974
975 InChIKey description
976
977
978
979 The InChIKey is a character signature based on a hash code of the InChI string.
980 Standard InChIKey is produced out of standard InChI.
981 Non-standard InChIKey is produced out of non-standard InChI.
982
983 AAAAAAAAAAAAAA-BBBBBBBBCD-P
984
985
986 InChIKey layout is as follows:
987
988 AAAAAAAAAAAAAA
989 First block (14 letters)
990 Encodes molecular skeleton (connectivity)
991
992 BBBBBBBB
993 Second block (8 letters)
994 Encodes tautomers, stereochemistry, isotopomers, reconnected layer
995 C
996 'S' for standard
997 'N' for non-standard
998 D
999 InChI version ('A' for 1)
1000 P - (de)protonation flag
1001 Protonization encoding:
1002 N 0
1003 O +1 P +2 Q +3 R +4 S +5 T +6 U +7 V +8 W +9 X +10 Y +11 Z +12
1004 M -1 L-2 K -3 J -4 I -5 H -6 G -7 F -8 E -9 D -10 C -11 B -12
1005 A < -12 or > +12
1006
1007
1008 All symbols except delimiter (dash, that is, minus) are uppercase English
1009 letters representing a "base 26" encoding.
1010
1011^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
1012
1013
1014/* Return codes for key generation procedure */
1015#define INCHIKEY_OK 0
1016#define INCHIKEY_UNKNOWN_ERROR 1
1017#define INCHIKEY_EMPTY_INPUT 2
1018#define INCHIKEY_INVALID_INCHI_PREFIX 3
1019#define INCHIKEY_NOT_ENOUGH_MEMORY 4
1020#define INCHIKEY_INVALID_INCHI 20
1021#define INCHIKEY_INVALID_STD_INCHI 21
1022
1023
1024/* Return codes for CheckINCHIKey */
1033
1034
1035
1036/* EXPORTED FUNCTIONS */
1037
1038
1039
1040/* To compile all InChI code as a C++ code #define COMPILE_ALL_CPP */
1041
1042#ifndef COMPILE_ALL_CPP
1043#ifdef __cplusplus
1044extern "C" {
1045#endif
1046#endif
1047
1048
1049
1050 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1051 GetINCHIKeyFromINCHI
1052
1053 Calculate InChIKey by InChI string.
1054
1055 Input:
1056 szINCHISource
1057 source InChI string
1058 xtra1
1059 =1 calculate hash extension (up to 256 bits; 1st block)
1060 xtra2
1061 =1 calculate hash extension (up to 256 bits; 2nd block)
1062
1063 Output:
1064 szINCHIKey
1065 InChIKey string
1066 The user-supplied buffer szINCHIKey should be at least 28 bytes long.
1067 szXtra1
1068 hash extension (up to 256 bits; 1st block) string
1069 Caller should allocate space for 64 characters + trailing NULL
1070 szXtra2
1071 hash extension (up to 256 bits; 2nd block) string
1072 Caller should allocate space for 64 characters + trailing NULL
1073
1074 Returns:
1075 success/errors codes
1076
1077 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
1078 EXPIMP_TEMPLATE INCHI_API int INCHI_DECL GetINCHIKeyFromINCHI(const char* szINCHISource,
1079 const int xtra1,
1080 const int xtra2,
1081 char* szINCHIKey,
1082 char* szXtra1,
1083 char* szXtra2);
1084
1085
1086
1087 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1088 GetStdINCHIKeyFromStdINCHI
1089
1090 "Standard" counterpart
1091
1092 For compatibility with v. 1.02std, no extra hash calculation is allowed.
1093 To calculate extra hash(es), use GetINCHIKeyFromINCHI with stdInChI as input.
1094
1095 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
1096 EXPIMP_TEMPLATE INCHI_API int INCHI_DECL GetStdINCHIKeyFromStdINCHI(const char* szINCHISource,
1097 char* szINCHIKey);
1098
1099
1100 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1101 CheckINCHIKey
1102
1103 Check if the string represents valid InChIKey.
1104 Input:
1105 szINCHIKey
1106 source InChIKey string
1107 Returns:
1108 success/errors codes
1109
1110 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
1111 EXPIMP_TEMPLATE INCHI_API int INCHI_DECL CheckINCHIKey(const char* szINCHIKey);
1112
1113#ifndef COMPILE_ALL_CPP
1114#ifdef __cplusplus
1115}
1116#endif
1117#endif
1118
1119
1120
1121/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1122
1123 Modularized InChI generation API
1124
1125
1126
1127 Note. Functions with STDINCHIGEN prefix are
1128 retained for compatibility with v. 1.02std
1129
1130^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
1131
1132
1133
1134
1135/* Data structures holding intermediate (normalization) results */
1136
1137#ifndef MAX_NUM_STEREO_ATOM_NEIGH
1138#define MAX_NUM_STEREO_ATOM_NEIGH 4
1139#endif
1140#ifndef MAX_NUM_STEREO_BONDS
1141#define MAX_NUM_STEREO_BONDS 3
1142#endif
1143#ifndef INCHI_NUM
1144#define INCHI_NUM 2 /* = array size; member indexes: */
1145#endif
1146
1147
1148typedef unsigned short AT_NUMBR;
1149typedef signed short NUM_HS;
1150typedef unsigned long INCHI_MODES;
1151
1152typedef struct tagNormAtom
1153{
1154 char elname[ATOM_EL_LEN]; /* chem. element name */
1155 U_CHAR el_number; /* number of the element in the Periodic Table */
1156 AT_NUMBR neighbor[MAXVAL]; /* positions (from 0) of the neighbors in the NORM_ATOM array */
1157 AT_NUMBR orig_at_number; /* original atom number, starts from 1 */
1158 AT_NUMBR orig_compt_at_numb; /* atom number within a component before terminal H removal */
1159 S_CHAR bond_stereo[MAXVAL]; /* 1=Up,4=Either,6=Down (this atom is at the pointing wedge)
1160 negative => on the opposite side of the wedge; 3=Either double bond */
1161 U_CHAR bond_type[MAXVAL]; /* 1=single, 2=double, 3=triple, 4=1/2 (bond order is 1 or 2) */
1162 /* 5=1/2/3, 6=1/3, 7=2/3, 8=tautomeric, 9=1/2 non-stereogenic */
1163
1164 S_CHAR valence; /* number of bonds = number of neighbors not greater than MAXVAL */
1165 S_CHAR chem_bonds_valence; /* sum of bond types (1,2,3); type 4 needs special treatment */
1166 S_CHAR num_H; /* number of adjacent implicit hydrogen atoms including D and T */
1167 S_CHAR num_iso_H[NUM_H_ISOTOPES];/* number of adjacent implicit 1H(protium), 2H(D), 3H(T) < 16 */
1168 S_CHAR iso_atw_diff; /* =0 => natural isotopic abundances */
1169 /* >0 => (isotopic mass) - (rounded average atomic mass) + 1 */
1170 /* <0 => (isotopic mass) - (rounded average atomic mass) */
1171 S_CHAR charge; /* charge */
1172 S_CHAR radical; /* RADICAL_SINGLET, RADICAL_DOUBLET, or RADICAL_TRIPLET */
1173 S_CHAR bAmbiguousStereo; /* flag of detected stereo ambiguity */
1174 S_CHAR cFlags; /* AT_FLAG_ISO_H_POINT: atom may have exchangeable isotopic H */
1175 AT_NUMBR at_type; /* ATT_NONE, ATT_ACIDIC, etc. See InChI normalization code */
1176 AT_NUMBR component; /* number of the structure component > 0 */
1177 AT_NUMBR endpoint; /* id of a tautomeric group */
1178 AT_NUMBR c_point; /* id of a positive charge group */
1179 double x; /* x coordinate */
1180 double y; /* y coordinate */
1181 double z; /* x coordinate */
1182 /*--------- 0D parities ----------*/
1183 S_CHAR bUsed0DParity; /* bit=1 => stereobond; bit=2 => stereocenter */
1184 /*----- tetrahedral stereo parity */
1185 S_CHAR p_parity; /* tetrahedral (sp3) cml parity */
1186 AT_NUMBR p_orig_at_num[MAX_NUM_STEREO_ATOM_NEIGH]; /* orig_at_number of each neighbor > 0; 0=> no neighbor */
1187 /*----- stereo bond (SB) parities */
1188 S_CHAR sb_ord[MAX_NUM_STEREO_BONDS]; /* neighbor[] index of another end of this SB, starts from 0 */
1189 S_CHAR sn_ord[MAX_NUM_STEREO_BONDS]; /* neighbor[] index of a bond that is not this SB; starts from 0;
1190 -1 means the neighbor is a removed explicit H */
1191 /* atoms on both ends of a stereobond have same parity => trans/T/E/2, diff. parities => cis/C/Z/1 */
1192 S_CHAR sb_parity[MAX_NUM_STEREO_BONDS]; /* parities of stereobonds (sp2) incident to this atom */
1193 AT_NUMBR sn_orig_at_num[MAX_NUM_STEREO_BONDS]; /* orig_at_number of sn_ord[] neighbor > 0 */
1194
1195#if ( FIND_RING_SYSTEMS == 1 )
1196 S_CHAR bCutVertex; /* is the atom a cut-vertex or not */
1197 AT_NUMBR nRingSystem; /* starts from 1; number of a ring system */
1198 AT_NUMBR nNumAtInRingSystem; /* number of atoms in a ring system to which this at belongs */
1199 AT_NUMBR nBlockSystem; /* ambiguous if the atom is a cut-vertex: better apply this to bonds */
1200
1201#if ( FIND_RINS_SYSTEMS_DISTANCES == 1 )
1202 AT_NUMBR nDistanceFromTerminal; /* not used */
1203#endif
1204
1205#endif
1207
1208
1209
1210typedef struct tagNormAtomData
1211{
1212 NORM_ATOM* at; /* atom list */
1213 NORM_ATOM* at_fixed_bonds; /* atom list with added or removed protons only */
1214 int num_at; /* number of atoms except removed terminal H */
1215 int num_removed_H; /* number of removed H; at[] has (num_at+num_removed_H) elements */
1217 int num_isotopic; /* number of isotopic atoms */
1218 int bExists; /* for internal use */
1219 int bDeleted; /* for internal use */
1222 int bTautPreprocessed; /* for internal use */
1225 /* isotopic composition of removed protons, not included in num_iso_H[] */
1227 /* isotopic H on tautomeric atoms and those
1228 in nIsotopicEndpointAtomNumber */
1229 INCHI_MODES bTautFlags; /* for internal use */
1230 INCHI_MODES bTautFlagsDone; /* for internal use */
1231 INCHI_MODES bNormalizationFlags;/* for internal use */
1233
1234
1235typedef struct tagINCHIGEN_DATA
1236{
1237
1238 char pStrErrStruct[STR_ERR_LEN]; /* intermediate log (warning/error report) */
1239 int num_components[INCHI_NUM]; /* number of allocated INChI, INChI_Aux data structures */
1240 /* index=0 => disconnected, 1 => reconnected structure */
1241
1242/* The results of normalization stage */
1243/* for each member of pair disconnected/reconnected structures: */
1247
1248
1249/* InChI Generator Handle */
1250
1251typedef void* INCHIGEN_HANDLE;
1252
1253
1254
1255
1256/* EXPORTED FUNCTIONS */
1257
1258
1259
1260/* to compile all InChI code as a C++ code #define COMPILE_ALL_CPP */
1261#ifndef COMPILE_ALL_CPP
1262#ifdef __cplusplus
1263extern "C" {
1264#endif
1265#endif
1266
1267
1268
1269 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1270 INCHIGEN_Create / STDINCHIGEN_Create
1271
1272 InChI Generator: create generator
1273 Returns handle of generator object or NULL on failure
1274
1275 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
1278
1279
1280
1281 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1282 INCHIGEN_Setup / STDINCHIGEN_Setup
1283
1284 InChI Generator: setup
1285
1286 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
1288 INCHIGEN_DATA* pGenData,
1289 inchi_Input* pInp);
1291 INCHIGEN_DATA* pGenData,
1292 inchi_Input* pInp);
1293
1294
1295
1296 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1297 INCHIGEN_DoNormalization / STDINCHIGEN_DoNormalization
1298
1299 InChI Generator: structure normalization stage
1300
1301 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
1303 INCHIGEN_DATA* pGenData);
1305 INCHIGEN_DATA* pGenData);
1306
1307
1308
1309 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1310 INCHIGEN_DoCanonicalization / STDINCHIGEN_DoCanonicalization
1311
1312 InChI Generator: structure canonicalization stage
1313
1314 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
1316 INCHIGEN_DATA* pGenData);
1318 INCHIGEN_DATA* pGenData);
1319
1320
1321
1322 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1323 INCHIGEN_DoSerialization / STDINCHIGEN_DoSerialization
1324
1325 InChI Generator: InChI serialization stage
1326
1327 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
1329 INCHIGEN_DATA* pGenData,
1330 inchi_Output* pResults);
1332 INCHIGEN_DATA* pGenData,
1333 inchi_Output* pResults);
1334
1335
1336
1337 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1338 INCHIGEN_Reset / STDINCHIGEN_Reset
1339
1340 InChI Generator: reset stage (use before get next structure)
1341
1342 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
1344 INCHIGEN_DATA* pGenData,
1345 inchi_Output* pResults);
1347 INCHIGEN_DATA* pGenData,
1348 inchi_Output* pResults);
1349
1350
1351 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1352 INCHIGEN_Destroy / STDINCHIGEN_Destroy
1353
1354 InChI Generator: destroy generator
1355
1356 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
1359
1360
1361 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1362 MakeINCHIFromMolfileText
1363
1364 Direct generation of InChI from Molfile supplied as text
1365
1366 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
1368 char* options,
1369 inchi_Output* result);
1370
1371
1372#ifndef COMPILE_ALL_CPP
1373#ifdef __cplusplus
1374}
1375#endif
1376#endif
1377
1378#include "ixa.h"
1379
1380
1381#endif /* _INHCH_API_H_ */
void FreeInChIExtInput(inchi_Input_Polymer *polymer, inchi_Input_V3000 *v3000)
Definition inchi_dll.c:2888
unsigned short AT_NUMBR
Definition inchi_api.h:1148
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL GetStructFromStdINCHI(inchi_InputINCHI *inpInChI, inchi_OutputStruct *outStruct)
Definition inchi_dll.c:2426
signed char S_CHAR
Definition inchi_api.h:78
unsigned short U_SHORT
Definition inchi_api.h:85
void * INCHIGEN_HANDLE
Definition inchi_api.h:1251
EXPIMP_TEMPLATE INCHI_API INCHIGEN_HANDLE INCHI_DECL INCHIGEN_Create(void)
Definition inchi_dll_a.c:95
signed short NUM_HS
Definition inchi_api.h:1149
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL STDINCHIGEN_DoCanonicalization(INCHIGEN_HANDLE HGen, INCHIGEN_DATA *pGenData)
Definition inchi_dll_a.c:655
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL MakeINCHIFromMolfileText(const char *moltext, char *options, inchi_Output *result)
Definition inchi_dll_b.c:93
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL GetStringLength(char *p)
Definition inchi_dll.c:2051
EXPIMP_TEMPLATE INCHI_API void INCHI_DECL FreeStructFromINCHIEx(inchi_OutputStructEx *out)
Definition inchi_dll.c:2857
enum tagINCHIStereoType0D inchi_StereoType0D
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL GetINCHIKeyFromINCHI(const char *szINCHISource, const int xtra1, const int xtra2, char *szINCHIKey, char *szXtra1, char *szXtra2)
Definition ikey_dll.c:71
#define NUM_H_ISOTOPES
Definition inchi_api.h:72
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL GetINCHIEx(inchi_InputEx *inp, inchi_Output *out)
Definition inchi_dll.c:290
inchi_Input_PolymerUnit inchi_Output_PolymerUnit
Definition inchi_api.h:564
EXPIMP_TEMPLATE INCHI_API void INCHI_DECL STDINCHIGEN_Destroy(INCHIGEN_HANDLE HGen)
Definition inchi_dll_a.c:1273
tagRetValGetINCHIKey
Definition inchi_api.h:1026
@ INCHIKEY_INVALID_LAYOUT
Definition inchi_api.h:1030
@ INCHIKEY_VALID_NON_STANDARD
Definition inchi_api.h:1028
@ INCHIKEY_INVALID_LENGTH
Definition inchi_api.h:1029
@ INCHIKEY_INVALID_VERSION
Definition inchi_api.h:1031
@ INCHIKEY_VALID_STANDARD
Definition inchi_api.h:1027
EXPIMP_TEMPLATE INCHI_API void INCHI_DECL Free_std_inchi_Input(inchi_Input *pInp)
Definition ichilnct.c:147
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL GetStructFromINCHI(inchi_InputINCHI *inpInChI, inchi_OutputStruct *outStruct)
Definition inchi_dll.c:2821
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL INCHIGEN_DoNormalization(INCHIGEN_HANDLE HGen, INCHIGEN_DATA *pGenData)
Definition inchi_dll_a.c:407
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL INCHIGEN_DoSerialization(INCHIGEN_HANDLE HGen, INCHIGEN_DATA *pGenData, inchi_Output *pResults)
Definition inchi_dll_a.c:834
unsigned char U_CHAR
Definition inchi_api.h:79
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL Get_inchi_Input_FromAuxInfo(char *szInchiAuxInfo, int bDoNotAddH, int bDiffUnkUndfStereo, InchiInpData *pInchiInp)
Definition ichilnct.c:54
EXPIMP_TEMPLATE INCHI_API void INCHI_DECL Free_inchi_Input(inchi_Input *pInp)
Definition ichilnct.c:152
EXPIMP_TEMPLATE INCHI_API void INCHI_DECL FreeStdINCHI(inchi_Output *out)
Definition inchi_dll.c:148
tagINCHIBondStereo2D
Definition inchi_api.h:39
@ INCHI_BOND_STEREO_SINGLE_1DOWN
Definition inchi_api.h:44
@ INCHI_BOND_STEREO_SINGLE_1EITHER
Definition inchi_api.h:43
@ INCHI_BOND_STEREO_NONE
Definition inchi_api.h:41
@ INCHI_BOND_STEREO_SINGLE_2EITHER
Definition inchi_api.h:47
@ INCHI_BOND_STEREO_DOUBLE_EITHER
Definition inchi_api.h:50
@ INCHI_BOND_STEREO_SINGLE_2UP
Definition inchi_api.h:46
@ INCHI_BOND_STEREO_SINGLE_1UP
Definition inchi_api.h:42
@ INCHI_BOND_STEREO_SINGLE_2DOWN
Definition inchi_api.h:48
enum tagINCHIRadical inchi_Radical
#define INCHI_API
Definition inchi_api.h:671
#define INCHI_NUM
Definition inchi_api.h:1144
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL GetINCHIfromINCHI(inchi_InputINCHI *inpInChI, inchi_Output *out)
Definition inchi_dll.c:2079
EXPIMP_TEMPLATE INCHI_API void INCHI_DECL FreeINCHI(inchi_Output *out)
Definition inchi_dll.c:118
#define INCHI_DECL
Definition inchi_api.h:673
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL STDINCHIGEN_Setup(INCHIGEN_HANDLE HGen, INCHIGEN_DATA *pGenData, inchi_Input *pInp)
Definition inchi_dll_a.c:150
struct tagInchiInpData InchiInpData
tagINCHIBondType
Definition inchi_api.h:32
@ INCHI_BOND_TYPE_ALTERN
Definition inchi_api.h:37
@ INCHI_BOND_TYPE_DOUBLE
Definition inchi_api.h:35
@ INCHI_BOND_TYPE_SINGLE
Definition inchi_api.h:34
@ INCHI_BOND_TYPE_NONE
Definition inchi_api.h:33
@ INCHI_BOND_TYPE_TRIPLE
Definition inchi_api.h:36
struct tagINCHIGEN_DATA INCHIGEN_DATA
EXPIMP_TEMPLATE INCHI_API void INCHI_DECL STDINCHIGEN_Reset(INCHIGEN_HANDLE HGen, INCHIGEN_DATA *pGenData, inchi_Output *pResults)
Definition inchi_dll_a.c:1090
EXPIMP_TEMPLATE INCHI_API void INCHI_DECL INCHIGEN_Destroy(INCHIGEN_HANDLE HGen)
Definition inchi_dll_a.c:1280
struct tagINCHI_InputINCHI inchi_InputINCHI
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL CheckINCHIKey(const char *szINCHIKey)
Definition ikey_dll.c:471
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL Get_std_inchi_Input_FromAuxInfo(char *szInchiAuxInfo, int bDoNotAddH, InchiInpData *pInchiInp)
Definition ichilnct.c:45
enum tagRetValMOL2INCHI RetValMol2INCHI
#define EXPIMP_TEMPLATE
Definition inchi_api.h:672
struct tagInchiAtom inchi_Atom
struct tagINCHI_OutputStructEx inchi_OutputStructEx
enum tagRetValGetINCHIKey RetValCheckINCHIKeyv
EXPIMP_TEMPLATE INCHI_API INCHIGEN_HANDLE INCHI_DECL STDINCHIGEN_Create(void)
Definition inchi_dll_a.c:87
unsigned long INCHI_MODES
Definition inchi_api.h:1150
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL GetStdINCHI(inchi_Input *inp, inchi_Output *out)
Definition inchi_dll.c:207
struct tagNormAtom NORM_ATOM
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL STDINCHIGEN_DoSerialization(INCHIGEN_HANDLE HGen, INCHIGEN_DATA *pGenData, inchi_Output *pResults)
Definition inchi_dll_a.c:824
inchi_Input_V3000 inchi_Output_V3000
Definition inchi_api.h:566
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL GetINCHI(inchi_Input *inp, inchi_Output *out)
Definition inchi_dll.c:235
enum tagRetValCheckINCHI RetValCheckINCHI
tagINCHIStereoParity0D
Definition inchi_api.h:380
@ INCHI_PARITY_UNDEFINED
Definition inchi_api.h:386
@ INCHI_PARITY_UNKNOWN
Definition inchi_api.h:384
@ INCHI_PARITY_ODD
Definition inchi_api.h:382
@ INCHI_PARITY_NONE
Definition inchi_api.h:381
@ INCHI_PARITY_EVEN
Definition inchi_api.h:383
struct tagINCHI_Input inchi_Input
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL INCHIGEN_Setup(INCHIGEN_HANDLE HGen, INCHIGEN_DATA *pGenData, inchi_Input *pInp)
Definition inchi_dll_a.c:225
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL GetStructFromINCHIEx(inchi_InputINCHI *inpInChI, inchi_OutputStructEx *outStruct)
Definition inchi_dll.c:2450
tagRetValMOL2INCHI
Definition inchi_api.h:704
@ mol2inchi_Ret_ERROR_get
Definition inchi_api.h:709
@ mol2inchi_Ret_OKAY
Definition inchi_api.h:705
@ mol2inchi_Ret_WARNING
Definition inchi_api.h:706
@ mol2inchi_Ret_ERROR
Definition inchi_api.h:708
@ mol2inchi_Ret_EOF
Definition inchi_api.h:707
@ mol2inchi_Ret_ERROR_comp
Definition inchi_api.h:710
struct tagNormAtomData NORM_ATOMS
EXPIMP_TEMPLATE INCHI_API void INCHI_DECL FreeStructFromINCHI(inchi_OutputStruct *out)
Definition inchi_dll.c:173
#define ATOM_EL_LEN
Definition inchi_api.h:71
tagRetValCheckINCHI
Definition inchi_api.h:717
@ INCHI_INVALID_PREFIX
Definition inchi_api.h:721
@ INCHI_VALID_NON_STANDARD
Definition inchi_api.h:719
@ INCHI_VALID_BETA
Definition inchi_api.h:720
@ INCHI_VALID_STANDARD
Definition inchi_api.h:718
@ INCHI_INVALID_VERSION
Definition inchi_api.h:722
@ INCHI_INVALID_LAYOUT
Definition inchi_api.h:723
@ INCHI_FAIL_I2I
Definition inchi_api.h:724
#define MAX_NUM_STEREO_BONDS
Definition inchi_api.h:1141
EXPIMP_TEMPLATE INCHI_API void INCHI_DECL FreeStructFromStdINCHI(inchi_OutputStruct *out)
Definition inchi_dll.c:160
inchi_Input_Polymer inchi_Output_Polymer
Definition inchi_api.h:565
#define MAXVAL
Definition inchi_api.h:70
struct tagINCHI_OutputStruct inchi_OutputStruct
signed short S_SHORT
Definition inchi_api.h:84
tagRetValGetINCHI
Definition inchi_api.h:688
@ inchi_Ret_BUSY
Definition inchi_api.h:697
@ inchi_Ret_UNKNOWN
Definition inchi_api.h:696
@ inchi_Ret_BREAK
Definition inchi_api.h:689
@ inchi_Ret_ERROR
Definition inchi_api.h:694
@ inchi_Ret_EOF
Definition inchi_api.h:691
@ inchi_Ret_SKIP
Definition inchi_api.h:690
@ inchi_Ret_FATAL
Definition inchi_api.h:695
@ inchi_Ret_OKAY
Definition inchi_api.h:692
@ inchi_Ret_WARNING
Definition inchi_api.h:693
struct tagINCHI_Output inchi_Output
enum tagINCHIStereoParity0D inchi_StereoParity0D
S_SHORT AT_NUM
Definition inchi_api.h:89
tagINCHIStereoType0D
Definition inchi_api.h:372
@ INCHI_StereoType_DoubleBond
Definition inchi_api.h:374
@ INCHI_StereoType_Tetrahedral
Definition inchi_api.h:375
@ INCHI_StereoType_Allene
Definition inchi_api.h:376
@ INCHI_StereoType_None
Definition inchi_api.h:373
enum tagINCHIBondStereo2D inchi_BondStereo2D
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL STDINCHIGEN_DoNormalization(INCHIGEN_HANDLE HGen, INCHIGEN_DATA *pGenData)
Definition inchi_dll_a.c:400
#define STR_ERR_LEN
Definition inchi_api.h:885
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL INCHIGEN_DoCanonicalization(INCHIGEN_HANDLE HGen, INCHIGEN_DATA *pGenData)
Definition inchi_dll_a.c:663
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL CheckINCHI(const char *szINCHI, const int strict)
Definition inchi_dll.c:799
enum tagRetValGetINCHI RetValGetINCHI
tagINCHIRadical
Definition inchi_api.h:24
@ INCHI_RADICAL_NONE
Definition inchi_api.h:25
@ INCHI_RADICAL_TRIPLET
Definition inchi_api.h:28
@ INCHI_RADICAL_DOUBLET
Definition inchi_api.h:27
@ INCHI_RADICAL_SINGLET
Definition inchi_api.h:26
EXPIMP_TEMPLATE INCHI_API int INCHI_DECL GetStdINCHIKeyFromStdINCHI(const char *szINCHISource, char *szINCHIKey)
Definition ikey_dll.c:50
struct tagINCHIStereo0D inchi_Stereo0D
#define MAX_NUM_STEREO_ATOM_NEIGH
Definition inchi_api.h:1138
enum tagINCHIBondType inchi_BondType
EXPIMP_TEMPLATE INCHI_API void INCHI_DECL INCHIGEN_Reset(INCHIGEN_HANDLE HGen, INCHIGEN_DATA *pGenData, inchi_Output *pResults)
Definition inchi_dll_a.c:1099
Definition inchi_api.h:527
inchi_Input_V3000 * v3000
Definition inchi_api.h:543
inchi_Atom * atom
Definition inchi_api.h:531
AT_NUM num_atoms
Definition inchi_api.h:538
inchi_Stereo0D * stereo0D
Definition inchi_api.h:533
inchi_Input_Polymer * polymer
Definition inchi_api.h:541
char * szOptions
Definition inchi_api.h:535
AT_NUM num_stereo0D
Definition inchi_api.h:540
Definition inchi_api.h:459
int nb
Definition inchi_api.h:468
double xbr1[4]
Definition inchi_api.h:469
int subtype
Definition inchi_api.h:463
double xbr2[4]
Definition inchi_api.h:470
int na
Definition inchi_api.h:467
int * blist
Definition inchi_api.h:473
int label
Definition inchi_api.h:465
int * alist
Definition inchi_api.h:472
int id
Definition inchi_api.h:460
int conn
Definition inchi_api.h:464
int type
Definition inchi_api.h:462
char smt[80]
Definition inchi_api.h:471
Definition inchi_api.h:479
inchi_Input_PolymerUnit ** units
Definition inchi_api.h:481
int n
Definition inchi_api.h:482
Definition inchi_api.h:493
int * atom_index_orig
Definition inchi_api.h:496
int ** lists_sterac
Definition inchi_api.h:517
int ** lists_sterel
Definition inchi_api.h:513
int n_collections
Definition inchi_api.h:500
int ** lists_haptic_bonds
Definition inchi_api.h:503
int n_non_haptic_bonds
Definition inchi_api.h:501
int n_sterel
Definition inchi_api.h:512
int n_sterac
Definition inchi_api.h:516
int n_3d_constraints
Definition inchi_api.h:499
int n_non_star_atoms
Definition inchi_api.h:494
int * atom_index_fin
Definition inchi_api.h:497
int n_sgroups
Definition inchi_api.h:498
int ** lists_steabs
Definition inchi_api.h:509
int n_haptic_bonds
Definition inchi_api.h:502
int n_steabs
Definition inchi_api.h:508
int n_star_atoms
Definition inchi_api.h:495
Definition inchi_api.h:1236
char pStrErrStruct[STR_ERR_LEN]
Definition inchi_api.h:1238
int num_components[INCHI_NUM]
Definition inchi_api.h:1239
NORM_ATOMS * NormAtomsTaut[INCHI_NUM]
Definition inchi_api.h:1245
NORM_ATOMS * NormAtomsNontaut[INCHI_NUM]
Definition inchi_api.h:1244
Definition inchi_api.h:399
AT_NUM central_atom
Definition inchi_api.h:401
S_CHAR parity
Definition inchi_api.h:404
S_CHAR type
Definition inchi_api.h:403
AT_NUM neighbor[4]
Definition inchi_api.h:400
Definition inchi_api.h:556
char * szOptions
Definition inchi_api.h:559
char * szInChI
Definition inchi_api.h:558
Definition inchi_api.h:431
inchi_Stereo0D * stereo0D
Definition inchi_api.h:434
AT_NUM num_atoms
Definition inchi_api.h:437
char * szOptions
Definition inchi_api.h:435
AT_NUM num_stereo0D
Definition inchi_api.h:438
inchi_Atom * atom
Definition inchi_api.h:433
Definition inchi_api.h:623
inchi_Stereo0D * stereo0D
Definition inchi_api.h:627
inchi_Output_V3000 * v3000
Definition inchi_api.h:640
inchi_Atom * atom
Definition inchi_api.h:626
char * szMessage
Definition inchi_api.h:630
unsigned long WarningFlags[2][2]
Definition inchi_api.h:633
inchi_Output_Polymer * polymer
Definition inchi_api.h:639
char * szLog
Definition inchi_api.h:631
AT_NUM num_stereo0D
Definition inchi_api.h:629
AT_NUM num_atoms
Definition inchi_api.h:628
Definition inchi_api.h:601
AT_NUM num_stereo0D
Definition inchi_api.h:607
char * szMessage
Definition inchi_api.h:608
inchi_Stereo0D * stereo0D
Definition inchi_api.h:605
unsigned long WarningFlags[2][2]
Definition inchi_api.h:611
char * szLog
Definition inchi_api.h:609
AT_NUM num_atoms
Definition inchi_api.h:606
inchi_Atom * atom
Definition inchi_api.h:604
Definition inchi_api.h:587
char * szLog
Definition inchi_api.h:593
char * szAuxInfo
Definition inchi_api.h:591
char * szMessage
Definition inchi_api.h:592
char * szInChI
Definition inchi_api.h:590
Definition inchi_api.h:99
AT_NUM isotopic_mass
Definition inchi_api.h:123
double z
Definition inchi_api.h:103
S_CHAR charge
Definition inchi_api.h:126
S_CHAR radical
Definition inchi_api.h:125
AT_NUM num_bonds
Definition inchi_api.h:114
S_CHAR num_iso_H[NUM_H_ISOTOPES+1]
Definition inchi_api.h:116
S_CHAR bond_type[MAXVAL]
Definition inchi_api.h:107
double y
Definition inchi_api.h:102
char elname[ATOM_EL_LEN]
Definition inchi_api.h:112
AT_NUM neighbor[MAXVAL]
Definition inchi_api.h:105
S_CHAR bond_stereo[MAXVAL]
Definition inchi_api.h:109
double x
Definition inchi_api.h:101
Definition inchi_api.h:888
int bChiral
Definition inchi_api.h:890
inchi_Input * pInp
Definition inchi_api.h:889
char szErrMsg[STR_ERR_LEN]
Definition inchi_api.h:891
Definition inchi_api.h:1211
int bDeleted
Definition inchi_api.h:1219
int bTautPreprocessed
Definition inchi_api.h:1222
int bHasIsotopicLayer
Definition inchi_api.h:1220
int num_bonds
Definition inchi_api.h:1216
int bTautomeric
Definition inchi_api.h:1221
NORM_ATOM * at_fixed_bonds
Definition inchi_api.h:1213
NUM_HS num_iso_H[NUM_H_ISOTOPES]
Definition inchi_api.h:1226
INCHI_MODES bTautFlags
Definition inchi_api.h:1229
int num_isotopic
Definition inchi_api.h:1217
NORM_ATOM * at
Definition inchi_api.h:1212
NUM_HS nNumRemovedProtonsIsotopic[NUM_H_ISOTOPES]
Definition inchi_api.h:1224
int num_at
Definition inchi_api.h:1214
int bExists
Definition inchi_api.h:1218
INCHI_MODES bNormalizationFlags
Definition inchi_api.h:1231
INCHI_MODES bTautFlagsDone
Definition inchi_api.h:1230
int nNumRemovedProtons
Definition inchi_api.h:1223
int num_removed_H
Definition inchi_api.h:1215
Definition inchi_api.h:1153
AT_NUMBR nBlockSystem
Definition inchi_api.h:1199
S_CHAR bCutVertex
Definition inchi_api.h:1196
S_CHAR iso_atw_diff
Definition inchi_api.h:1168
S_CHAR cFlags
Definition inchi_api.h:1174
AT_NUMBR endpoint
Definition inchi_api.h:1177
U_CHAR bond_type[MAXVAL]
Definition inchi_api.h:1161
S_CHAR bUsed0DParity
Definition inchi_api.h:1183
AT_NUMBR component
Definition inchi_api.h:1176
S_CHAR radical
Definition inchi_api.h:1172
S_CHAR chem_bonds_valence
Definition inchi_api.h:1165
S_CHAR sb_ord[MAX_NUM_STEREO_BONDS]
Definition inchi_api.h:1188
S_CHAR bAmbiguousStereo
Definition inchi_api.h:1173
AT_NUMBR neighbor[MAXVAL]
Definition inchi_api.h:1156
char elname[ATOM_EL_LEN]
Definition inchi_api.h:1154
S_CHAR num_iso_H[NUM_H_ISOTOPES]
Definition inchi_api.h:1167
AT_NUMBR sn_orig_at_num[MAX_NUM_STEREO_BONDS]
Definition inchi_api.h:1193
S_CHAR bond_stereo[MAXVAL]
Definition inchi_api.h:1159
AT_NUMBR orig_compt_at_numb
Definition inchi_api.h:1158
S_CHAR charge
Definition inchi_api.h:1171
AT_NUMBR orig_at_number
Definition inchi_api.h:1157
AT_NUMBR nNumAtInRingSystem
Definition inchi_api.h:1198
double z
Definition inchi_api.h:1181
double y
Definition inchi_api.h:1180
S_CHAR sb_parity[MAX_NUM_STEREO_BONDS]
Definition inchi_api.h:1192
S_CHAR num_H
Definition inchi_api.h:1166
U_CHAR el_number
Definition inchi_api.h:1155
double x
Definition inchi_api.h:1179
S_CHAR sn_ord[MAX_NUM_STEREO_BONDS]
Definition inchi_api.h:1189
AT_NUMBR p_orig_at_num[MAX_NUM_STEREO_ATOM_NEIGH]
Definition inchi_api.h:1186
AT_NUMBR c_point
Definition inchi_api.h:1178
AT_NUMBR nRingSystem
Definition inchi_api.h:1197
S_CHAR p_parity
Definition inchi_api.h:1185
AT_NUMBR at_type
Definition inchi_api.h:1175
S_CHAR valence
Definition inchi_api.h:1164