InChI
 
Loading...
Searching...
No Matches
ichidrp.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 _ICHIDRP_H_
8#define _ICHIDRP_H_
9
10
11#include "incomdef.h"
12
13/********************************************
14 * Parameters for the structure drawing
15 ********************************************/
16#define TDP_LEN_LBL 16 /* length of a label (label: Req., Shown, Found) */
17/* #define TDP_NUM_LBL 3 */ /* number of labels */
18/* #define TDP_NUM_PAR 3 */ /* number of types per label (types: B/T, I/N, S) */
20typedef enum tagTblLabels { ilSHOWN, TDP_NUM_LBL } TBL_LABELS; /* labels */
27/*********************************************/
28typedef struct tagDrawParmsSettings {
30 unsigned long ulDisplTime;
33} SET_DRAW_PARMS; /* input only: how to draw or calculate */
34/*********************************************/
38/*********************************************/
39typedef struct tagPersistDrawParms {
40 int rcPict[4];
41} PER_DRAW_PARMS; /* saved between displaying different structures */
42/*********************************************/
43typedef struct tagDrawParms {
44 SET_DRAW_PARMS sdp; /* how to draw: fill on the 1st call */
45 RET_DRAW_PARMS rdp; /* returned when drawing window is closed */
46 PER_DRAW_PARMS *pdp; /* persistent: save between calls (window size) */
47#ifndef TARGET_LIB_FOR_WINCHI
48#ifndef COMPILE_ANSI_ONLY
49 AT_NUMB *nEquLabels; /* num_inp_atoms elements, value>0 marks atoms in the set #value */
50 AT_NUMB nNumEquSets; /* max mark value */
51 AT_NUMB nCurEquLabel; /* current mark */
52#endif
53#endif
54} DRAW_PARMS; /* Settings: How to draw the structure */
55
56/* @@@ #endif */ /* } COMPILE_ANSI_ONLY */
57
58#define MAX_NUM_PATHS 4
59
60
61typedef enum tagInputType
62{
66 INPUT_INCHI_XML = 3, /* obsolete */
68 INPUT_CMLFILE = 5, /* obsolete */
73
74/* bCalcInChIHash values */
84
85typedef struct tagInputParms {
87 char *pSdfLabel;
88 char *pSdfValue;
89 unsigned long lSdfId;
91
92
93#if ( defined( TARGET_LIB_FOR_WINCHI ) || defined(TARGET_EXE_STANDALONE) )
94/* djb-rwth: #ifndef COMPILE_ANSI_ONLY -- this has been removed so it can work on Windows 10/11 with MinGW */
95 DRAW_PARMS dp;
98/* djb-rwth: #endif -- COMPILE_ANSI_ONLY removed */
99#endif
100
101
102/*
103 -- Files --
104 ip->path[0] => Input
105 ip->path[1] => Output (INChI)
106 ip->path[2] => Log
107 ip->path[3] => Problem structures
108 ip->path[4] => Errors file (ACD)
109
110*/
111 const char *path[MAX_NUM_PATHS];
118 int bINChIOutputOptions; /* !(ip->bINChIOutputOptions & INCHI_OUT_PLAIN_TEXT) */
119 int bINChIOutputOptions2; /* v. 1.05 */
122 long msec_MaxTime; /* was ulMaxTime; max time to run ProsessOneStructure */
124 long ulDisplTime; /* not used: max structure or question display time */
126 int bDisplayIfRestoreWarnings; /* InChI->Struct debug */
131 int bGetMolfileNumber; /* read molfile number from the name line like "Structure #22" */
132 int bCompareComponents; /* see flags CMP_COMPONENTS, etc. */
136
137 int bFixNonUniformDraw; /* correct non-uniformly drawn oxoanions and amidinium cations. */
138
140
141 int bChiralFlag; /* used only with "SUCF" switch */
142 int bAllowEmptyStructure; /* Issue warning on empty structure */
143 int bLargeMolecules; /* v. 1.05 */
144 int bLooseTSACheck; /* v. 1.06 Relax criteria of ambiguous drawing for in-ring stereocenter */
145 int bPolymers; /* v. 1.05+ allow treatment of polymers */
146 int bFoldPolymerSRU; /* v. 1.06 consider possible CRU folding in case of inner repeat(s) */
147 int bFrameShiftScheme; /* v. 1.06 polymer CRU frame shift scheme to check for */
148 int bNPZz; /* v. 1.06 enable non-polymer Zz ('star') atoms */
149 int bStereoAtZz; /* v. 1.06+ enable stereo centers having Zz neighbors (v. 1.06:always 0)*/
150
151 int bMergeHash; /* v. 1.06+ Combine InChIKey with extra hash(es) if present */
152 int bNoWarnings; /* v. 1.06+ suppress warning messages */
153 int bHideInChI; /* v. 1.06+ Do not print InChI itself */
154 int bMolecularInorganics; /* (@nnuk : Nauman Ullah Khan) :: Varaible for Molecular Inorganics parameter */
155 int bMolecularInorganicsReconnectedInChI; /* (@nnuk : Nauman Ullah Khan) :: Custom flag to indicate reconnected InChI requirement */
156
158
159 /* */
162
163#if ( READ_INCHI_STRING == 1 )
165#endif
166
167/* post v.1 features */
168#if ( RENUMBER_ATOMS_AND_RECALC_V106 == 1 )
169 int bRenumber;
170#endif
171#if ( UNDERIVATIZE == 1 )
173#endif
174#if ( RING2CHAIN == 1 )
176#endif
177#if ( RING2CHAIN == 1 || UNDERIVATIZE == 1 )
179#endif
180#if ( ALLOW_SUBSTRUCTURE_FILTERING== 1 )
182#endif
184
186{
187 FSS_STARS_CYCLED, /* 0 bis-starred CRU - cycle, capped-ends - no frame shift (v.1.05) */
188 FSS_NONE, /* 1 no frame shift at all */
189 FSS_STARS_CYCLED_SORTED,/* 2 bis-starred CRU - cycle w sorted links , capped-ends - nothing */
190 FSS_STARS_OPENED, /* 2 bis-starred CRU - opened cycle, capped-ends - no frame shift */
191 FSS_STARS_ENDS_OPENED /* 3 bis-starred CRU - opened cycle, capped-ends - no frame shift */
193
194
195#endif /* _ICHIDRP_H_ */
tagTblLabels
Definition ichidrp.h:20
@ TDP_NUM_LBL
Definition ichidrp.h:20
@ ilSHOWN
Definition ichidrp.h:20
struct tagPersistDrawParms PER_DRAW_PARMS
struct tagTblDrawPatms TBL_DRAW_PARMS
tagInChIHashCalc
Definition ichidrp.h:76
@ INCHIHASH_NONE
Definition ichidrp.h:77
@ INCHIHASH_KEY_XTRA2
Definition ichidrp.h:80
@ INCHIHASH_KEY
Definition ichidrp.h:78
@ INCHIHASH_KEY_XTRA1
Definition ichidrp.h:79
@ INCHIHASH_KEY_XTRA1_XTRA2
Definition ichidrp.h:81
struct tagDrawParmsSettings SET_DRAW_PARMS
enum tagInputType INPUT_TYPE
enum tagTblLabels TBL_LABELS
enum tagFrameShifScheme FRAME_SHIFT_SCHEME
struct tagDrawParms DRAW_PARMS
tagInputType
Definition ichidrp.h:62
@ INPUT_SDFILE
Definition ichidrp.h:65
@ INPUT_MOLFILE
Definition ichidrp.h:64
@ INPUT_MAX
Definition ichidrp.h:70
@ INPUT_INCHI
Definition ichidrp.h:69
@ INPUT_CMLFILE
Definition ichidrp.h:68
@ INPUT_INCHI_XML
Definition ichidrp.h:66
@ INPUT_INCHI_PLAIN
Definition ichidrp.h:67
@ INPUT_NONE
Definition ichidrp.h:63
enum tagInChIHashCalc INCHI_HASH_CALC
tagTblTypes
Definition ichidrp.h:19
@ itISOTOPIC
Definition ichidrp.h:19
@ itSTEREO
Definition ichidrp.h:19
@ TDP_NUM_PAR
Definition ichidrp.h:19
@ itBASIC
Definition ichidrp.h:19
struct tagInputParms INPUT_PARMS
struct tagReturnedDrawParms RET_DRAW_PARMS
#define TDP_LEN_LBL
Definition ichidrp.h:16
enum tagTblTypes TBL_TYPES
tagFrameShifScheme
Definition ichidrp.h:186
@ FSS_STARS_ENDS_OPENED
Definition ichidrp.h:191
@ FSS_STARS_OPENED
Definition ichidrp.h:190
@ FSS_STARS_CYCLED
Definition ichidrp.h:187
@ FSS_STARS_CYCLED_SORTED
Definition ichidrp.h:189
@ FSS_NONE
Definition ichidrp.h:188
#define MAX_NUM_PATHS
Definition ichidrp.h:58
unsigned short AT_NUMB
Definition ichisize.h:10
unsigned long INCHI_MODE
Definition ichisize.h:25
#define MAX_SDF_HEADER
Definition incomdef.h:17
Definition ichidrp.h:28
unsigned long ulDisplTime
Definition ichidrp.h:30
int bOrigAtom
Definition ichidrp.h:31
TBL_DRAW_PARMS * tdp
Definition ichidrp.h:29
int nFontSize
Definition ichidrp.h:32
Definition ichidrp.h:43
SET_DRAW_PARMS sdp
Definition ichidrp.h:44
RET_DRAW_PARMS rdp
Definition ichidrp.h:45
PER_DRAW_PARMS * pdp
Definition ichidrp.h:46
Definition ichidrp.h:85
int bINChIOutputOptions
Definition ichidrp.h:118
int bMergeAllInputStructures
Definition ichidrp.h:127
long first_struct_number
Definition ichidrp.h:113
int bEnhancedStereo
Definition ichidrp.h:157
int bChiralFlag
Definition ichidrp.h:141
int bCtPredecessors
Definition ichidrp.h:120
int bMolecularInorganics
Definition ichidrp.h:154
int bGetSdfileId
Definition ichidrp.h:130
int bGetMolfileNumber
Definition ichidrp.h:131
int bRing2Chain
Definition ichidrp.h:175
int bCalcInChIHash
Definition ichidrp.h:139
int bNoStructLabels
Definition ichidrp.h:135
long last_struct_number
Definition ichidrp.h:114
int bReadInChIOptions
Definition ichidrp.h:164
int bAllowEmptyStructure
Definition ichidrp.h:142
int bDisplay
Definition ichidrp.h:125
char * pSdfValue
Definition ichidrp.h:88
int bDoNotAddH
Definition ichidrp.h:134
int bNPZz
Definition ichidrp.h:148
long ulDisplTime
Definition ichidrp.h:124
int bLargeMolecules
Definition ichidrp.h:143
int bDisplayEachComponentINChI
Definition ichidrp.h:121
int bCompareComponents
Definition ichidrp.h:132
int bDisplayCompositeResults
Definition ichidrp.h:133
int bSaveAllGoodStructsAsProblem
Definition ichidrp.h:129
int bSaveWarningStructsAsProblem
Definition ichidrp.h:128
int bINChIOutputOptions2
Definition ichidrp.h:119
char * pSdfLabel
Definition ichidrp.h:87
long msec_MaxTime
Definition ichidrp.h:122
INPUT_TYPE nInputType
Definition ichidrp.h:115
int bFilterSS
Definition ichidrp.h:181
int bNoWarnings
Definition ichidrp.h:152
int bMergeHash
Definition ichidrp.h:151
int bFoldPolymerSRU
Definition ichidrp.h:146
const char * path[MAX_NUM_PATHS]
Definition ichidrp.h:111
long msec_LeftTime
Definition ichidrp.h:123
int bFrameShiftScheme
Definition ichidrp.h:147
int bDisplayIfRestoreWarnings
Definition ichidrp.h:126
int bUnderivatize
Definition ichidrp.h:172
int bIgnoreUnchanged
Definition ichidrp.h:178
int bStereoAtZz
Definition ichidrp.h:149
long lMolfileNumber
Definition ichidrp.h:90
int bHideInChI
Definition ichidrp.h:153
int bMolecularInorganicsReconnectedInChI
Definition ichidrp.h:155
int num_paths
Definition ichidrp.h:112
char szSdfDataHeader[MAX_SDF_HEADER+1]
Definition ichidrp.h:86
int bPolymers
Definition ichidrp.h:145
unsigned long lSdfId
Definition ichidrp.h:89
INCHI_MODE nMode
Definition ichidrp.h:116
int bLooseTSACheck
Definition ichidrp.h:144
int bAbcNumbers
Definition ichidrp.h:117
INCHI_MODE bTautFlags
Definition ichidrp.h:160
int bFixNonUniformDraw
Definition ichidrp.h:137
INCHI_MODE bTautFlagsDone
Definition ichidrp.h:161
Definition ichidrp.h:39
int rcPict[4]
Definition ichidrp.h:40
Definition ichidrp.h:35
int bEsc
Definition ichidrp.h:36
Definition ichidrp.h:21
char ReqShownFound[TDP_NUM_LBL][TDP_NUM_PAR]
Definition ichidrp.h:23
int bDrawTbl
Definition ichidrp.h:25
char ReqShownFoundTxt[TDP_NUM_LBL][TDP_LEN_LBL]
Definition ichidrp.h:22
int nOrientation
Definition ichidrp.h:24