49#ifndef COMPILE_ALL_CPP
93 int *found_num_isotopic,
int nAllocMode);
129 int nAllocMode,
int bOrigData);
173 char *pStrErrStruct);
198 int bAdd_DT_to_num_H,
199 int nNumRemovedProtons,
200 NUM_H *nNumRemovedProtonsIsotopic,
231#if (FIX_DALKE_BUGS == 1)
284#define IDIFF_SB (IDIF_SB_PARITY | IDIF_SB_EXTRA_UNDF | IDIF_SB_EXTRA | IDIF_SB_MISS_UNDF | IDIF_SB_MISS)
285#define IDIFF_SC (IDIF_SC_PARITY | IDIF_SC_EXTRA_UNDF | IDIF_SC_EXTRA | IDIF_SC_MISS_UNDF | IDIF_SC_MISS)
287#define IDIFF_CONSTIT (IDIF_POSITION_H | IDIF_MORE_FH | IDIF_LESS_FH | IDIF_MORE_H | IDIF_LESS_H | \
288 IDIF_NO_TAUT | IDIF_WRONG_TAUT | IDIF_SINGLE_TG | IDIF_MULTIPLE_TG | \
289 IDIF_NUM_TG | IDIF_EXTRA_TG_ENDP | IDIF_MISS_TG_ENDP | IDIF_TG | \
290 IDIF_NUM_ISO_AT | IDIF_ISO_AT | IDIF_CHARGE | IDIF_REM_PROT | IDIF_REM_ISO_H | \
292#define IDIFF_STEREO (IDIF_SC_INV | IDIF_SC_PARITY | IDIF_SC_EXTRA_UNDF | IDIF_SC_EXTRA | \
293 IDIF_SC_MISS_UNDF | IDIF_SC_MISS | IDIF_SB_PARITY | IDIF_SB_EXTRA_UNDF | \
294 IDIF_SB_EXTRA | IDIF_SB_MISS_UNDF | IDIF_SB_MISS)
297#define ICR_MAX_ENDP_IN1_ONLY 32
298#define ICR_MAX_ENDP_IN2_ONLY 32
299#define ICR_MAX_DIFF_FIXED_H 32
300#define ICR_MAX_SB_IN1_ONLY 32
301#define ICR_MAX_SB_IN2_ONLY 32
302#define ICR_MAX_SC_IN1_ONLY 32
303#define ICR_MAX_SC_IN2_ONLY 32
304#define ICR_MAX_SB_UNDF 32
305#define ICR_MAX_SC_UNDF 32
373 ICR *picr,
int *err);
569 char sDifSegs[][
DIFS_LENGTH],
int bFixTranspChargeBug);
587#define FLAG_SORT_PRINT_TRANSPOS_BAS 1
588#define FLAG_SORT_PRINT_TRANSPOS_REC 2
589#define FLAG_SORT_PRINT_NO_NFIX_H_BAS 4
590#define FLAG_SORT_PRINT_NO_NFIX_H_REC 8
591#define FLAG_SORT_PRINT_NO_IFIX_H_BAS 16
592#define FLAG_SORT_PRINT_NO_IFIX_H_REC 32
593#define FLAG_SORT_PRINT_ReChI_PREFIX 64
627 int bDisconnectedCoord,
629 int bINChIOutputOptions,
630 int num_components2[],
635 int num_input_struct,
636 int *pSortPrintINChIFlags,
637 unsigned char save_opt_bits);
642 int INCHI_basic_or_INCHI_reconnected,
646 int bDisconnectedCoord,
648 int bINChIOutputOptions,
649 int num_components2[],
654 int num_input_struct,
655 int *pSortPrintINChIFlags,
656 unsigned char save_opt_bits);
676 int bCompareComponents);
730 const char *szLabel,
const char *szValue);
757#define SDF_LBL_VAL(L, V) ((L) && (L)[0]) ? gsSpace : gsEmpty, ((L) && (L)[0]) ? L : gsEmpty, ((L) && (L)[0]) ? (((V) && (V)[0]) ? gsEqual : gsSpace) : gsEmpty, ((V) && (V)[0]) ? V : ((L) && (L)[0]) ? gsMissing \
769 int imat_new(
int m,
int n,
int ***a);
876 int *nbonds,
int **bonds,
877 int *natoms,
int *atoms);
895#ifndef COMPILE_ALL_CPP
INChI * PINChI2[TAUT_NUM]
Definition ichi.h:259
INChI_Aux * PINChI_Aux2[TAUT_NUM]
Definition ichi.h:302
unsigned short AT_NUMB
Definition ichisize.h:45
signed short NUM_H
Definition ichisize.h:49
unsigned long INCHI_MODE
Definition ichisize.h:60
signed char S_CHAR
Definition inchi_api.h:113
#define TAUT_NUM
Definition mode.h:593
int etype
Definition strutil.h:789
int nbr
Definition strutil.h:788
int * seen
Definition strutil.h:811
int nseen
Definition strutil.h:810
int end
Definition strutil.h:807
subgraf * sg
Definition strutil.h:805
int start
Definition strutil.h:806
int nbonds
Definition strutil.h:809
int maxbonds
Definition strutil.h:808
int * nodes
Definition strutil.h:795
int * degrees
Definition strutil.h:797
int * orig2node
Definition strutil.h:798
subgraf_edge ** adj
Definition strutil.h:799
int nnodes
Definition strutil.h:794
Definition ichicant.h:338
Structure describing composite atom data for InChI generation.
Definition inpdef.h:647
int num_fixed_H2_more
Definition strutil.h:336
AT_NUMB sc_in2_only[ICR_MAX_SC_IN2_ONLY]
Definition strutil.h:340
int num_sb_in2_only
Definition strutil.h:346
AT_NUMB fixed_H_at1_more[ICR_MAX_DIFF_FIXED_H]
Definition strutil.h:330
int num_sc_in1_only
Definition strutil.h:339
int tot_num_H2
Definition strutil.h:312
AT_NUMB sc_undef_in2_only[ICR_MAX_SB_UNDF]
Definition strutil.h:355
AT_NUMB sb_undef_in1_only[ICR_MAX_SC_UNDF]
Definition strutil.h:348
int num_endp_in2_only
Definition strutil.h:324
int tot_num_H1
Definition strutil.h:311
S_CHAR fixed_H_nH2_more[ICR_MAX_DIFF_FIXED_H]
Definition strutil.h:335
int num_sc_in2_only
Definition strutil.h:341
int num_sb_undef_in2_only
Definition strutil.h:351
INCHI_MODE flags
Definition strutil.h:309
int num_sb_undef_in1_only
Definition strutil.h:349
int num_sb_in1_only
Definition strutil.h:344
AT_NUMB sb_undef_in2_only[ICR_MAX_SC_UNDF]
Definition strutil.h:350
AT_NUMB diff_pos_H_at[ICR_MAX_DIFF_FIXED_H]
Definition strutil.h:326
int num_diff_pos_H
Definition strutil.h:328
AT_NUMB sb_in2_only[ICR_MAX_SB_IN2_ONLY]
Definition strutil.h:345
int num_fixed_H1_more
Definition strutil.h:332
AT_NUMB sc_in1_only[ICR_MAX_SC_IN1_ONLY]
Definition strutil.h:338
int num_sc_undef_in2_only
Definition strutil.h:356
AT_NUMB fixed_H_at2_more[ICR_MAX_DIFF_FIXED_H]
Definition strutil.h:334
AT_NUMB endp_in1_only[ICR_MAX_ENDP_IN1_ONLY]
Definition strutil.h:320
AT_NUMB sb_in1_only[ICR_MAX_SB_IN1_ONLY]
Definition strutil.h:343
int num_taut_M2
Definition strutil.h:316
int num_endp_in1_only
Definition strutil.h:321
int num_taut_M1
Definition strutil.h:315
int num_sc_undef_in1_only
Definition strutil.h:354
AT_NUMB sc_undef_in1_only[ICR_MAX_SB_UNDF]
Definition strutil.h:353
AT_NUMB endp_in2_only[ICR_MAX_ENDP_IN2_ONLY]
Definition strutil.h:323
int num_taut_H1
Definition strutil.h:313
int num_taut_H2
Definition strutil.h:314
S_CHAR fixed_H_nH1_more[ICR_MAX_DIFF_FIXED_H]
Definition strutil.h:331
S_CHAR diff_pos_H_nH[ICR_MAX_DIFF_FIXED_H]
Definition strutil.h:327
Structure describing information about atoms for InChI generation.
Definition inpdef.h:553
Structure describing original atom data.
Definition inpdef.h:433
Structure describing the original structure.
Definition inpdef.h:478
Definition ichitaut.h:222
int OutputINChI2(struct tagCANON_GLOBALS *pCG, INCHI_IOS_STRING *strbuf, INCHI_SORT *pINChISortTautAndNonTaut2[][TAUT_NUM], int INCHI_basic_or_INCHI_reconnected, ORIG_ATOM_DATA *orig_inp_data, ORIG_STRUCT *pOrigStruct, INPUT_PARMS *ip, int bDisconnectedCoord, int bOutputType, int bINChIOutputOptions, int num_components2[], int num_non_taut2[], int num_taut2[], INCHI_IOSTREAM *out_file, INCHI_IOSTREAM *log_file, int num_input_struct, int *pSortPrintINChIFlags, unsigned char save_opt_bits)
Definition ichiprt1.c:966
#define ICR_MAX_SC_IN2_ONLY
Definition strutil.h:303
int imat_new(int m, int n, int ***a)
Allocate integer matrix.
Definition strutil.c:5005
struct tagInChICompareResults ICR
int CompINChITaut2(const void *p1, const void *p2)
Compare function for qsort (tautomeric structures)
Definition ichimake.c:2064
int GetInpStructErrorType(INPUT_PARMS *ip, int err, char *pStrErrStruct, int num_inp_atoms)
Get the input struct error type.
Definition ichimake.c:2480
const char gsMissing[]
Definition runichi.c:207
enum tagMarkDiff DIF_VALUES
int Free_INChI_Stereo(INChI_Stereo *pINChI_Stereo)
Free INChI_Stereo data structure.
Definition strutil.c:4611
tagDiffINChISegments
Definition strutil.h:506
@ DIFS_t_SATOMS
Definition strutil.h:513
@ DIFS_idf_LENGTH
Definition strutil.h:518
@ DIFS_m_SP3INV
Definition strutil.h:514
@ DIFS_h_H_ATOMS
Definition strutil.h:509
@ DIFS_f_FORMULA
Definition strutil.h:507
@ DIFS_q_CHARGE
Definition strutil.h:510
@ DIFS_p_PROTONS
Definition strutil.h:511
@ DIFS_b_SBONDS
Definition strutil.h:512
@ DIFS_o_TRANSP
Definition strutil.h:517
@ DIFS_i_IATOMS
Definition strutil.h:516
@ DIFS_s_STYPE
Definition strutil.h:515
@ DIFS_LENGTH
Definition strutil.h:520
@ DIFS_c_CONNECT
Definition strutil.h:508
enum tagDiffINChISegments DIF_SEGMENTS
int Free_INChI_Aux(INChI_Aux **ppINChI_Aux)
Free INChI_Aux data structure.
Definition strutil.c:4843
void imat_free(int m, int **a)
Free integer matrix.
Definition strutil.c:5036
int Eql_INChI_Isotopic(INChI *i1, INChI *i2)
Compares isotopic information of two InChIs.
Definition ichiprt2.c:203
int subgraf_pathfinder_collect_all(subgraf_pathfinder *spf, int nforbidden, int *forbidden, int *atnums)
Collects atom numbers along path.
Definition strutil.c:5422
int FillOutInfAtom(struct tagCANON_GLOBALS *pCG, inp_ATOM *norm_at, INF_ATOM_DATA *inf_norm_at_data, int init_num_at, int num_removed_H, int bAdd_DT_to_num_H, int nNumRemovedProtons, NUM_H *nNumRemovedProtonsIsotopic, int bIsotopic, INChI *pINChI, INChI_Aux *pINChI_Aux, int bAbcNumbers, INCHI_MODE nMode)
Fill out.
subgraf * subgraf_new(ORIG_ATOM_DATA *orig_inp_data, int nnodes, int *nodes)
Create graph from atom data.
Definition strutil.c:5064
#define ICR_MAX_SC_IN1_ONLY
Definition strutil.h:302
const char * CompareReversedInchiMsg(int code)
int Free_INChI(INChI **ppINChI)
Free INChI data structure.
Definition strutil.c:4675
int CompINChI2(const INCHI_SORT *p1, const INCHI_SORT *p2, int bTaut, int bCompareIsotopic)
Compares two INChI data structures (qsort)
Definition ichimake.c:1712
enum tagINChISegmAction INCHI_SEGM_ACTION
#define ICR_MAX_SB_UNDF
Definition strutil.h:304
int ProcessStructError(INCHI_IOSTREAM *out_file, INCHI_IOSTREAM *log_file, char *pStrErrStruct, int nErrorType, long num_inp, INPUT_PARMS *ip)
Definition ichimake.c:2511
INCHI_MODE CompareReversedINChI2(INChI *i1, INChI *i2, INChI_Aux *a1, INChI_Aux *a2, ICR *picr, int *err)
Compares two InChIs (2)
Definition ichimake.c:3262
tagMarkDiff
Definition strutil.h:534
@ DIFV_OUTPUT_OMIT_F
Definition strutil.h:547
@ DIFV_OUTPUT_FILL_T
Definition strutil.h:549
@ DIFV_NEQ2PRECED
Definition strutil.h:537
@ DIFV_OUTPUT_EMPTY_T
Definition strutil.h:544
@ DIFV_BOTH_EMPTY
Definition strutil.h:535
@ DIFV_EQL2PRECED
Definition strutil.h:536
@ DIFV_OUTPUT_EMPTY_F
Definition strutil.h:545
@ DIFV_FI_EQ_MI
Definition strutil.h:539
@ DIFV_IS_EMPTY
Definition strutil.h:538
void subgraf_free(subgraf *sg)
Free graph data structure.
Definition strutil.c:5155
#define ICR_MAX_ENDP_IN1_ONLY
Definition strutil.h:297
#define ICR_MAX_SB_IN2_ONLY
Definition strutil.h:301
void subgraf_pathfinder_run(subgraf_pathfinder *spf, int nforbidden, int *forbidden_orig, int *nbonds, int **bonds, int *natoms, int *atoms)
Find path(s) from subgraf node spf->start to spf->end and fill bonds[nbonds] and atoms[natoms]....
Definition strutil.c:5273
const char gsEmpty[]
Definition runichi.c:208
int bHasEquString(AT_NUMB *LinearCT, int nLenCT)
Checks if a given array of equivalence numbers (LinearCT) contains any repetitions.
Definition ichiprt2.c:398
int CompareReversedINChI(INChI *i1, INChI *i2, INChI_Aux *a1, INChI_Aux *a2)
Compares two InChIs (1)
Definition ichimake.c:2936
int INChI_SegmentAction(char cDifSegs)
Action to take per segment (?)
Definition ichimake.c:1486
int bIsSameBond(int a1, int a2, int b1, int b2)
Check if two bonds are the same.
Definition runichi2.c:1293
int Eql_INChI_Aux_Num(INChI_Aux *a1, int eql1, INChI_Aux *a2, int eql2)
Compares two InChI AuxInfo objects in terms of numbering.
Definition ichiprt2.c:305
int Create_INChI(struct tagCANON_GLOBALS *pCG, struct tagINCHI_CLOCK *ic, INPUT_PARMS *ip, INChI **ppINChI, INChI_Aux **ppINChI_Aux, ORIG_ATOM_DATA *orig_inp_data, inp_ATOM *inp_at, INP_ATOM_DATA *inp_norm_data[2], int num_inp_at, INCHI_MODE nUserMode, INCHI_MODE *pbTautFlags, INCHI_MODE *pbTautFlagsDone, struct tagInchiTime *ulMaxTime, struct tagTautomerGroupsInfo *ti_out, char *pStrErrStruct)
Create INChI.
Definition ichimake.c:3707
subgraf_pathfinder * subgraf_pathfinder_new(subgraf *sg, ORIG_ATOM_DATA *orig_inp_data, int start, int end)
Allocate new graph pathfinder data structure.
Definition strutil.c:5221
void CompAtomData_GetNumMapping(COMP_ATOM_DATA *adata, int *orig_num, int *curr_num)
Definition strutil.c:4986
void subgraf_debug_trace(subgraf *sg)
Debug graph data structure.
Definition strutil.c:5192
#define ICR_MAX_DIFF_FIXED_H
Definition strutil.h:299
int CompINChITautVsNonTaut(const INCHI_SORT *p1, const INCHI_SORT *p2, int bCompareIsotopic)
Compare tautomeric vs non-tautomeric information.
Definition ichimake.c:341
int MarkUnusedAndEmptyLayers(char sDifSegs[][DIFS_LENGTH])
Mark unused and empty layers.
Definition ichimake.c:1525
int bIsMetalSalt(inp_ATOM *at, int i)
Check if atom is a metal salt.
Definition strutil.c:2511
int bNumHeterAtomHasIsotopicH(inp_ATOM *atom, int num_atoms)
Check if hetero atoms has isotopic hydrogens.
Definition strutil.c:4133
int CompINChILayers(const INCHI_SORT *p1, const INCHI_SORT *p2, char sDifSegs[][DIFS_LENGTH], int bFixTranspChargeBug)
Compare InChI layers.
Definition ichimake.c:645
const char gsEqual[]
Definition runichi.c:210
enum tagInchiDiffBits IDIF
INChI_Aux * Alloc_INChI_Aux(int num_at, int num_isotopic_atoms, int nAllocMode, int bOrigData)
Allocate AuxInfo data structure.
Definition strutil.c:4884
enum tagDiffINChILayers DIF_LAYERS
int ExtractConnectedComponent(inp_ATOM *at, int num_at, int component_number, inp_ATOM *component_at)
Extract one (connected) component.
Definition strutil.c:4558
int SaveEquComponentsInfoAndSortOrder(int iINChI, INCHI_SORT *pINChISort[TAUT_NUM], int *num_components, ORIG_ATOM_DATA *orig_inp_data, ORIG_ATOM_DATA *prep_inp_data, COMP_ATOM_DATA composite_norm_data[TAUT_NUM+1], int bCompareComponents)
Save equivalent components information and sort order (not used ?)
#define ICR_MAX_ENDP_IN2_ONLY
Definition strutil.h:298
tagDiffINChILayers
Definition strutil.h:524
@ DIFL_LENGTH
Definition strutil.h:529
@ DIFL_FI
Definition strutil.h:528
@ DIFL_M
Definition strutil.h:525
@ DIFL_MI
Definition strutil.h:526
@ DIFL_F
Definition strutil.h:527
INChI * Alloc_INChI(inp_ATOM *at, int num_at, int *found_num_bonds, int *found_num_isotopic, int nAllocMode)
Allocate INChI data structure.
Definition strutil.c:4722
tagINChISegmAction
Definition strutil.h:553
@ INCHI_SEGM_OMIT
Definition strutil.h:554
@ INCHI_SEGM_FILL
Definition strutil.h:555
@ INCHI_SEGM_EMPTY
Definition strutil.h:556
int SetConnectedComponentNumber(inp_ATOM *at, int num_at, int component_number)
Set the Connected Component Number object.
Definition strutil.c:4598
const char gsSpace[]
Definition runichi.c:209
int CompareIcr(ICR *picr1, ICR *picr2, INCHI_MODE *pin1, INCHI_MODE *pin2, INCHI_MODE mask)
Compares results from InChI comparison.
Definition ichimake.c:3189
int Eql_INChI_Aux_Equ(INChI_Aux *a1, int eql1, INChI_Aux *a2, int eql2)
Compares two InChI AuxInfo objects.
Definition ichiprt2.c:227
int FillOutCompositeCanonInfAtom(struct tagCANON_GLOBALS *pCG, COMP_ATOM_DATA *composite_norm_data, INF_ATOM_DATA *inf_norm_at_data, int bIsotopic, int bTautomeric, PINChI2 *pINChI2, PINChI_Aux2 *pINChI_Aux2, int bAbcNumbers, INCHI_MODE nMode)
Fill out composite canonical info atom data structure.
#define ICR_MAX_SC_UNDF
Definition strutil.h:305
int OutputINChIPlainError(INCHI_IOSTREAM *out_file, char *pErrorText, int bError)
Print error message (plain text)
Definition ichiprt1.c:514
void subgraf_pathfinder_free(subgraf_pathfinder *spf)
Frees subgraph pathfinder data structure.
Definition strutil.c:5252
tagInchiDiffBits
Definition strutil.h:242
@ IDIF_SC_EXTRA_UNDF
Definition strutil.h:273
@ IDIF_MULTIPLE_TG
Definition strutil.h:258
@ IDIF_CON_TBL
Definition strutil.h:248
@ IDIF_REM_ISO_H
Definition strutil.h:270
@ IDIF_SB_MISS_UNDF
Definition strutil.h:280
@ IDIF_NUM_ISO_AT
Definition strutil.h:266
@ IDIF_REM_PROT
Definition strutil.h:269
@ IDIF_POSITION_H
Definition strutil.h:249
@ IDIF_SB_MISS
Definition strutil.h:281
@ IDIF_MISS_TG_ENDP
Definition strutil.h:263
@ IDIF_TG
Definition strutil.h:265
@ IDIF_SC_INV
Definition strutil.h:271
@ IDIF_SC_PARITY
Definition strutil.h:272
@ IDIF_SINGLE_TG
Definition strutil.h:257
@ IDIF_SB_EXTRA
Definition strutil.h:279
@ IDIF_MORE_FH
Definition strutil.h:250
@ IDIF_NUM_EL
Definition strutil.h:246
@ IDIF_ISO_AT
Definition strutil.h:267
@ IDIF_NUM_AT
Definition strutil.h:244
@ IDIF_CON_LEN
Definition strutil.h:247
@ IDIF_EXTRA_TG_ENDP
Definition strutil.h:262
@ IDIF_SB_EXTRA_UNDF
Definition strutil.h:278
@ IDIF_LESS_H
Definition strutil.h:253
@ IDIF_ATOMS
Definition strutil.h:245
@ IDIF_DIFF_TG_ENDP
Definition strutil.h:264
@ IDIF_SC_MISS
Definition strutil.h:276
@ IDIF_CHARGE
Definition strutil.h:268
@ IDIF_SC_EXTRA
Definition strutil.h:274
@ IDIF_LESS_FH
Definition strutil.h:251
@ IDIF_PROBLEM
Definition strutil.h:243
@ IDIF_NO_TAUT
Definition strutil.h:255
@ IDIF_WRONG_TAUT
Definition strutil.h:256
@ IDIF_SB_PARITY
Definition strutil.h:277
@ IDIF_NUM_TG
Definition strutil.h:259
@ IDIF_MORE_H
Definition strutil.h:252
@ IDIF_SC_MISS_UNDF
Definition strutil.h:275
int WriteToSDfile(const INP_ATOM_DATA *inp_at_data, INCHI_IOSTREAM *fcb, const char *name, const char *comment, const char *szLabel, const char *szValue)
int OutputINChI1(struct tagCANON_GLOBALS *pCG, INCHI_IOS_STRING *strbuf, INCHI_SORT *pINChISortTautAndNonTaut2[][TAUT_NUM], int iINChI, ORIG_ATOM_DATA *orig_inp_data, ORIG_STRUCT *pOrigStruct, INPUT_PARMS *ip, int bDisconnectedCoord, int bOutputType, int bINChIOutputOptions, int num_components2[], int num_non_taut2[], int num_taut2[], INCHI_IOSTREAM *out_file, INCHI_IOSTREAM *log_file, int num_input_struct, int *pSortPrintINChIFlags, unsigned char save_opt_bits)
Main actual worker which serializes InChI to string (called from OutputINChI2( ......
Definition ichiprt1.c:1043
int CompINChINonTaut2(const void *p1, const void *p2)
Compare function for qsort (normal structure)
Definition ichimake.c:2042
int Free_INChI_Members(INChI *pINChI)
Free INChI members.
Definition strutil.c:4698
#define ICR_MAX_SB_IN1_ONLY
Definition strutil.h:300
char * AllocateAndFillHillFormula(INChI *pINChI)
Allocate and fill hill formula.
Definition ichimak2.c:402
int Eql_INChI_Stereo(INChI_Stereo *s1, int eql1, INChI_Stereo *s2, int eql2, int bRelRac)
Compares stereo information of two structures.
Definition ichiprt2.c:54