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