InChI
 
Loading...
Searching...
No Matches
ichirvrs.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 _ICHIRVRS_H_
8#define _ICHIRVRS_H_
9
10#include "ichimain.h"
11#include "ichiring.h"
12
13#define ICHICONST const
14
15#define RI_ERR_ALLOC (-1)
16#define RI_ERR_SYNTAX (-2)
17#define RI_ERR_PROGR (-3)
18#define RI_ERR_EOL (-4)
19#define RI_ERR_EOF (0)
20
21#define RI_ERR_MISMATCH (-9)
22
23#define NO_VALUE_INT 9999
24#define NOT_READ_INT 9998 /* has not been read yet */
25
26#define VALUE_OCTET 8 /* number of electrons in a full shell */
27
28#define INC_EDGE_LIST_DEFAULT 64
29
30typedef struct tagXYZCoord {
31 double xyz[3];
33
34typedef struct tagStructRestoreMode {
35 int bMetalAddFlower; /* 1 => allow adjustable metal valence and charge; 0=> use std charge/valence */
36 /* the following three apply only if bMetalAddFlower = 1 */
37 int nMetalMinBondOrder; /* edge_flow=f means bond order=cMetalMinBondOrder+f */
38 int nMetalInitEdgeFlow; /* one bond contribution to metal's (st-cap - st-flow) = */
39 /* (nMetalInitBondOrder-nMetalMinBondOrder) - nMetalInitEdgeFlow */
40 int nMetalInitBondOrder; /* >= nMetalMinBondOrder + nMetalInitEdgeFlow */
41 /* same for metal-endpoint bonds */
45 int nMetalFlowerParam_D; /* additional edge capacity for canceling radicals */
46 int nMetalMaxCharge_D; /* cap and/or flow for metal charge group */
47 int bStereoRemovesMetalFlag; /* 1=> treat stereogenic atoms and atoms connected by a stereo bond as non-metals */
48
49 int bFixStereoBonds; /* 1=> forbid stereogenic double bonds from changing */
51
58
59/**************************************/
60#define BFS_Q_CLEAR (-1)
61#define BFS_Q_FREE (-2)
62typedef struct tagBfsQueue {
66 int num_at;
67 AT_RANK min_ring_size; /* 8 => detect 7-member and smaller rings */
69/**************************************/
70
71#define EXTRACT_STRUCT_NUMBER 1
72
73/* additional Mobile-H parities to be added to Fixed-H parities */
74/* This allows to set parities that exist in Mobile-H layer only */
75typedef struct tagInpAtomAddParities {
76 /* cml 0D parities */
77 S_CHAR bUsed0DParity; /* bit=1 => stereobond; bit=2 => stereocenter */
78 /* cml tetrahedral parity */
81 /* cml bond parities */
82 S_CHAR sb_ord[MAX_NUM_STEREO_BONDS]; /* stereo bond/neighbor ordering number, starts from 0 */
83 /* neighbors on both sides of stereobond have same sign=> trans/T/E, diff. signs => cis/C/Z */
84 S_CHAR sn_ord[MAX_NUM_STEREO_BONDS]; /* ord. num. of the neighbor adjacent to the SB; starts from 0;
85 -1 means removed explicit H */
86 /* neighbors on both sides of stereobond have same parity => trans/T/E/2, diff. parities => cis/C/Z/1 */
88 AT_NUMB sn_orig_at_num[MAX_NUM_STEREO_BONDS]; /* orig. at number of sn_ord[] neighbors */
90
91#define FIX_STEREO_BOND_ORDER 0 /* 1=> fix stereobonds; treat metal as non-metal if it is stereogenic or has a stereobond */
92
93#define METAL_FREE_CHARGE_VAL 1 /* 1=> allow free changing charges/valences of metals; initial bond order=0 or 1 */
94#define ALLOW_METAL_BOND_ZERO 1 /* 1=> allow zero flow (bobd order) to metals */
95
96#if ( ALLOW_METAL_BOND_ZERO == 1 )
97/* INIT_METAL_BOND_ZERO=1 => INIT_METAL_BOND_FLOW=0 */
98#define INIT_METAL_BOND_ZERO 0 /* 1=> initialize zero order bond to metals */
99#define INIT_METAL_BOND_FLOW 1 /* 1=> init flow=1, 0 => init. flow = 0 */
100#else
101#define INIT_METAL_BOND_ZERO 0
102#define INIT_METAL_BOND_FLOW 0 /* always 0 */
103#endif
104
105#define I2A_FLAG_FIXEDH 0x0001
106#define I2A_FLAG_RECMET 0x0002
107
108
109#define ATYPE_H 1
110#define ATYPE_Na 2
111#define ATYPE_Mg 3
112#define ATYPE_B 4
113#define ATYPE_C 5
114#define ATYPE_N 6
115#define ATYPE_O 7
116#define ATYPE_Cl 8
117
118
119/* first bonds valence for charge = c is cValence[0][c+VAL_BASE]; VAL_MIN_CHARGE <= c <= VAL_MAX_CHARGE */
120/* second bonds valence for charge = c is cValence[1][c+VAL_BASE]; VAL_MIN_CHARGE <= c <= VAL_MAX_CHARGE */
121/* total number of valences is 2 = VAL_NUMBER */
122/* neutral bond valence orders are cValence[0][VAL_NEUTR_ORDER], cValence[1][VAL_NEUTR_ORDER] */
123#define VAL_BASE ( 1)
124#define VAL_MIN_CHARGE (-1)
125#define VAL_MAX_CHARGE ( 1)
126#define VAL_NUMBER ( 2)
127#define VAL_NEUTR_ORDER (VAL_MAX_CHARGE-VAL_MIN_CHARGE+1)
128#define VAL_LENGTH (VAL_NEUTR_ORDER+1)
129#define VAL_NEGAT_CHARGE 0
130#define VAL_NEUTR_CHARGE 1
131#define VAL_POSIT_CHARGE 2
132
133typedef struct tagAtomIonPrperies {
134 /* char cValence[VAL_NUMBER][VAL_LENGTH]; */ /* ordering numbers of minimal valence, 0-based */
135 char cDoNotAddH; /* InChI does not add H to this element */
136 char cMetal; /* the element is a metal */
137 char cNumBondsToMetal; /* number of bonds to metal */
138 char cInitFlowToMetal; /* sum of init flow to metal atoms */
139 char cInitValenceToMetal; /* sum of init adjusted bond orders to metal atoms */
140 char cInitOrigValenceToMetal; /* sum of init bond orders to metal atoms */
141 char cMaxFlowToMetal; /* max total edge flow to metal atoms */
142 char cInitFreeValences; /* number of 'dots' to connect; charges are marked separately */
143 S_CHAR cInitCharge; /* initial charge on the atom (not included in ChargeStruct */
146 char cMinRingSize; /* min ring size for atoms that have 2 bonds only */
147 U_CHAR cPeriodicNumber; /* number in Periodic Table of elements */
148 S_CHAR cnListIndex; /* (index in the cnList) + 1; 0 => none */
149 int nCMinusGroupEdge; /* (index of the edge to the atom's (-) group) + 1 */
150 int nCPlusGroupEdge; /* (index of the edge to the atom's (+) group) + 1 */
151 int nMetalGroupEdge; /* index of the edge to the atom's M-group + 1 */
152 int nTautGroupEdge; /* index of the edge from the atom to the t-group + 1 */
154
155
156/****************************************************************************/
157#define INI_NUM_TCGROUPS 16
158#define INC_NUM_TCGROUPS 16
159
163typedef struct tagTCGroup {
164 int type; /* group type */
165 int ord_num; /* ordering number within the type, typically t-group number */
167 /* charge group specific */
172 int nVertexNumber; /* group vertex number; 0 = unassigned */
173 int nForwardEdge; /* edge index: from c-group to central Y-connecting vertex
174 or from supergroup to (+/-) vertex; 0 => unassigned */
175 int nBackwardEdge; /* edge index: from central Y-connecting vertex
176 to supergroup; 0 => unassigned */
177 /* tautomeric group specific */
178 short tg_num_H; /* number of H in a tautomeric group */
179 short tg_num_Minus; /* negative charge on t-group */
180 Vertex tg_set_Minus; /* the vertex+1 that has to have (-) */
181 short tg_RestoreFlags; /* Set (-) to first memberst of a t-group (usually, N) */
183
184typedef enum tagTCGroupTypes {
185 TCG_None = -1, /* so far only ord=0 is used */
186 /* group type ord */
187 TCG_Plus0 = 0, /* BNS_VT_C_POS 0 */
188 TCG_Plus1, /* BNS_VT_C_POS 1 */
189 TCG_Minus0, /* BNS_VT_C_NEG 0 */
190 TCG_Minus1, /* BNS_VT_C_NEG 1 */
191 TCG_Plus_C0, /* BNS_VT_C_POS_C 0 */
192 TCG_Plus_C1, /* BNS_VT_C_POS_C 1 */
193 TCG_Minus_C0, /* BNS_VT_C_NEG_C 0 */
194 TCG_Minus_C1, /* BNS_VT_C_NEG_C 1 */
195 TCG_Plus_M0, /* BNS_VT_C_POS_M 0 */
196 TCG_Plus_M1, /* BNS_VT_C_POS_M 1 */
197 TCG_Minus_M0, /* BNS_VT_C_NEG_M 0 */
198 TCG_Minus_M1, /* BNS_VT_C_NEG_M 1 */
199 TCG_MeFlower0, /* BNS_VT_M_GROUP 0 */ /* base */
200 TCG_MeFlower1, /* BNS_VT_M_GROUP 1 */
201 TCG_MeFlower2, /* BNS_VT_M_GROUP 2 */
202 TCG_MeFlower3, /* BNS_VT_M_GROUP 3 */
203
204 TCG_Plus, /* BNS_VT_C_POS_ALL 0 */
205 TCG_Minus, /* BNS_VT_C_NEG_ALL 0 */
206
207 NUM_TCGROUP_TYPES /* number of group types */
209
210typedef struct tagAllTCGroups {
212 int num_tc_groups; /* number of charge groups and metal-flower vertices */
213 int max_tc_groups; /* number of allocated of pTCG[] elements */
214 int nGroup[NUM_TCGROUP_TYPES]; /* tagTCGroupTypes */
215 int nVertices; /* total number of vertices */
216 int nEdges; /* total number of edges */
217 int nAddIedges; /* additional increase of number of iedges for edge switching to another group */
218 int num_atoms; /* number of atoms */
219 int num_bonds; /* number of bonds */
220 int num_tgroups; /* number t-groups */
221 int num_tgroup_edges; /* number of edges to t-groups */
222 /* charges */
223 int tgroup_charge; /* total charge of all t-groups */
224 int charge_on_atoms; /* charge permanently sitting on atoms */
225 int added_charge; /* charge added to the c-groups */
226 int total_charge; /* total charge of the component */
227 int total_electrons; /* total number of electrons on all atoms */
228 int total_electrons_metals; /* total number of electrons on unbonded metals */
229
230 int num_metal_atoms; /* number of metal atoms */
231 int num_metal_bonds; /* number of atom-metal bonds */
232 /* excess_charge = total_charge - added_charge - tgroup_charge: add to metals etc. */
233
234 int nEdge4charge; /* edge used to add charges; neighbor1=supercharge, another = (+/-) vertex */
235 int nEdgePlus; /* edge to (+) supergroup; 0 means none */
236 int nEdgeMinus; /* edge to (-) supergroup; 0 means none */
237 int iComponent; /* component number */
238 int iAtNoOffset; /* first atom number -- always 0 for now */
240
241/**************************************/
242#define EDGE_LIST_CLEAR (-1)
243#define EDGE_LIST_FREE (-2)
244
250/**************************************/
251
252#define BOND_MARK_STEREO 0x10
253#define BOND_TYPE_STEREO (BOND_TYPE_SINGLE | BOND_MARK_STEREO)
254
255/* local */
256#define RESET_EDGE_FORBIDDEN_MASK 0
257
258#define TREAT_ATOM_AS_METAL 99
259
260
261/************************************************************************************/
267
268#define MY_CONST const
269/*************************************************************************************/
281
284 NUM_H nNumRemovedIsotopicH[NUM_H_ISOTOPES]; /* isotopic H that may be exchanged and considered
285 randomly distributed, including removed protons */
287
289 /* totals for Mobile-H layer */
291 NUM_H nNumRemovedIsotopicH[NUM_H_ISOTOPES]; /* isotopic H that may be exchanged and considered
292 randomly distributed, including removed protons */
293 /* for individual components from comparing Fixed-H vs Mobile-H formulas; NULL if not available */
296
297typedef struct tagInputInChI {
302 /* s[0=non-iso, 1=iso] = 0,1,2,3 <= regular /s; -1=> "/s" (empty) */
304 inp_ATOM *atom; /* the whole restored structure made out of all components */
305 int num_atoms; /* number of atoms including explicit H */
306 int num_explicit_H; /* number of explicit H in the atom */
308 /* v. 1.05 extensions */
313
314typedef struct tagStructFromInChI {
315 /* InChI component -> Structure result */
316 inp_ATOM *at; /* length = num_atoms + num_deleted_H, zero pint struct for BNS->struct conversion */
317 inp_ATOM_STEREO *st; /* additional stereo that exists only in Mobile-H layer */
318 inp_ATOM *at2; /* length = num_atoms + num_deleted_H, the conversion result */
319
320 /* information from InChI only */
321 T_GROUP_INFO ti; /* from original InChI[0] if Mobile-H from the beginning or later from InChI[1] if Fixed-H */
322 AT_NUMB *endpoint; /* from original InChI[1] in case of Fixed-H only */
323 S_CHAR *fixed_H; /* from original InChI[0] in case of Fixed-H only */
326 int num_deleted_H; /* if requested and Fixed-H InChI is available */
327 int nNumRemovedProtonsMobHInChI; /* number of protons removed from Mobile-H struct in original InChI */
330
331 /* InChI -> Structure conversion parms and intermediate data */
335
336 /* InChI layer to reverse */
338 char iINCHI;
339 char bFixedHExists; /* fixed-H InChI exists or not */
340
341 /* InChI -> Struct component -> Full InChI result (both disconnected and connected if exist) */
343 int nRemovedProtonsByNormFromRevrs; /* number of H(+) removed by normalization after
344 Struct Restore and before Add/Remove Protons */
345 int nNumRemovedProtonsByRevrs; /* number of H(+) removed by the reconstruction,
346 before Add/Remove Protons, only from TAUT_YES */
347
348 int bExtract; /* for debugging */
349
350 /* single component InChI calculation */
351 INChI *pOneINChI[TAUT_NUM]; /* InChI of restored structure */
353 INP_ATOM_DATA *pOne_norm_data[TAUT_NUM]; /* normalized restored structure */
354 S_CHAR *pOne_fixed_H; /* !!! from normalized restored structure in case of Fixed-H only */
355 T_GROUP_INFO One_ti; /* t-groups of normalized canonicalized restored structure */
356 int nOneINChI_bMobileH; /* type of restored structure InChI */
357 int nNumRemovedProtons; /* =0 for Fixed-H, = num. removed protons in case of Mobile-H InChI */
358 /* in case of Fixed-H processing see pStruct->One_ti.tni.nNumRemovedProtons */
359 AT_NUMB *nAtno2Canon[TAUT_NUM]; /* nAtno2Canon[restored_at_no][*] = (atom canon number in restored struct)-1*/
360 AT_NUMB *nCanon2Atno[TAUT_NUM]; /* nCanon2Atno[(atom canon number in restored struct)-1][*] = restored_at_no; */
361
363 /* other parms */
364 char iInchiRec; /* index in the original InChI array */
365 char iMobileH; /* index in the original InChI array */
366 char bDeleted; /* InChI component marked as Deleted, means a proton in Mobile-H layer */
367 /* struct. ordering number "Structure: nnn" if present */
369
370 /* utility data */
373
374 int nLink; /* same as in INChI */
375 int bPostProcessed; /* recalculate after add/remove protons */
376
377 /* TAUT_YES layer charges */
378 int nChargeRevrs; /* component charge of the reconstructed structure, TAUT_YES layer */
379 int nChargeInChI; /* component charge from the original InChI, TAUT_YES layer */
380
381 int n_zy;
382 int n_pzz;
384
385
386#define EL_TYPE_O 0x0001
387#define EL_TYPE_S 0x0002
388#define EL_TYPE_N 0x0004
389#define EL_TYPE_P 0x0008
390#define EL_TYPE_C 0x0010
391#define EL_TYPE_X 0x0020 /* any not metal */
392#define EL_TYPE_MASK 0x003f
393#define EL_TYPE_OSt 0x0100 /* terminal -OH, -O(-), -SH, -S(-), ... from fix_special_bonds(...) */
394#define EL_TYPE_PT 0x0200 /* may be a tautomeric endpoint */
395
396/* the atom to which the node is attached has number 1; added atoms have numbers 2,3,... */
397#define MAX_CN_VAL 3
414
415
416#define cn_bits_N 1 /* Neutral: charge = 0 */
417#define cn_bits_P 2 /* Plus 1: charge = +1 */
418#define cn_bits_M 4 /* Minus 1: charge = -1 */
419#define cn_bits_shift 3
420#define MAX_NUM_CN_BITS 4
421#define MAKE_CN_BITS(A, B, C, D ) (( (( ((D) << cn_bits_shift | (C)) << cn_bits_shift ) | (B)) << cn_bits_shift ) | (A))
422
423#define cn_bits_PNPN MAKE_CN_BITS(cn_bits_P, cn_bits_N, cn_bits_P, cn_bits_N)
424#define cn_bits_NPNP MAKE_CN_BITS(cn_bits_N, cn_bits_P, cn_bits_N, cn_bits_P)
425#define cn_bits_NPN MAKE_CN_BITS(cn_bits_N, cn_bits_P, cn_bits_N, 0)
426#define cn_bits_PNP MAKE_CN_BITS(cn_bits_P, cn_bits_N, cn_bits_P, 0)
427#define cn_bits_MNP MAKE_CN_BITS(cn_bits_M, cn_bits_N, cn_bits_P, 0)
428#define cn_bits_PNM MAKE_CN_BITS(cn_bits_P, cn_bits_N, cn_bits_M, 0)
429#define cn_bits_EN MAKE_CN_BITS(cn_bits_P | cn_bits_M, cn_bits_N, 0, 0)
430#define cn_bits_NMN MAKE_CN_BITS(cn_bits_N, cn_bits_M, cn_bits_N, 0)
431#define cn_bits_NE MAKE_CN_BITS(cn_bits_N, cn_bits_P | cn_bits_M, 0, 0)
432#define cn_bits_NEN MAKE_CN_BITS(cn_bits_N, cn_bits_M | cn_bits_N, cn_bits_N, 0)
433#define cn_bits_NP MAKE_CN_BITS(cn_bits_N, cn_bits_P, 0, 0)
434#define cn_bits_PN MAKE_CN_BITS(cn_bits_P, cn_bits_N, 0, 0)
435#define cn_bits_NM MAKE_CN_BITS(cn_bits_N, cn_bits_M, 0, 0)
436#define cn_bits_MN MAKE_CN_BITS(cn_bits_M, cn_bits_N, 0, 0)
437#define cn_bits_P_ MAKE_CN_BITS(cn_bits_P, 0, 0, 0)
438#define cn_bits_M_ MAKE_CN_BITS(cn_bits_M, 0, 0, 0)
439#define cn_bits_N_ MAKE_CN_BITS(cn_bits_N, 0, 0, 0)
440#define cn_bits_Me (-1)
441
442#define cnListIndexMe (17) /* index of {cnMe, cn_bits_Me,... } element of cnList[] */
443
444extern const int cnListNumEl; /* number of elements in cnList[] */
445
452
453extern MY_CONST CN_LIST cnList[];
454
455/************************ fixed H comparison ******************************************************/
456#define MAX_DIFF_FIXH 256
457#define MAX_DIFF_MOBH 256
472
473typedef struct tagStructCmpTwoFixedH {
475 short len_c2at;
482 short nNumTgDiffMinus; /* number of would-be-identical t-groups that have different number of (-) */
483 short nNumTgDiffH; /* number of would-be-identical t-groups that have different number of H */
484 short nNumTgMInChI; /* number of (-) in orig. InChI t-groups */
485 short nNumTgHInChI; /* number of H in orig. InChI t-groups */
486 short nNumTgMRevrs; /* number of (-) in reversed structure t-groups */
487 short nNumTgHRevrs; /* number of H in reversed structure t-groups */
492 S_CHAR nChargeFixHRevrsNonMetal; /* charge does not include charges on metals */
493 S_CHAR nChargeMobHRevrsNonMetal; /* charge does not include charges on metals */
498
499/************************ Mobile H comparison *********************************************/
500typedef struct tagAtomsCmpTwoMobileH {
506 S_CHAR nMobHInChI; /* number of H on the atom in the orig. InChI */
507 S_CHAR nMobHRevrs; /* number of H on the atom in InChI from the reconstructed structure */
508 S_CHAR nNumHRevrs; /* number of H on the atom in the being reconstructed structure */
510 S_CHAR nValue; /* flag(s) */
512
515 short len_c2at;
522 short nNumTgDiffMinus; /* number of would-be-identical t-groups that have different number of (-) */
523 short nNumTgDiffH; /* number of would-be-identical t-groups that have different number of H */
524
525 short nNumTgMInChI; /* number of (-) in orig. InChI t-groups */
526 short nNumTgHInChI; /* number of H in orig. InChI t-groups */
527 short nNumTgOInChI; /* number of tautomeric O,S,Se in orig. InChI t-groups */
528 short nNumTgNInChI; /* number of tautomeric N in orig. InChI t-groups */
529
530 short nNumTgMRevrs; /* number of (-) in reversed structure t-groups */
531 short nNumTgHRevrs; /* number of H in reversed structure t-groups */
532 short nNumTgORevrs; /* number of tautomeric O,S,Se in reversed structure t-groups */
533 short nNumTgNRevrs; /* number of tautomeric N in reversed structure t-groups */
534
535 short nNumTgOMinusRevrs; /* number of -O(-) on endpoints found in restored structure */
536 short nNumTgOHRevrs; /* number of -OH on endpoints found in restored structure */
537 short nNumTgDBORevrs; /* number of =O on endpoints found in restored structure */
538 short nNumTgNMinusRevrs; /* number of -N(-)- on endpoints found in restored structure */
539 short nNumTgNHMinusRevrs; /* number of -NH(-) on endpoints found in restored structure */
540 short nNumTgNHRevrs; /* number of -NH- on endpoints found in restored structure */
541 short nNumTgNH2Revrs; /* number of -NH2 on endpoints found in restored structure */
542 short nNumTgDBNHRevrs; /* number of =NH on endpoints found in restored structure */
543 short nNumTgDBNMinusRevrs; /* number of =N(-) on endpoints found in restored structure */
544 short nNumTgDBNRevrs; /* number of =N- on endpoints found in restored structure */
545
546 short nNumTgOMinusInChI; /* number of -O(-) on endpoints according to original InChI */
547 short nNumTgOHInChI; /* number of -OH on endpoints according to original InChI */
548 short nNumTgDBOInChI; /* number of =O on endpoints according to original InChI */
549 short nNumTgNMinusInChI; /* number of -N(-)- on endpoints according to original InChI */
550 short nNumTgNHMinusInChI; /* number of -NH(-) on endpoints according to original InChI */
551 short nNumTgNHInChI; /* number of -NH- on endpoints according to original InChI */
552 short nNumTgNH2InChI; /* number of -NH2 on endpoints according to original InChI */
553 short nNumTgDBNHInChI; /* number of =NH on endpoints according to original InChI */
554 short nNumTgDBNMinusInChI; /* number of =N(-) on endpoints according to original InChI */
555 short nNumTgDBNInChI; /* number of =N- on endpoints according to original InChI */
556
559 S_CHAR nChargeMobHRevrsNonMetal; /* charge does not include charges on metals; later add ion pairs rejection */
564
565
566#ifndef COMPILE_ALL_CPP
567#ifdef __cplusplus
568extern "C" {
569#endif
570#endif
571
572
573struct tagCANON_GLOBALS;
574struct tagINCHI_CLOCK;
575int OneInChI2Atom( struct tagINCHI_CLOCK *ic,
576 struct tagCANON_GLOBALS *pCG,
578 STRUCT_DATA *sd,
579 const char *szCurHdr,
580 long num_inp,
581 StrFromINChI *pStruct,
582 int iComponent,
583 int iAtNoOffset,
584 int bHasSomeFixedH,
585 INChI *pInChI[] );
586
587int get_sp_element_type( int nPeriodicNumber, int *nRow );
588
589int get_bonds_valences( int nPeriodicNum,
590 int bonds_valence,
591 int num_H,
592 VAL_AT *pVA );
593
594
595/* local prototypes */
597 int jv,
598 int num_at,
599 int *iDeletedH,
600 int *iH,
601 int nNumDeletedH,
602 int bTwoStereo );
604 AT_NUMB i1,
605 AT_NUMB i2,
606 AT_NUMB nCumulene[],
607 int nMaxLen );
608int set_bond_type( inp_ATOM *at,
609 AT_NUMB i1,
610 AT_NUMB i2,
611 int bType );
613 inp_ATOM_STEREO *st,
614 int num_at,
615 int idelH1,
616 int i1,
617 int i2,
618 int idelH2,
619 int parity,
620 int len );
622 inp_ATOM_STEREO *st,
623 int num_at,
624 int num_deleted_H,
625 int i1,
626 int parity );
628 inp_ATOM *at,
629 AT_NUMB *endpoint,
630 INChI *pInChI );
631int FillOutpStructEndpointFromInChI( INChI *pInChI, AT_NUMB **pEndpoint );
632int SetStereoBondTypeFor0DParity( inp_ATOM *at, int i1, int m1 );
633int SetStereoBondTypesFrom0DStereo( StrFromINChI *pStruct, INChI *pInChI );
634void CopyAt2St( inp_ATOM *at, inp_ATOM_STEREO *st, int num_atoms );
635void CopySt2At( inp_ATOM *at, inp_ATOM_STEREO *st, int num_atoms );
637 int iComponent,
638 int iAtNoOffset,
639 INChI *pInChI,
640 INChI *pInChIMobH );
641
642int RestoreAtomMakeBNS( struct tagINCHI_CLOCK *ic,
643 struct tagCANON_GLOBALS *pCG,
645 STRUCT_DATA *sd,
646 StrFromINChI *pStruct,
647 int iComponent,
648 int iAtNoOffset,
649 INChI *pInChI[],
650 const char *szCurHdr,
651 long num_inp,
652 int bHasSomeFixedH );
653
654int nAddSuperCGroups( ALL_TC_GROUPS *pTCGroups );
655
657 StrFromINChI *pStruct,
658 VAL_AT *pVA,
659 ALL_TC_GROUPS *pTCGroups,
660 int nMaxAddEdges );
662 StrFromINChI *pStruct,
663 VAL_AT *pVA,
664 ALL_TC_GROUPS *pTCGroups,
665 int nMaxAddEdges );
667 VAL_AT *pVA,
668 ALL_TC_GROUPS *pTCGroups,
669 int nMaxAddAtoms,
670 int nMaxAddEdges,
671 int max_altp,
672 int *pNum_changed_bonds );
673int nCountBnsSizes( inp_ATOM *at,
674 int num_at,
675 int nAddEdges2eachAtom,
676 int nAddVertices,
677 T_GROUP_INFO *ti,
678 VAL_AT *pVA,
679 ICHICONST SRM *pSrm,
680 ALL_TC_GROUPS *pTCGroups );
681
682int GetAtomRestoreInfo( struct tagCANON_GLOBALS *pCG,
683 inp_ATOM *atom, int iat, VAL_AT *pVArray,
684 ICHICONST SRM *pSrm, int bMobileH, AT_NUMB *endpoint );
685
686int AddEdgeFlow( int edge_cap,
687 int edge_flow,
688 BNS_EDGE *e01,
689 BNS_VERTEX *pv0 /*src*/,
690 BNS_VERTEX *pv1/*dest*/,
691 int *tot_st_cap,
692 int *tot_st_flow );
693
694void SetEdgeCapFlow( BNS_EDGE *e, int edge_cap, int edge_flow );
695
696void AddStCapFlow( BNS_VERTEX *vert_ficpoint,
697 int *tot_st_flow,
698 int *tot_st_cap,
699 int cap,
700 int flow );
701void SetStCapFlow( BNS_VERTEX *vert_ficpoint,
702 int *tot_st_flow,
703 int *tot_st_cap,
704 int cap,
705 int flow );
706
707int ConnectSuperCGroup( int nTCG_Plus,
708 int nAddGroups[],
709 int num_add,
710 int *pcur_num_vertices,
711 int *pcur_num_edges,
712 int *tot_st_cap,
713 int *tot_st_flow,
714 BN_STRUCT *pBNS,
715 ALL_TC_GROUPS *pTCGroups );
717 BNS_VERTEX *p2,
718 BNS_EDGE *e,
719 BN_STRUCT *pBNS,
720 int bClearEdge );
721
722int nTautEndpointEdgeCap( inp_ATOM *at, VAL_AT *pVA, int i );
723
724/*
725int GetAtomBondFlow( inp_ATOM *atom, VAL_AT *pVA, ICHICONST SRM *pSrm, int iat, int ineigh );
726void GetAtomStCapFlow( inp_ATOM *atom, VAL_AT *pVA, ICHICONST SRM *pSrm, int iat, int *pCap, int *pFlow );
727int GetAtomToMCGroupInitEdgeCapFlow( EdgeFlow *nEdgeCap, EdgeFlow *nEdgeFlow, ICHICONST SRM *pSrm, inp_ATOM *at, VAL_AT *pVA, int iat );
728void GetAtomToMetalInitEdgeCapFlow( EdgeFlow *nEdgeCap, EdgeFlow *nEdgeFlow );
729*/
730
731int AtomStcapStflow( inp_ATOM *atom,
732 VAL_AT *pVA,
733 ICHICONST SRM *pSrm,
734 int iat,
735 int *pnStcap,
736 int *pnStflow,
737 EdgeFlow *pnMGroupEdgeCap,
738 EdgeFlow *pnMGroupEdgeFlow );
739
741 VAL_AT *pVA,
742 ICHICONST SRM *pSrm,
743 int iat,
744 int ineigh,
745 int *pnMaxcap,
746 int *pnMinorder,
747 int *pbNeedsFlower );
748
749
750int clean_charge_val( struct tagCANON_GLOBALS *pCG,
751 CHARGE_VAL *pChargeVal, int len,
752 inp_ATOM *atom, VAL_AT *pVA, int iat,
753 int bIsMetal, int bMobileH, AT_NUMB *endpoint );
754
755int ReallocTCGroups( ALL_TC_GROUPS *pTCGroups, int nAdd );
756int RegisterTCGroup( ALL_TC_GROUPS *pTCGroups, int nGroupType, int nGroupOrdNum,
757 int nVertexCap, int nVertexFlow, int nEdgeCap, int nEdgeFlow, int nNumEdges );
758int CopyBnsToAtom( StrFromINChI *pStruct, BN_STRUCT *pBNS, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
759 int bAllowZeroBondOrder );
760int CheckBnsConsistency( StrFromINChI *pStruct, BN_STRUCT *pBNS, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int bNoRad );
761
762int RunBnsRestore1( struct tagCANON_GLOBALS *pCG,
763 struct tagINCHI_CLOCK *ic, ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, BN_STRUCT *pBNS,
764 BN_DATA *pBD, StrFromINChI *pStruct,
765 VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, INChI *pInChI[], long num_inp, int bHasSomeFixedH );
766
767int RunBnsRestoreOnce( BN_STRUCT *pBNS, BN_DATA *pBD, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups );
768int nNumEdgesToCnVertex( MY_CONST C_NODE *pCN, int len, int v );
769int ConnectMetalFlower( int *pcur_num_vertices, int *pcur_num_edges,
770 int *tot_st_cap, int *tot_st_flow, ICHICONST SRM *pSrm,
771 BN_STRUCT *pBNS, ALL_TC_GROUPS *pTCGroups );
772int AddRadicalToMetal( int *tot_st_cap, int *tot_st_flow, ICHICONST SRM *pSrm, BN_STRUCT *pBNS,
773 ALL_TC_GROUPS *pTCGroups );
774int bMayBeACationInMobileHLayer( inp_ATOM *at, VAL_AT *pVA, int iat, int bMobileH );
775
777 STRUCT_DATA *sd, StrFromINChI *pStruct, inp_ATOM *at2, inp_ATOM *at3,
778 ALL_TC_GROUPS *pTCGroups );
779void IncrZeroBondsAndClearEndpts( inp_ATOM *at, int num_at, int iComponent );
780void IncrZeroBonds( inp_ATOM *at, int num_at, int iComponent );
781void ClearEndpts( inp_ATOM *at, int num_at );
782int DisplayRestoredComponent( struct tagCANON_GLOBALS *pCG, StrFromINChI *pStruct, int iComponent, int iAtNoOffset,
783 INChI *pInChI, const char *szCurHdr );
784int cmp_charge_val( const void *a1, const void *a2, void * );
785
786int EvaluateChargeChanges( BN_STRUCT *pBNS, VAL_AT *pVA, int *pnDeltaH, int *pnDeltaCharge, int *pnNumVisitedAtoms );
787int RunBnsTestOnce( BN_STRUCT *pBNS, BN_DATA *pBD, VAL_AT *pVA, Vertex *pvFirst, Vertex *pvLast,
788 int *pPathLen, int *pnDeltaH, int *pnDeltaCharge, int *pnNumVisitedAtoms );
789int comp_cc_cand( const void *a1, const void *a2 );
790int MoveRadToAtomsAddCharges( BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct,
791 inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int forbidden_mask );
792void RemoveForbiddenBondFlowBits( BN_STRUCT *pBNS, int forbidden_edge_mask_int );
793
795 inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
796 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
797
798int AdjustTgroupsToForbiddenEdges2( BN_STRUCT *pBNS, inp_ATOM *at, VAL_AT *pVA, int num_atoms, int forbidden_mask );
799int AllocEdgeList( EDGE_LIST *pEdges, int nLen );
800int AddToEdgeList( EDGE_LIST *pEdges, int iedge, int nAddLen );
801int RemoveFromEdgeListByIndex( EDGE_LIST *pEdges, int index );
802int RemoveFromEdgeListByValue( EDGE_LIST *pEdges, int iedge );
803int FindInEdgeList( EDGE_LIST *pEdges, int iedge );
804int AllocBfsQueue( BFS_Q *pQ, int num_at, int min_ring_size );
805void RemoveForbiddenEdgeMask( BN_STRUCT *pBNS, EDGE_LIST *pEdges, int forbidden_edge_mask );
806void SetForbiddenEdgeMask( BN_STRUCT *pBNS, EDGE_LIST *pEdges, int forbidden_edge_mask );
807int ForbidCarbonChargeEdges( BN_STRUCT *pBNS, ALL_TC_GROUPS *pTCGroups, EDGE_LIST *pCarbonChargeEdges,
808 int forbidden_edge_mask );
809int ForbidMetalCarbonEdges( BN_STRUCT *pBNS, inp_ATOM *at, int num_at, VAL_AT *pVA,
810 ALL_TC_GROUPS *pTCGroups, EDGE_LIST *pMetalCarbonEdges, int forbidden_edge_mask );
812 VAL_AT *pVA, int min_ring_size, ALL_TC_GROUPS *pTCGroups,
813 EDGE_LIST *pNplus2BondsEdges, int forbidden_edge_mask );
815 ALL_TC_GROUPS *pTCGroups, int forbidden_edge_mask );
817 inp_ATOM *at, inp_ATOM *at2,
818 VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
819 int *pnNumRunBNS, int *pnTotalDelta,
820 int forbidden_edge_mask );
822 inp_ATOM *at, inp_ATOM *at2,
823 VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
824 int *pnNumRunBNS, int *pnTotalDelta,
825 int forbidden_edge_mask );
827 inp_ATOM *at, inp_ATOM *at2,
828 VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
829 int *pnNumRunBNS, int *pnTotalDelta,
830 int forbidden_edge_mask, int forbidden_stereo_edge_mask );
832 inp_ATOM *at, inp_ATOM *at2,
833 VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
834 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
835int RestoreCyanoGroup( BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct,
836 inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
837 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
838int RestoreIsoCyanoGroup( BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct,
839 inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
840 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
841int RestoreNNNgroup( BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct,
842 inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
843 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
844int FixMetal_Nminus_Ominus( BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct,
845 inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
846 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
848 inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
849 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
850int Convert_SIV_to_SVI( BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct,
851 inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
852 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
854 inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
855 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
857 inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
858 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
860 inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
861 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
863 inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
864 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
865int CheckAndRefixStereobonds( BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct,
866 inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
867 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
869 inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
870 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
872 inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
873 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
874int SaltBondsToCoordBonds( BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct,
875 inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
876 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
877int FixLessHydrogenInFormula( BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at,
878 inp_ATOM *at2, inp_ATOM *atf, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
879 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
880int FixMoreHydrogenInFormula( BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at,
881 inp_ATOM *at2, inp_ATOM *atf, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
882 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
884 inp_ATOM *at2, inp_ATOM *atf, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, ICR *picr,
885 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
886int ConnectDisconnectedH( inp_ATOM *at, int num_atoms, int num_deleted_H );
887int DisconnectedConnectedH( inp_ATOM *at, int num_atoms, int num_deleted_H );
888
890 STRUCT_DATA *sd_inp, StrFromINChI *pStruct,
891 int iComponent, int iAtNoOffset, long num_inp );
892
893int GetChargeFlowerUpperEdge( BN_STRUCT *pBNS, VAL_AT *pVA, int nChargeEdge );
894int get_pVA_atom_type( VAL_AT *pVA, inp_ATOM *at, int iat, int bond_type );
895
897 STRUCT_DATA *sd, BN_STRUCT *pBNS, BN_DATA *pBD,
898 StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, inp_ATOM *at3, VAL_AT *pVA,
899 ALL_TC_GROUPS *pTCGroups, INChI *pInChI[], long num_inp, int bHasSomeFixedH,
900 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask, int forbidden_stereo_edge_mask );
901
902/* call InChI normalization only */
904 StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2,
905 VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
906 inp_ATOM *at_norm, inp_ATOM *at_fixed_bonds_out, T_GROUP_INFO *t_group_info );
907/* create one InChI */
909 STRUCT_DATA *sd, BN_STRUCT *pBNS, StrFromINChI *pStruct,
910 inp_ATOM *at, inp_ATOM *at2, inp_ATOM *at3, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
911 T_GROUP_INFO **t_group_info, inp_ATOM **at_norm, inp_ATOM **at_prep );
912
913/* fixed-H */
915int FillOutExtraFixedHDataInChI( StrFromINChI *pStruct, INChI *pInChI[] );
916
918 struct tagINCHI_CLOCK *ic,
920 STRUCT_DATA *sd,
921 BN_STRUCT *pBNS, BN_DATA *pBD,
922 StrFromINChI *pStruct,
923 inp_ATOM *at, inp_ATOM *at2, inp_ATOM *at3,
924 VAL_AT *pVA,
925 ALL_TC_GROUPS *pTCGroups, T_GROUP_INFO **ti,
926 inp_ATOM **at_norm, inp_ATOM **at_prep,
927 INChI *pInChI[], long num_inp,
928 int bHasSomeFixedH, int *pnNumRunBNS,
929 int *pnTotalDelta,
930 int forbidden_edge_mask,
931 int forbidden_stereo_edge_mask );
932
934 inp_ATOM *at2, inp_ATOM *atf, inp_ATOM *atn, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups,
935 ICR *picr,
936 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask );
937int FillOutCMP2FHINCHI( StrFromINChI *pStruct, inp_ATOM *at2, VAL_AT *pVA, INChI *pInChI[], CMP2FHINCHI *pc2i );
938int FillOutCMP2MHINCHI( StrFromINChI *pStruct, ALL_TC_GROUPS *pTCGroups, inp_ATOM *at2,
939 VAL_AT *pVA, INChI *pInChI[], CMP2MHINCHI *pc2i );
940
941int bHas_N_V( inp_ATOM *at2, int num_atoms );
942
943int GetPlusMinusVertex( BN_STRUCT *pBNS, ALL_TC_GROUPS *pTCGroups, int bCheckForbiddenPlus, int bCheckForbiddenMinus );
944
946 struct tagINCHI_CLOCK *ic,
948 STRUCT_DATA *sd,
949 BN_STRUCT *pBNS,
950 BN_DATA *pBD,
951 StrFromINChI *pStruct,
952 inp_ATOM *at,
953 inp_ATOM *at2,
954 inp_ATOM *at3,
955 VAL_AT *pVA,
956 ALL_TC_GROUPS *pTCGroups,
957 T_GROUP_INFO **ppt_group_info,
958 inp_ATOM **ppat_norm,
959 inp_ATOM **ppat_prep,
960 INChI *pInChI[],
961 long num_inp,
962 int bHasSomeFixedH,
963 int *pnNumRunBNS,
964 int *pnTotalDelta,
965 int forbidden_edge_mask,
966 int forbidden_stereo_edge_mask );
967
968int FixRestoredStructureStereo( struct tagCANON_GLOBALS *pCG, struct tagINCHI_CLOCK *ic, INCHI_MODE cmpInChI, ICR *icr,
969 INCHI_MODE cmpInChI2, ICR *icr2,
970 ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, BN_STRUCT *pBNS, BN_DATA *pBD,
971 StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, inp_ATOM *at3, VAL_AT *pVA,
972 ALL_TC_GROUPS *pTCGroups, T_GROUP_INFO **ppt_group_info, inp_ATOM **ppat_norm,
973 inp_ATOM **ppat_prep, INChI *pInChI[], long num_inp,
974 int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask,
975 int forbidden_stereo_edge_mask );
976
978 STRUCT_DATA *sd, long num_inp,
979 int bHasSomeFixedH,
980 StrFromINChI *pStruct, int num_components,
981 StrFromINChI *pStructR, int num_componentsR,
982 NUM_H *pProtonBalance, int *recmet_change_balance );
984 STRUCT_DATA *sd, long num_inp, char *szCurHdr,
985 ICHICONST SRM *pSrm, int bReqNonTaut, StrFromINChI *pStruct[INCHI_NUM][TAUT_NUM],
986 InpInChI *pOneInput );
988 struct tagCANON_GLOBALS *pCG,
990 long num_inp, int bHasSomeFixedH,
991 char *szCurHdr,
993 InpInChI *pOneInput );
994int InChI2Atom( struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *pCG,
996 const char *szCurHdr, long num_inp,
997 StrFromINChI *pStruct, int iComponent,
998 int iAtNoOffset, int bI2A_Flag, int bHasSomeFixedH,
999 InpInChI *pOneInput );
1000
1001
1003void RemoveFixHInChIIdentical2MobH( InpInChI *pOneInput );
1004void SetUpSrm( SRM *pSrm );
1006void FreeStrFromINChI( StrFromINChI *pStruct[INCHI_NUM][TAUT_NUM], int nNumComponents[INCHI_NUM][TAUT_NUM] );
1008 int iComponent, long num_inp, char *szCurHdr );
1009int CompareOneOrigInchiToRevInChI( StrFromINChI *pStruct, INChI *pInChI[TAUT_NUM], int bMobileH, int iComponent,
1010 long num_inp, char *szCurHdr,
1011 COMPONENT_REM_PROTONS *nCurRemovedProtons, INCHI_MODE CompareInchiFlags[] );
1012int CompareTwoPairsOfInChI( INChI *pInChI1[TAUT_NUM], INChI *pInChI2[TAUT_NUM],
1013 int bMobileH, INCHI_MODE CompareInchiFlags[] );
1014INCHI_MODE CompareReversedINChI3( INChI *i1 /* InChI from reversed struct */, INChI *i2 /* input InChI */,
1015 INChI_Aux *a1, INChI_Aux *a2, int *err );
1016INCHI_MODE CompareReversedStereoINChI3( INChI_Stereo *s1/* InChI from reversed struct */,
1017 INChI_Stereo *s2 /* input InChI */, ICR *picr );
1018int CompareAllOrigInchiToRevInChI( StrFromINChI *pStruct[INCHI_NUM][TAUT_NUM], InpInChI *pOneInput, int bReqNonTaut,
1019 long num_inp, char *szCurHdr );
1021 InpInChI *pOneInput, int bHasSomeFixedH,
1022 long num_inp, char *szCurHdr );
1023int insertions_sort_AT_NUMB( AT_NUMB *base, int num );
1024
1026 struct tagCANON_GLOBALS *pCG,
1028 long num_inp, int bHasSomeFixedH,
1029 StrFromINChI *pStruct, int num_components,
1030 StrFromINChI *pStructR, int num_componentsR,
1031 NUM_H pProtonBalance[],
1032 NUM_H recmet_change_balance[] );
1033
1035 struct tagCANON_GLOBALS *pCG,
1036 ICHICONST INPUT_PARMS *ip_inp,
1037 STRUCT_DATA *sd_inp,
1038 long num_inp, int bINChIOutputOptions,
1039 INCHI_IOSTREAM *pout, INCHI_IOSTREAM *plog,
1040 InpInChI *pOneInput, int bHasSomeFixedH,
1041 unsigned char save_opt_bits );
1042
1043int MergeStructureComponents( ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, long num_inp, char *szCurHdr,
1044 ICHICONST SRM *pSrm, int bReqNonTaut, StrFromINChI *pStruct[INCHI_NUM][TAUT_NUM],
1045 InpInChI *pOneInput );
1046int AddOneMsg( char *szMsg, int used_len, int tot_len, const char *szAddMsg, const char *szDelim );
1047int FillOutCompareMessage( char *szMsg, int nLenMsg, INCHI_MODE bits[] );
1049int bInpInchiComponentExists( InpInChI *pOneInput, int iINCHI, int bMobileH, int k );
1050int bInpInchiComponentDeleted( InpInChI *pOneInput, int iInChI, int bMobileH, int k );
1051int bRevInchiComponentExists( StrFromINChI *pStruct, int iInChI, int bMobileH, int k );
1052int bRevInchiComponentDeleted( StrFromINChI *pStruct, int iInChI, int bMobileH, int k );
1053int DetectInpInchiCreationOptions( InpInChI *pOneInput, int *bHasReconnected, int *bHasMetal,
1054 int *bHasFixedH, int *sFlag, int *bTautFlag );
1055
1058 long num_inp, char *szCurHdr,
1059 ICHICONST SRM *pSrm,
1060 int bReqNonTaut,
1061 StrFromINChI *pStruct[INCHI_NUM][TAUT_NUM],
1062 InpInChI *pOneInput );
1064 StrFromINChI *pStruct, inp_ATOM *at,
1065 int iComponent, int nNumComponents, int bMobileH,
1066 const char *szCurHdr );
1068 inp_ATOM *at, int num_at, const char *szCurHdr );
1069
1070int CountStereoTypes( INChI *pInChI, int *num_known_SB, int *num_known_SC,
1071 int *num_unk_und_SB, int *num_unk_und_SC,
1072 int *num_SC_PIII, int *num_SC_AsIII );
1073int GetNumNeighborsFromInchi( INChI *pInChI, AT_NUMB nAtNumber );
1074int bIsUnsatCarbonInASmallRing( inp_ATOM *at, VAL_AT *pVA, int iat, BFS_Q *pbfsq, int min_ring_size );
1075
1076int MakeProtonComponent( StrFromINChI *pStruct, int iComponent, int num_prot );
1077
1078void FreeInpInChI( InpInChI *pOneInput );
1079
1080
1081/* extra configurarion */
1082#define KEEP_METAL_EDGE_FLOW 0 /* counterexample: mdb0-1738.sdf.txt */
1083#define MOVE_CHARGES_FROM_HETEREO_TO_METAL 0 /* disabled */
1084#define FIX_ADD_PROTON_FOR_ADP 0 /* not used */
1085
1086#ifndef COMPILE_ALL_CPP
1087#ifdef __cplusplus
1088}
1089#endif
1090#endif
1091
1092
1093#endif /* _ICHIRVRS_H_ */
INChI * PINChI2[TAUT_NUM]
Definition ichi.h:224
INChI_Aux * PINChI_Aux2[TAUT_NUM]
Definition ichi.h:267
int EdgeIndex
Definition ichi_bns.h:32
int EdgeFlow
Definition ichi_bns.h:35
int Vertex
Definition ichi_bns.h:31
#define MY_CONST
Definition ichirvrs.h:268
int RestoreAtomConnectionsSetStereo(StrFromINChI *pStruct, int iComponent, int iAtNoOffset, INChI *pInChI, INChI *pInChIMobH)
Definition ichirvr2.c:71
int EliminateChargeSeparationOnHeteroatoms(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask, int forbidden_stereo_edge_mask)
Definition ichirvr2.c:3849
struct tagChargeNodeList CN_LIST
int bIsUnsatCarbonInASmallRing(inp_ATOM *at, VAL_AT *pVA, int iat, BFS_Q *pbfsq, int min_ring_size)
Definition ichirvr5.c:57
int MoveChargeToRemoveCenerpoints(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr4.c:1825
int ConnectDisconnectedH(inp_ATOM *at, int num_atoms, int num_deleted_H)
Definition ichirvr1.c:5446
struct tagAtomsCmpTwoFixedH CMP2FHATOMS
struct tagBfsQueue BFS_Q
int AddCGroups2TCGBnStruct(BN_STRUCT *pBNS, StrFromINChI *pStruct, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int nMaxAddEdges)
Definition ichirvr1.c:3214
int AdjustTgroupsToForbiddenEdges2(BN_STRUCT *pBNS, inp_ATOM *at, VAL_AT *pVA, int num_atoms, int forbidden_mask)
Definition ichirvr2.c:2099
int bRevInchiComponentDeleted(StrFromINChI *pStruct, int iInChI, int bMobileH, int k)
Definition ichiread.c:1824
int AddEdgeFlow(int edge_cap, int edge_flow, BNS_EDGE *e01, BNS_VERTEX *pv0, BNS_VERTEX *pv1, int *tot_st_cap, int *tot_st_flow)
Definition ichirvr1.c:2888
int OldPrintCompareOneOrigInchiToRevInChI(StrFromINChI *pStruct, INChI *pInChI[TAUT_NUM], int bMobileH, int iComponent, long num_inp, char *szCurHdr)
#define MAX_CN_VAL
Definition ichirvrs.h:397
int RestoreIsoCyanoGroup(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr2.c:4628
struct tagXYZCoord XYZ_COORD
struct tagReversedInChI REV_INCHI
struct tagVertCapFlow VCF
int set_cumulene_0D_parity(inp_ATOM *at, inp_ATOM_STEREO *st, int num_at, int idelH1, int i1, int i2, int idelH2, int parity, int len)
Definition ichirvr2.c:1604
void RemoveForbiddenBondFlowBits(BN_STRUCT *pBNS, int forbidden_edge_mask_int)
Definition ichirvr1.c:4856
struct tagStructCmpTwoMobileH CMP2MHINCHI
int EliminateNitrogen5Val3Bonds(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr2.c:5775
int IncrementZeroOrderBondsToHeteroat(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr2.c:3485
struct tagAtomIonPrperies VAL_AT
void SetUpSrm(SRM *pSrm)
Definition ichirvr7.c:329
struct tagAtomsCmpTwoMobileH CMP2MHATOMS
int RestoreAtomMakeBNS(struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *pCG, ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, StrFromINChI *pStruct, int iComponent, int iAtNoOffset, INChI *pInChI[], const char *szCurHdr, long num_inp, int bHasSomeFixedH)
Definition ichirvr4.c:3163
int RegisterTCGroup(ALL_TC_GROUPS *pTCGroups, int nGroupType, int nGroupOrdNum, int nVertexCap, int nVertexFlow, int nEdgeCap, int nEdgeFlow, int nNumEdges)
Definition ichirvr1.c:1492
int nNumEdgesToCnVertex(MY_CONST C_NODE *pCN, int len, int v)
Definition ichirvr1.c:3789
struct tagInpAtomAddParities inp_ATOM_STEREO
int FillOutCMP2MHINCHI(StrFromINChI *pStruct, ALL_TC_GROUPS *pTCGroups, inp_ATOM *at2, VAL_AT *pVA, INChI *pInChI[], CMP2MHINCHI *pc2i)
Definition ichirvr4.c:986
INCHI_MODE CompareReversedStereoINChI3(INChI_Stereo *s1, INChI_Stereo *s2, ICR *picr)
Definition ichirvr7.c:2327
void FreeInpInChI(InpInChI *pOneInput)
Definition ichirvr7.c:1403
int MakeOneInChIOutOfStrFromINChI(struct tagCANON_GLOBALS *pCG, struct tagINCHI_CLOCK *ic, ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, StrFromINChI *pStruct, inp_ATOM *at2, inp_ATOM *at3, ALL_TC_GROUPS *pTCGroups)
Definition ichirvr1.c:5133
int AddTGroups2TCGBnStruct(BN_STRUCT *pBNS, StrFromINChI *pStruct, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int nMaxAddEdges)
Definition ichirvr1.c:2390
int FixMetal_Nminus_Ominus(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr2.c:4930
struct tagChargeNodes C_NODE
int CompareOneOrigInchiToRevInChI(StrFromINChI *pStruct, INChI *pInChI[TAUT_NUM], int bMobileH, int iComponent, long num_inp, char *szCurHdr, COMPONENT_REM_PROTONS *nCurRemovedProtons, INCHI_MODE CompareInchiFlags[])
Definition ichirvr7.c:2205
struct tagTCGroup TC_GROUP
int FillOutExtraFixedHDataInChI(StrFromINChI *pStruct, INChI *pInChI[])
Definition ichirvr4.c:796
BN_STRUCT * AllocateAndInitTCGBnStruct(StrFromINChI *pStruct, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int nMaxAddAtoms, int nMaxAddEdges, int max_altp, int *pNum_changed_bonds)
Definition ichirvr1.c:3844
int NormalizeStructure(ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, BN_STRUCT *pBNS, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, inp_ATOM *at_norm, inp_ATOM *at_fixed_bonds_out, T_GROUP_INFO *t_group_info)
int AllocBfsQueue(BFS_Q *pQ, int num_at, int min_ring_size)
Definition ichirvr1.c:4780
int bHas_N_V(inp_ATOM *at2, int num_atoms)
Definition ichirvr3.c:57
int FixMobileHRestoredStructure(struct tagCANON_GLOBALS *pCG, struct tagINCHI_CLOCK *ic, ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, inp_ATOM *at3, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, T_GROUP_INFO **ppt_group_info, inp_ATOM **ppat_norm, inp_ATOM **ppat_prep, INChI *pInChI[], long num_inp, int bHasSomeFixedH, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask, int forbidden_stereo_edge_mask)
Definition ichirvr5.c:106
int ReallocTCGroups(ALL_TC_GROUPS *pTCGroups, int nAdd)
Definition ichirvr1.c:1467
int SaltBondsToCoordBonds(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr4.c:2338
int CheckBnsConsistency(StrFromINChI *pStruct, BN_STRUCT *pBNS, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int bNoRad)
Definition ichirvr2.c:1120
void CopySt2At(inp_ATOM *at, inp_ATOM_STEREO *st, int num_atoms)
Definition ichirvr2.c:44
struct tagStructRestoreMode SRM
int insertions_sort_AT_NUMB(AT_NUMB *base, int num)
Definition ichiread.c:10512
void SetForbiddenEdgeMask(BN_STRUCT *pBNS, EDGE_LIST *pEdges, int forbidden_edge_mask)
Definition ichirvr1.c:4845
int RestoreNNNgroup(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr2.c:5080
void AddStCapFlow(BNS_VERTEX *vert_ficpoint, int *tot_st_flow, int *tot_st_cap, int cap, int flow)
Definition ichirvr1.c:3183
int PlusFromDB_N_DB_O_to_Metal(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr2.c:6235
struct tagChargeValence CHARGE_VAL
int GetPlusMinusVertex(BN_STRUCT *pBNS, ALL_TC_GROUPS *pTCGroups, int bCheckForbiddenPlus, int bCheckForbiddenMinus)
Definition ichirvr5.c:23
INCHI_MODE CompareReversedINChI3(INChI *i1, INChI *i2, INChI_Aux *a1, INChI_Aux *a2, int *err)
Definition ichirvr7.c:2609
tagTCGroupTypes
Definition ichirvrs.h:184
@ TCG_Minus_C0
Definition ichirvrs.h:193
@ TCG_Plus_M0
Definition ichirvrs.h:195
@ TCG_Plus_C1
Definition ichirvrs.h:192
@ TCG_Minus0
Definition ichirvrs.h:189
@ TCG_Plus_C0
Definition ichirvrs.h:191
@ TCG_Minus_C1
Definition ichirvrs.h:194
@ TCG_Minus1
Definition ichirvrs.h:190
@ TCG_Plus_M1
Definition ichirvrs.h:196
@ TCG_MeFlower1
Definition ichirvrs.h:200
@ TCG_MeFlower0
Definition ichirvrs.h:199
@ TCG_Plus1
Definition ichirvrs.h:188
@ TCG_Plus
Definition ichirvrs.h:204
@ TCG_Plus0
Definition ichirvrs.h:187
@ TCG_Minus
Definition ichirvrs.h:205
@ NUM_TCGROUP_TYPES
Definition ichirvrs.h:207
@ TCG_None
Definition ichirvrs.h:185
@ TCG_Minus_M0
Definition ichirvrs.h:197
@ TCG_Minus_M1
Definition ichirvrs.h:198
@ TCG_MeFlower3
Definition ichirvrs.h:202
@ TCG_MeFlower2
Definition ichirvrs.h:201
int RunBnsTestOnce(BN_STRUCT *pBNS, BN_DATA *pBD, VAL_AT *pVA, Vertex *pvFirst, Vertex *pvLast, int *pPathLen, int *pnDeltaH, int *pnDeltaCharge, int *pnNumVisitedAtoms)
Definition ichirvr1.c:4472
int AddRemProtonsInRestrStruct(struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *pCG, ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, long num_inp, int bHasSomeFixedH, StrFromINChI *pStruct, int num_components, StrFromINChI *pStructR, int num_componentsR, NUM_H *pProtonBalance, int *recmet_change_balance)
Definition ichirvr4.c:3580
int ForbidCarbonChargeEdges(BN_STRUCT *pBNS, ALL_TC_GROUPS *pTCGroups, EDGE_LIST *pCarbonChargeEdges, int forbidden_edge_mask)
Definition ichirvr4.c:22
int ConnectMetalFlower(int *pcur_num_vertices, int *pcur_num_edges, int *tot_st_cap, int *tot_st_flow, ICHICONST SRM *pSrm, BN_STRUCT *pBNS, ALL_TC_GROUPS *pTCGroups)
Definition ichirvr1.c:2708
void FreeStrFromINChI(StrFromINChI *pStruct[INCHI_NUM][TAUT_NUM], int nNumComponents[INCHI_NUM][TAUT_NUM])
Definition ichirvr7.c:1318
void SetStCapFlow(BNS_VERTEX *vert_ficpoint, int *tot_st_flow, int *tot_st_cap, int cap, int flow)
Definition ichirvr1.c:3196
struct tagStructCmpTwoFixedH CMP2FHINCHI
int RemoveRadFromMobileHEndpointFixH(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr2.c:6928
int AddOneMsg(char *szMsg, int used_len, int tot_len, const char *szAddMsg, const char *szDelim)
Definition ichirvr7.c:3103
int RunBnsRestoreOnce(BN_STRUCT *pBNS, BN_DATA *pBD, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups)
Definition ichirvr1.c:4511
int SetStereoBondTypesFrom0DStereo(StrFromINChI *pStruct, INChI *pInChI)
Definition ichirvr2.c:809
void CopyAt2St(inp_ATOM *at, inp_ATOM_STEREO *st, int num_atoms)
Definition ichirvr2.c:22
int MarkDisconectedIdenticalToReconnected(InpInChI *pOneInput)
Definition ichirvr7.c:248
int AtomStcapStflow(inp_ATOM *atom, VAL_AT *pVA, ICHICONST SRM *pSrm, int iat, int *pnStcap, int *pnStflow, EdgeFlow *pnMGroupEdgeCap, EdgeFlow *pnMGroupEdgeFlow)
Definition ichirvr1.c:1755
int get_pVA_atom_type(VAL_AT *pVA, inp_ATOM *at, int iat, int bond_type)
Definition ichirvr1.c:4593
int set_atom_0D_parity(inp_ATOM *at, inp_ATOM_STEREO *st, int num_at, int num_deleted_H, int i1, int parity)
Definition ichirvr2.c:1738
void FreeInputInChI2Struct(InpInChI *pOneInput)
int FixRemoveExtraTautEndpoints(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, inp_ATOM *atf, inp_ATOM *atn, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, ICR *picr, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr4.c:554
int NormalizeAndCompare(struct tagCANON_GLOBALS *pCG, struct tagINCHI_CLOCK *ic, ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, inp_ATOM *at3, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, INChI *pInChI[], long num_inp, int bHasSomeFixedH, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask, int forbidden_stereo_edge_mask)
Definition ichirvr4.c:1239
int CompareAllDisconnectedOrigInchiToRevInChI(StrFromINChI *pStruct[INCHI_NUM][TAUT_NUM], InpInChI *pOneInput, int bHasSomeFixedH, long num_inp, char *szCurHdr)
Definition ichirvr7.c:1648
int cmp_charge_val(const void *a1, const void *a2, void *)
Definition ichirvr1.c:697
int GetNumNeighborsFromInchi(INChI *pInChI, AT_NUMB nAtNumber)
Definition ichiread.c:1611
void RemoveForbiddenEdgeMask(BN_STRUCT *pBNS, EDGE_LIST *pEdges, int forbidden_edge_mask)
Definition ichirvr1.c:4834
tagTgRestoreFlags
Definition ichirvrs.h:160
@ TGRF_MINUS_FIRST
Definition ichirvrs.h:161
int AddExplicitDeletedH(inp_ATOM *at, int jv, int num_at, int *iDeletedH, int *iH, int nNumDeletedH, int bTwoStereo)
Definition ichirvr2.c:1435
void IncrZeroBonds(inp_ATOM *at, int num_at, int iComponent)
Definition ichirvr1.c:4137
struct tagEdgeList EDGE_LIST
void clear_t_group_info(T_GROUP_INFO *ti)
Definition ichirvr1.c:474
int Convert_SIV_to_SVI(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr2.c:6019
int RunBnsRestore1(struct tagCANON_GLOBALS *pCG, struct tagINCHI_CLOCK *ic, ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, INChI *pInChI[], long num_inp, int bHasSomeFixedH)
Definition ichirvr4.c:2705
int OneInChI2Atom(struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *pCG, ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, const char *szCurHdr, long num_inp, StrFromINChI *pStruct, int iComponent, int iAtNoOffset, int bHasSomeFixedH, INChI *pInChI[])
Definition ichirvr4.c:3442
int ForbidMetalCarbonEdges(BN_STRUCT *pBNS, inp_ATOM *at, int num_at, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, EDGE_LIST *pMetalCarbonEdges, int forbidden_edge_mask)
int MakeProtonComponent(StrFromINChI *pStruct, int iComponent, int num_prot)
Definition ichirvr4.c:3539
int RestoreCyanoGroup(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr2.c:4519
int RemoveRadFromMobileHEndpoint(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr2.c:6490
int RemoveFromEdgeListByIndex(EDGE_LIST *pEdges, int index)
Definition ichirvr1.c:4724
int comp_cc_cand(const void *a1, const void *a2)
Definition ichirvr1.c:4549
int nAddSuperCGroups(ALL_TC_GROUPS *pTCGroups)
Definition ichirvr1.c:2244
int MoveChargeToMakeCenerpoints(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr2.c:7623
struct tagRemovedAndExchangeableH REM_PROTONS
int AllocEdgeList(EDGE_LIST *pEdges, int nLen)
Definition ichirvr1.c:4655
int GetChargeFlowerUpperEdge(BN_STRUCT *pBNS, VAL_AT *pVA, int nChargeEdge)
Definition ichirvr1.c:4880
int DisplayStructureComponents(struct tagCANON_GLOBALS *pCG, ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, long num_inp, char *szCurHdr, ICHICONST SRM *pSrm, int bReqNonTaut, StrFromINChI *pStruct[INCHI_NUM][TAUT_NUM], InpInChI *pOneInput)
int AddRemIsoProtonsInRestrStruct(struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *pCG, ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, long num_inp, int bHasSomeFixedH, StrFromINChI *pStruct, int num_components, StrFromINChI *pStructR, int num_componentsR, NUM_H pProtonBalance[], NUM_H recmet_change_balance[])
Definition ichirvr4.c:3781
int AddToEdgeList(EDGE_LIST *pEdges, int iedge, int nAddLen)
Definition ichirvr1.c:4703
MY_CONST CN_LIST cnList[]
Definition ichirvr1.c:446
int DetectInpInchiCreationOptions(InpInChI *pOneInput, int *bHasReconnected, int *bHasMetal, int *bHasFixedH, int *sFlag, int *bTautFlag)
Definition ichiread.c:1845
int MoveMobileHToAvoidFixedBonds(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr2.c:6411
int DisplayRestoredComponent(struct tagCANON_GLOBALS *pCG, StrFromINChI *pStruct, int iComponent, int iAtNoOffset, INChI *pInChI, const char *szCurHdr)
struct tagAllTCGroups ALL_TC_GROUPS
int CompareAllOrigInchiToRevInChI(StrFromINChI *pStruct[INCHI_NUM][TAUT_NUM], InpInChI *pOneInput, int bReqNonTaut, long num_inp, char *szCurHdr)
Definition ichirvr7.c:1513
int FixLessHydrogenInFormula(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, inp_ATOM *atf, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr4.c:142
struct tagChargeChangeCandidate CC_CAND
int clean_charge_val(struct tagCANON_GLOBALS *pCG, CHARGE_VAL *pChargeVal, int len, inp_ATOM *atom, VAL_AT *pVA, int iat, int bIsMetal, int bMobileH, AT_NUMB *endpoint)
Definition ichirvr1.c:757
enum tagTgRestoreFlags TGRF
int get_bonds_valences(int nPeriodicNum, int bonds_valence, int num_H, VAL_AT *pVA)
#define MAX_DIFF_FIXH
Definition ichirvrs.h:456
int FillOutExtraFixedHDataRestr(StrFromINChI *pStruct)
Definition ichirvr4.c:719
int FillOutCMP2FHINCHI(StrFromINChI *pStruct, inp_ATOM *at2, VAL_AT *pVA, INChI *pInChI[], CMP2FHINCHI *pc2i)
Definition ichirvr4.c:835
int CountStereoTypes(INChI *pInChI, int *num_known_SB, int *num_known_SC, int *num_unk_und_SB, int *num_unk_und_SC, int *num_SC_PIII, int *num_SC_AsIII)
Definition ichiread.c:1688
int MoveChargeFromHeteroatomsToMetals(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
int FillOutpStructEndpointFromInChI(INChI *pInChI, AT_NUMB **pEndpoint)
Definition ichirvr1.c:657
int RemoveFromEdgeListByValue(EDGE_LIST *pEdges, int iedge)
Definition ichirvr1.c:4759
int bFindCumuleneChain(inp_ATOM *at, AT_NUMB i1, AT_NUMB i2, AT_NUMB nCumulene[], int nMaxLen)
Definition ichirvr2.c:1530
int MakeSingleBondsMetal2ChargedHeteroat(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr4.c:2159
int DisplayAllRestoredComponents(struct tagCANON_GLOBALS *pCG, inp_ATOM *at, int num_at, const char *szCurHdr)
int bRevInchiComponentExists(StrFromINChI *pStruct, int iInChI, int bMobileH, int k)
Definition ichiread.c:1803
void SetEdgeCapFlow(BNS_EDGE *e, int edge_cap, int edge_flow)
Definition ichirvr1.c:2876
int FindInEdgeList(EDGE_LIST *pEdges, int iedge)
Definition ichirvr1.c:4742
int MakeInChIOutOfStrFromINChI2(struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *pCG, ICHICONST INPUT_PARMS *ip_inp, STRUCT_DATA *sd_inp, StrFromINChI *pStruct, int iComponent, int iAtNoOffset, long num_inp)
Definition ichirvr1.c:5635
struct tagInputInChI InpInChI
void ClearEndpts(inp_ATOM *at, int num_at)
Definition ichirvr1.c:4156
struct tagOneComponentRemovedAndExchangeableH COMPONENT_REM_PROTONS
int nTautEndpointEdgeCap(inp_ATOM *at, VAL_AT *pVA, int i)
Definition ichirvr1.c:1539
int ConnectTwoVertices(BNS_VERTEX *p1, BNS_VERTEX *p2, BNS_EDGE *e, BN_STRUCT *pBNS, int bClearEdge)
Definition ichirvr1.c:2592
int FixRestoredStructureStereo(struct tagCANON_GLOBALS *pCG, struct tagINCHI_CLOCK *ic, INCHI_MODE cmpInChI, ICR *icr, INCHI_MODE cmpInChI2, ICR *icr2, ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, inp_ATOM *at3, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, T_GROUP_INFO **ppt_group_info, inp_ATOM **ppat_norm, inp_ATOM **ppat_prep, INChI *pInChI[], long num_inp, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask, int forbidden_stereo_edge_mask)
Definition ichirvr6.c:24
int AllInchiToStructure(struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *pCG, ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, long num_inp, char *szCurHdr, ICHICONST SRM *pSrm, int bReqNonTaut, StrFromINChI *pStruct[INCHI_NUM][TAUT_NUM], InpInChI *pOneInput)
Definition ichirvr7.c:1007
int bInpInchiComponentExists(InpInChI *pOneInput, int iINCHI, int bMobileH, int k)
Definition ichiread.c:1765
void IncrZeroBondsAndClearEndpts(inp_ATOM *at, int num_at, int iComponent)
Definition ichirvr1.c:4117
int MoveRadToAtomsAddCharges(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int forbidden_mask)
Definition ichirvr2.c:1806
int FixMoreHydrogenInFormula(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, inp_ATOM *atf, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr4.c:363
int MakeOneInChIOutOfStrFromINChI2(struct tagCANON_GLOBALS *pCG, struct tagINCHI_CLOCK *ic, ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, BN_STRUCT *pBNS, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, inp_ATOM *at3, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, T_GROUP_INFO **t_group_info, inp_ATOM **at_norm, inp_ATOM **at_prep)
Definition ichirvr1.c:5052
#define ICHICONST
Definition ichirvrs.h:13
int CompareTwoPairsOfInChI(INChI *pInChI1[TAUT_NUM], INChI *pInChI2[TAUT_NUM], int bMobileH, INCHI_MODE CompareInchiFlags[])
Definition ichirvr7.c:2168
enum tagTCGroupTypes TCGR_TYPE
int EvaluateChargeChanges(BN_STRUCT *pBNS, VAL_AT *pVA, int *pnDeltaH, int *pnDeltaCharge, int *pnNumVisitedAtoms)
Definition ichirvr1.c:4285
int FixFixedHRestoredStructure(struct tagCANON_GLOBALS *pCG, struct tagINCHI_CLOCK *ic, ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, inp_ATOM *at3, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, T_GROUP_INFO **ti, inp_ATOM **at_norm, inp_ATOM **at_prep, INChI *pInChI[], long num_inp, int bHasSomeFixedH, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask, int forbidden_stereo_edge_mask)
Definition ichirvr3.c:298
int get_sp_element_type(int nPeriodicNumber, int *nRow)
Definition ichirvr1.c:1379
int InChI2Atom(struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *pCG, ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, const char *szCurHdr, long num_inp, StrFromINChI *pStruct, int iComponent, int iAtNoOffset, int bI2A_Flag, int bHasSomeFixedH, InpInChI *pOneInput)
Definition ichirvr7.c:66
int set_bond_type(inp_ATOM *at, AT_NUMB i1, AT_NUMB i2, int bType)
Definition ichirvr2.c:1579
int ForbidNintrogenPlus2BondsInSmallRings(BN_STRUCT *pBNS, inp_ATOM *at, int num_at, VAL_AT *pVA, int min_ring_size, ALL_TC_GROUPS *pTCGroups, EDGE_LIST *pNplus2BondsEdges, int forbidden_edge_mask)
Definition ichirvr4.c:81
int nCountBnsSizes(inp_ATOM *at, int num_at, int nAddEdges2eachAtom, int nAddVertices, T_GROUP_INFO *ti, VAL_AT *pVA, ICHICONST SRM *pSrm, ALL_TC_GROUPS *pTCGroups)
Definition ichirvr1.c:1835
int RearrangePlusMinusEdgesFlow(BN_STRUCT *pBNS, BN_DATA *pBD, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int forbidden_edge_mask)
Definition ichirvr2.c:3368
int GetTgroupInfoFromInChI(T_GROUP_INFO *ti, inp_ATOM *at, AT_NUMB *endpoint, INChI *pInChI)
Definition ichirvr1.c:540
int bMayBeACationInMobileHLayer(inp_ATOM *at, VAL_AT *pVA, int iat, int bMobileH)
Definition ichirvr1.c:714
int bInpInchiComponentDeleted(InpInChI *pOneInput, int iInChI, int bMobileH, int k)
Definition ichiread.c:1784
int DisplayOneRestoredComponent(struct tagCANON_GLOBALS *pCG, StrFromINChI *pStruct, inp_ATOM *at, int iComponent, int nNumComponents, int bMobileH, const char *szCurHdr)
int FillOutCompareMessage(char *szMsg, int nLenMsg, INCHI_MODE bits[])
Definition ichirvr7.c:3144
int MergeStructureComponents(ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, long num_inp, char *szCurHdr, ICHICONST SRM *pSrm, int bReqNonTaut, StrFromINChI *pStruct[INCHI_NUM][TAUT_NUM], InpInChI *pOneInput)
Definition ichirvr7.c:371
int GetAtomRestoreInfo(struct tagCANON_GLOBALS *pCG, inp_ATOM *atom, int iat, VAL_AT *pVArray, ICHICONST SRM *pSrm, int bMobileH, AT_NUMB *endpoint)
Definition ichirvr1.c:877
int AddRadicalToMetal(int *tot_st_cap, int *tot_st_flow, ICHICONST SRM *pSrm, BN_STRUCT *pBNS, ALL_TC_GROUPS *pTCGroups)
Definition ichirvr1.c:2671
int CheckAndRefixStereobonds(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr4.c:1643
int MovePlusFromS2DiaminoCarbon(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
Definition ichirvr2.c:3701
int OutputInChIOutOfStrFromINChI(struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *pCG, ICHICONST INPUT_PARMS *ip_inp, STRUCT_DATA *sd_inp, long num_inp, int bINChIOutputOptions, INCHI_IOSTREAM *pout, INCHI_IOSTREAM *plog, InpInChI *pOneInput, int bHasSomeFixedH, unsigned char save_opt_bits)
Definition ichirvr1.c:5854
int BondFlowMaxcapMinorder(inp_ATOM *atom, VAL_AT *pVA, ICHICONST SRM *pSrm, int iat, int ineigh, int *pnMaxcap, int *pnMinorder, int *pbNeedsFlower)
Definition ichirvr1.c:1655
int DisconnectedConnectedH(inp_ATOM *at, int num_atoms, int num_deleted_H)
Definition ichirvr1.c:5560
int CopyBnsToAtom(StrFromINChI *pStruct, BN_STRUCT *pBNS, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, int bAllowZeroBondOrder)
Definition ichirvr2.c:944
int ConnectSuperCGroup(int nTCG_Plus, int nAddGroups[], int num_add, int *pcur_num_vertices, int *pcur_num_edges, int *tot_st_cap, int *tot_st_flow, BN_STRUCT *pBNS, ALL_TC_GROUPS *pTCGroups)
Definition ichirvr1.c:3023
struct tagStructFromInChI StrFromINChI
int AddProtonAndIsoHBalanceToMobHStruct(struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *pCG, ICHICONST INPUT_PARMS *ip, STRUCT_DATA *sd, long num_inp, int bHasSomeFixedH, char *szCurHdr, StrFromINChI *pStruct[INCHI_NUM][TAUT_NUM], InpInChI *pOneInput)
Definition ichirvr7.c:1145
int SetStereoBondTypeFor0DParity(inp_ATOM *at, int i1, int m1)
Definition ichirvr2.c:755
const int cnListNumEl
Definition ichirvr1.c:469
int FixAddProtonForADP(BN_STRUCT *pBNS, BN_DATA *pBD, StrFromINChI *pStruct, inp_ATOM *at, inp_ATOM *at2, inp_ATOM *atf, VAL_AT *pVA, ALL_TC_GROUPS *pTCGroups, ICR *picr, int *pnNumRunBNS, int *pnTotalDelta, int forbidden_edge_mask)
void RemoveFixHInChIIdentical2MobH(InpInChI *pOneInput)
Definition ichirvr7.c:221
struct tagEdgeCapFlow ECF
unsigned short AT_NUMB
Definition ichisize.h:10
unsigned short AT_RANK
Definition ichisize.h:11
signed short NUM_H
Definition ichisize.h:14
unsigned long INCHI_MODE
Definition ichisize.h:25
signed char S_CHAR
Definition inchi_api.h:78
#define NUM_H_ISOTOPES
Definition inchi_api.h:72
unsigned char U_CHAR
Definition inchi_api.h:79
#define INCHI_NUM
Definition inchi_api.h:1144
#define MAX_NUM_STEREO_BONDS
Definition inchi_api.h:1141
signed short S_SHORT
Definition inchi_api.h:84
#define MAX_NUM_STEREO_ATOM_NEIGH
Definition inchi_api.h:1138
#define TAUT_NUM
Definition mode.h:560
Definition ichi_bns.h:251
Definition ichi_bns.h:198
Definition ichi_bns.h:155
Definition ichi_bns.h:179
Structure describing a polymer.
Definition inpdef.h:274
Structure describing v. 1.05 extended input supporting V3000; polymers.
Definition inpdef.h:345
Definition ichirvrs.h:210
int num_tgroup_edges
Definition ichirvrs.h:221
int tgroup_charge
Definition ichirvrs.h:223
int nEdgePlus
Definition ichirvrs.h:235
TC_GROUP * pTCG
Definition ichirvrs.h:211
int max_tc_groups
Definition ichirvrs.h:213
int iAtNoOffset
Definition ichirvrs.h:238
int nVertices
Definition ichirvrs.h:215
int num_tc_groups
Definition ichirvrs.h:212
int nEdgeMinus
Definition ichirvrs.h:236
int total_charge
Definition ichirvrs.h:226
int added_charge
Definition ichirvrs.h:225
int nGroup[NUM_TCGROUP_TYPES]
Definition ichirvrs.h:214
int nEdges
Definition ichirvrs.h:216
int num_tgroups
Definition ichirvrs.h:220
int num_atoms
Definition ichirvrs.h:218
int nEdge4charge
Definition ichirvrs.h:234
int num_metal_atoms
Definition ichirvrs.h:230
int iComponent
Definition ichirvrs.h:237
int nAddIedges
Definition ichirvrs.h:217
int total_electrons_metals
Definition ichirvrs.h:228
int total_electrons
Definition ichirvrs.h:227
int num_metal_bonds
Definition ichirvrs.h:231
int num_bonds
Definition ichirvrs.h:219
int charge_on_atoms
Definition ichirvrs.h:224
Definition ichirvrs.h:133
char cMaxFlowToMetal
Definition ichirvrs.h:141
int nCMinusGroupEdge
Definition ichirvrs.h:149
char cMetal
Definition ichirvrs.h:136
char cInitFreeValences
Definition ichirvrs.h:142
S_CHAR cnListIndex
Definition ichirvrs.h:148
char cMinRingSize
Definition ichirvrs.h:146
S_CHAR cInitCharge
Definition ichirvrs.h:143
char cNumBondsToMetal
Definition ichirvrs.h:137
char cInitFlowToMetal
Definition ichirvrs.h:138
char cNumValenceElectrons
Definition ichirvrs.h:144
int nCPlusGroupEdge
Definition ichirvrs.h:150
char cInitValenceToMetal
Definition ichirvrs.h:139
char cPeriodicRowNumber
Definition ichirvrs.h:145
char cDoNotAddH
Definition ichirvrs.h:135
U_CHAR cPeriodicNumber
Definition ichirvrs.h:147
int nTautGroupEdge
Definition ichirvrs.h:152
int nMetalGroupEdge
Definition ichirvrs.h:151
char cInitOrigValenceToMetal
Definition ichirvrs.h:140
Definition ichirvrs.h:458
S_CHAR nMobHInChI
Definition ichirvrs.h:466
U_CHAR nValElectr
Definition ichirvrs.h:462
S_CHAR nFixHInChI
Definition ichirvrs.h:464
S_CHAR nMobHRevrs
Definition ichirvrs.h:467
U_CHAR nPeriodNum
Definition ichirvrs.h:463
AT_NUMB endptRevrs
Definition ichirvrs.h:460
S_CHAR nValue
Definition ichirvrs.h:470
S_CHAR nAtChargeRevrs
Definition ichirvrs.h:469
S_CHAR nFixHRevrs
Definition ichirvrs.h:465
AT_NUMB atomNumber
Definition ichirvrs.h:461
AT_NUMB endptInChI
Definition ichirvrs.h:459
S_CHAR nNumHRevrs
Definition ichirvrs.h:468
Definition ichirvrs.h:500
U_CHAR nValElectr
Definition ichirvrs.h:504
S_CHAR nAtChargeRevrs
Definition ichirvrs.h:509
S_CHAR nValue
Definition ichirvrs.h:510
U_CHAR nPeriodNum
Definition ichirvrs.h:505
AT_NUMB atomNumber
Definition ichirvrs.h:503
AT_NUMB endptInChI
Definition ichirvrs.h:501
S_CHAR nMobHRevrs
Definition ichirvrs.h:507
AT_NUMB endptRevrs
Definition ichirvrs.h:502
S_CHAR nMobHInChI
Definition ichirvrs.h:506
S_CHAR nNumHRevrs
Definition ichirvrs.h:508
Definition ichirvrs.h:62
AT_RANK * nAtomLevel
Definition ichirvrs.h:64
int num_at
Definition ichirvrs.h:66
S_CHAR * cSource
Definition ichirvrs.h:65
QUEUE * q
Definition ichirvrs.h:63
AT_RANK min_ring_size
Definition ichirvrs.h:67
Definition ichicant.h:303
Definition ichirvrs.h:270
char cMetal
Definition ichirvrs.h:274
char chem_valence
Definition ichirvrs.h:273
char cNumValenceElectrons
Definition ichirvrs.h:276
char num_bonds
Definition ichirvrs.h:272
char cNumBondsToMetal
Definition ichirvrs.h:275
Vertex iat
Definition ichirvrs.h:271
char cPeriodicRowNumber
Definition ichirvrs.h:277
char cNumChargeStates
Definition ichirvrs.h:278
U_CHAR el_number
Definition ichirvrs.h:279
Definition ichirvrs.h:446
int len
Definition ichirvrs.h:450
int nInitialCharge
Definition ichirvrs.h:449
int bits
Definition ichirvrs.h:448
MY_CONST C_NODE * pCN
Definition ichirvrs.h:447
Definition ichirvrs.h:410
VCF v
Definition ichirvrs.h:411
ECF e[MAX_CN_VAL]
Definition ichirvrs.h:412
Definition ichirvrs.h:262
int nCharge
Definition ichirvrs.h:264
int nValence
Definition ichirvrs.h:263
int nValenceOrderingNumber
Definition ichirvrs.h:265
Definition ichirvrs.h:404
S_CHAR flow
Definition ichirvrs.h:408
S_CHAR cap
Definition ichirvrs.h:406
S_CHAR bForbiddenEdge
Definition ichirvrs.h:407
S_SHORT neigh
Definition ichirvrs.h:405
Definition ichirvrs.h:245
EdgeIndex * pnEdges
Definition ichirvrs.h:248
int num_alloc
Definition ichirvrs.h:246
int num_edges
Definition ichirvrs.h:247
Definition ichitime.h:50
Definition ichi.h:232
Definition ichi.h:87
Definition ichi.h:174
Definition strutil.h:381
Definition ichirvrs.h:75
S_CHAR bUsed0DParity
Definition ichirvrs.h:77
S_CHAR sn_ord[MAX_NUM_STEREO_BONDS]
Definition ichirvrs.h:84
AT_NUMB sn_orig_at_num[MAX_NUM_STEREO_BONDS]
Definition ichirvrs.h:88
S_CHAR p_parity
Definition ichirvrs.h:79
S_CHAR sb_ord[MAX_NUM_STEREO_BONDS]
Definition ichirvrs.h:82
AT_NUMB p_orig_at_num[MAX_NUM_STEREO_ATOM_NEIGH]
Definition ichirvrs.h:80
S_CHAR sb_parity[MAX_NUM_STEREO_BONDS]
Definition ichirvrs.h:87
Structure describing input atom data for InChI generation.
Definition inpdef.h:554
Structure describing an input atom.
Definition inpdef.h:107
Definition ichirvrs.h:297
int s[INCHI_NUM][TAUT_NUM][2]
Definition ichirvrs.h:301
inp_ATOM * atom
Definition ichirvrs.h:304
long num_inp
Definition ichirvrs.h:303
int num_explicit_H
Definition ichirvrs.h:306
int valid_polymer
Definition ichirvrs.h:311
REM_PROTONS nNumProtons[INCHI_NUM][TAUT_NUM]
Definition ichirvrs.h:300
OAD_Polymer * polymer
Definition ichirvrs.h:309
INCHI_MODE CompareInchiFlags[INCHI_NUM][TAUT_NUM]
Definition ichirvrs.h:307
INChI * pInpInChI[INCHI_NUM][TAUT_NUM]
Definition ichirvrs.h:298
int num_atoms
Definition ichirvrs.h:305
OAD_V3000 * v3000
Definition ichirvrs.h:310
int nNumComponents[INCHI_NUM][TAUT_NUM]
Definition ichirvrs.h:299
Definition ichidrp.h:85
NUM_H nNumRemovedIsotopicH[NUM_H_ISOTOPES]
Definition ichirvrs.h:284
NUM_H nNumRemovedProtons
Definition ichirvrs.h:283
Definition mode.h:999
Definition ichiring.h:21
Definition ichirvrs.h:288
NUM_H nNumRemovedIsotopicH[NUM_H_ISOTOPES]
Definition ichirvrs.h:291
COMPONENT_REM_PROTONS * pNumProtons
Definition ichirvrs.h:294
NUM_H nNumRemovedProtons
Definition ichirvrs.h:290
Definition ichirvrs.h:52
int nRetVal
Definition ichirvrs.h:56
PINChI2 * pINChI[INCHI_NUM]
Definition ichirvrs.h:53
int num_components[INCHI_NUM]
Definition ichirvrs.h:55
PINChI_Aux2 * pINChI_Aux[INCHI_NUM]
Definition ichirvrs.h:54
Definition ichirvrs.h:473
short nNumTgMInChI
Definition ichirvrs.h:484
S_CHAR nChargeFixHRevrsNonMetal
Definition ichirvrs.h:492
short nNumTgDiffMinus
Definition ichirvrs.h:482
char bHasDifference
Definition ichirvrs.h:495
short nNumRemHRevrs
Definition ichirvrs.h:477
S_CHAR nChargeMobHInChI
Definition ichirvrs.h:489
short nNumEndpRevrs
Definition ichirvrs.h:481
S_CHAR nChargeFixHRevrs
Definition ichirvrs.h:490
short nNumRemHInChI
Definition ichirvrs.h:476
short nNumTgRevrs
Definition ichirvrs.h:479
short len_c2at
Definition ichirvrs.h:475
CMP2FHATOMS c2at[MAX_DIFF_FIXH]
Definition ichirvrs.h:474
short nNumTgHInChI
Definition ichirvrs.h:485
U_CHAR nNumDiffMobH
Definition ichirvrs.h:496
char bFixedHLayerExistsRevrs
Definition ichirvrs.h:494
short nNumTgMRevrs
Definition ichirvrs.h:486
S_CHAR nChargeMobHRevrsNonMetal
Definition ichirvrs.h:493
S_CHAR nChargeFixHInChI
Definition ichirvrs.h:488
short nNumTgDiffH
Definition ichirvrs.h:483
short nNumEndpInChI
Definition ichirvrs.h:480
short nNumTgHRevrs
Definition ichirvrs.h:487
short nNumTgInChI
Definition ichirvrs.h:478
S_CHAR nChargeMobHRevrs
Definition ichirvrs.h:491
Definition ichirvrs.h:513
short nNumTgORevrs
Definition ichirvrs.h:532
short nNumTgDBNRevrs
Definition ichirvrs.h:544
short nNumTgDBNInChI
Definition ichirvrs.h:555
short nNumTgRevrs
Definition ichirvrs.h:519
short nNumRemHRevrs
Definition ichirvrs.h:517
char bFixedHLayerExistsRevrs
Definition ichirvrs.h:560
short nNumEndpInChI
Definition ichirvrs.h:520
short nNumTgNHRevrs
Definition ichirvrs.h:540
short nNumTgDBNHInChI
Definition ichirvrs.h:553
short nNumTgDiffH
Definition ichirvrs.h:523
short nNumTgDBNHRevrs
Definition ichirvrs.h:542
short nNumTgNH2Revrs
Definition ichirvrs.h:541
short nNumTgDBNMinusInChI
Definition ichirvrs.h:554
short nNumTgOMinusInChI
Definition ichirvrs.h:546
short nNumTgOHInChI
Definition ichirvrs.h:547
S_CHAR nChargeMobHRevrsNonMetal
Definition ichirvrs.h:559
S_CHAR nChargeMobHRevrs
Definition ichirvrs.h:558
short nNumTgNRevrs
Definition ichirvrs.h:533
short nNumTgNH2InChI
Definition ichirvrs.h:552
U_CHAR nNumDiffMobH
Definition ichirvrs.h:562
short nNumTgNMinusInChI
Definition ichirvrs.h:549
short nNumTgMInChI
Definition ichirvrs.h:525
short nNumTgDiffMinus
Definition ichirvrs.h:522
short nNumTgNInChI
Definition ichirvrs.h:528
short nNumTgNMinusRevrs
Definition ichirvrs.h:538
short nNumTgInChI
Definition ichirvrs.h:518
char bHasDifference
Definition ichirvrs.h:561
S_CHAR nChargeMobHInChI
Definition ichirvrs.h:557
short nNumTgHRevrs
Definition ichirvrs.h:531
short nNumTgOInChI
Definition ichirvrs.h:527
short nNumRemHInChI
Definition ichirvrs.h:516
short nNumEndpRevrs
Definition ichirvrs.h:521
short nNumTgDBNMinusRevrs
Definition ichirvrs.h:543
short nNumTgNHMinusRevrs
Definition ichirvrs.h:539
CMP2MHATOMS c2at[MAX_DIFF_FIXH]
Definition ichirvrs.h:514
short nNumTgHInChI
Definition ichirvrs.h:526
short nNumTgOHRevrs
Definition ichirvrs.h:536
short nNumTgMRevrs
Definition ichirvrs.h:530
short nNumTgNHMinusInChI
Definition ichirvrs.h:550
short nNumTgNHInChI
Definition ichirvrs.h:551
short nNumTgOMinusRevrs
Definition ichirvrs.h:535
short len_c2at
Definition ichirvrs.h:515
short nNumTgDBORevrs
Definition ichirvrs.h:537
short nNumTgDBOInChI
Definition ichirvrs.h:548
Definition ichimain.h:37
Definition ichirvrs.h:314
AT_NUMB * nAtno2Canon[TAUT_NUM]
Definition ichirvrs.h:359
char bMobileH
Definition ichirvrs.h:337
char iMobileH
Definition ichirvrs.h:365
BFS_Q * pbfsq
Definition ichirvrs.h:371
char iINCHI
Definition ichirvrs.h:338
int nError
Definition ichirvrs.h:362
int bPostProcessed
Definition ichirvrs.h:375
int nRemovedProtonsByNormFromRevrs
Definition ichirvrs.h:343
int nChargeRevrs
Definition ichirvrs.h:378
int num_atoms
Definition ichirvrs.h:325
INChI_Aux * pOneINChI_Aux[TAUT_NUM]
Definition ichirvrs.h:352
S_CHAR * fixed_H
Definition ichirvrs.h:323
T_GROUP_INFO ti
Definition ichirvrs.h:321
int nNumRemovedProtons
Definition ichirvrs.h:357
AT_NUMB * nCanon2Atno[TAUT_NUM]
Definition ichirvrs.h:360
int n_pzz
Definition ichirvrs.h:382
int nLink
Definition ichirvrs.h:374
char bDeleted
Definition ichirvrs.h:366
INP_ATOM_DATA * pOne_norm_data[TAUT_NUM]
Definition ichirvrs.h:353
char iInchiRec
Definition ichirvrs.h:364
S_CHAR charge
Definition ichirvrs.h:328
int bExtract
Definition ichirvrs.h:348
int nChargeInChI
Definition ichirvrs.h:379
char bFixedHExists
Definition ichirvrs.h:339
inp_ATOM * at
Definition ichirvrs.h:316
inp_ATOM_STEREO * st
Definition ichirvrs.h:317
ICHICONST SRM * pSrm
Definition ichirvrs.h:334
REV_INCHI RevInChI
Definition ichirvrs.h:342
inp_ATOM * at2
Definition ichirvrs.h:318
S_CHAR * pOne_fixed_H
Definition ichirvrs.h:354
char bIsotopic
Definition ichirvrs.h:329
BN_STRUCT * pBNS
Definition ichirvrs.h:332
int nNumRemovedProtonsByRevrs
Definition ichirvrs.h:345
T_GROUP_INFO One_ti
Definition ichirvrs.h:355
int nNumRemovedProtonsMobHInChI
Definition ichirvrs.h:327
int n_zy
Definition ichirvrs.h:381
BN_DATA * pBD
Definition ichirvrs.h:333
int num_deleted_H
Definition ichirvrs.h:326
long num_inp_actual
Definition ichirvrs.h:368
int nOneINChI_bMobileH
Definition ichirvrs.h:356
INChI * pOneINChI[TAUT_NUM]
Definition ichirvrs.h:351
VAL_AT * pVA
Definition ichirvrs.h:372
XYZ_COORD * pXYZ
Definition ichirvrs.h:324
AT_NUMB * endpoint
Definition ichirvrs.h:322
Definition ichirvrs.h:34
int nMetalMinBondOrder
Definition ichirvrs.h:37
int nMetalInitEdgeFlow
Definition ichirvrs.h:38
int nMetalInitBondOrder
Definition ichirvrs.h:40
int nMetalMaxCharge_D
Definition ichirvrs.h:46
int nMetal2EndpointInitBondOrder
Definition ichirvrs.h:43
int nMetalFlowerParam_D
Definition ichirvrs.h:45
int nMetal2EndpointInitEdgeFlow
Definition ichirvrs.h:44
int nMetal2EndpointMinBondOrder
Definition ichirvrs.h:42
int bFixStereoBonds
Definition ichirvrs.h:49
int bMetalAddFlower
Definition ichirvrs.h:35
int bStereoRemovesMetalFlag
Definition ichirvrs.h:47
Definition ichirvrs.h:163
short tg_num_Minus
Definition ichirvrs.h:179
int nBackwardEdge
Definition ichirvrs.h:175
short tg_RestoreFlags
Definition ichirvrs.h:181
int nVertexNumber
Definition ichirvrs.h:172
int ord_num
Definition ichirvrs.h:165
int st_flow
Definition ichirvrs.h:169
int num_edges
Definition ichirvrs.h:166
int type
Definition ichirvrs.h:164
int st_cap
Definition ichirvrs.h:168
int nForwardEdge
Definition ichirvrs.h:173
short tg_num_H
Definition ichirvrs.h:178
int edges_flow
Definition ichirvrs.h:171
Vertex tg_set_Minus
Definition ichirvrs.h:180
int edges_cap
Definition ichirvrs.h:170
Definition ichitaut.h:187
Definition ichirvrs.h:398
S_CHAR valence
Definition ichirvrs.h:402
S_SHORT type
Definition ichirvrs.h:399
S_CHAR cap
Definition ichirvrs.h:400
S_CHAR flow
Definition ichirvrs.h:401
Definition ichirvrs.h:30
double xyz[3]
Definition ichirvrs.h:31