InChI
 
Loading...
Searching...
No Matches
ichidrp.h
Go to the documentation of this file.
1/*
2 * International Chemical Identifier (InChI)
3 * Version 1
4 * Software version 1.07
5 * April 30, 2024
6 *
7 * MIT License
8 *
9 * Copyright (c) 2024 IUPAC and InChI Trust
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a copy
12 * of this software and associated documentation files (the "Software"), to deal
13 * in the Software without restriction, including without limitation the rights
14 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 * copies of the Software, and to permit persons to whom the Software is
16 * furnished to do so, subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included in all
19 * copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 * SOFTWARE.
28*
29* The InChI library and programs are free software developed under the
30 * auspices of the International Union of Pure and Applied Chemistry (IUPAC).
31 * Originally developed at NIST.
32 * Modifications and additions by IUPAC and the InChI Trust.
33 * Some portions of code were developed/changed by external contributors
34 * (either contractor or volunteer) which are listed in the file
35 * 'External-contributors' included in this distribution.
36 *
37 * info@inchi-trust.org
38 *
39*/
40
41
42#ifndef _ICHIDRP_H_
43#define _ICHIDRP_H_
44
45
46#include "incomdef.h"
47
48/********************************************
49 * Parameters for the structure drawing
50 ********************************************/
51#define TDP_LEN_LBL 16 /* length of a label (label: Req., Shown, Found) */
52/* #define TDP_NUM_LBL 3 */ /* number of labels */
53/* #define TDP_NUM_PAR 3 */ /* number of types per label (types: B/T, I/N, S) */
55typedef enum tagTblLabels { ilSHOWN, TDP_NUM_LBL } TBL_LABELS; /* labels */
62/*********************************************/
63typedef struct tagDrawParmsSettings {
65 unsigned long ulDisplTime;
68} SET_DRAW_PARMS; /* input only: how to draw or calculate */
69/*********************************************/
73/*********************************************/
74typedef struct tagPersistDrawParms {
75 int rcPict[4];
76} PER_DRAW_PARMS; /* saved between displaying different structures */
77/*********************************************/
78typedef struct tagDrawParms {
79 SET_DRAW_PARMS sdp; /* how to draw: fill on the 1st call */
80 RET_DRAW_PARMS rdp; /* returned when drawing window is closed */
81 PER_DRAW_PARMS *pdp; /* persistent: save between calls (window size) */
82#ifndef TARGET_LIB_FOR_WINCHI
83#ifndef COMPILE_ANSI_ONLY
84 AT_NUMB *nEquLabels; /* num_inp_atoms elements, value>0 marks atoms in the set #value */
85 AT_NUMB nNumEquSets; /* max mark value */
86 AT_NUMB nCurEquLabel; /* current mark */
87#endif
88#endif
89} DRAW_PARMS; /* Settings: How to draw the structure */
90
91/* @@@ #endif */ /* } COMPILE_ANSI_ONLY */
92
93#define MAX_NUM_PATHS 4
94
95
108
109/* bCalcInChIHash values */
119
120typedef struct tagInputParms {
124 unsigned long lSdfId;
126
127
128#if ( defined( TARGET_LIB_FOR_WINCHI ) || defined(TARGET_EXE_STANDALONE) )
129/* djb-rwth: #ifndef COMPILE_ANSI_ONLY -- this has been removed so it can work on Windows 10/11 with MinGW */
130 DRAW_PARMS dp;
131 PER_DRAW_PARMS pdp;
132 TBL_DRAW_PARMS tdp;
133/* djb-rwth: #endif -- COMPILE_ANSI_ONLY removed */
134#endif
135
136
137/*
138 -- Files --
139 ip->path[0] => Input
140 ip->path[1] => Output (INChI)
141 ip->path[2] => Log
142 ip->path[3] => Problem structures
143 ip->path[4] => Errors file (ACD)
144
145*/
146 const char *path[MAX_NUM_PATHS];
153 int bINChIOutputOptions; /* !(ip->bINChIOutputOptions & INCHI_OUT_PLAIN_TEXT) */
154 int bINChIOutputOptions2; /* v. 1.05 */
157 long msec_MaxTime; /* was ulMaxTime; max time to run ProsessOneStructure */
159 long ulDisplTime; /* not used: max structure or question display time */
161 int bDisplayIfRestoreWarnings; /* InChI->Struct debug */
166 int bGetMolfileNumber; /* read molfile number from the name line like "Structure #22" */
167 int bCompareComponents; /* see flags CMP_COMPONENTS, etc. */
171
172 int bFixNonUniformDraw; /* correct non-uniformly drawn oxoanions and amidinium cations. */
173
175
176 int bChiralFlag; /* used only with "SUCF" switch */
177 int bAllowEmptyStructure; /* Issue warning on empty structure */
178 int bLargeMolecules; /* v. 1.05 */
179 int bLooseTSACheck; /* v. 1.06 Relax criteria of ambiguous drawing for in-ring stereocenter */
180 int bPolymers; /* v. 1.05+ allow treatment of polymers */
181 int bFoldPolymerSRU; /* v. 1.06 consider possible CRU folding in case of inner repeat(s) */
182 int bFrameShiftScheme; /* v. 1.06 polymer CRU frame shift scheme to check for */
183 int bNPZz; /* v. 1.06 enable non-polymer Zz ('star') atoms */
184 int bStereoAtZz; /* v. 1.06+ enable stereo centers having Zz neighbors (v. 1.06:always 0)*/
185
186 int bMergeHash; /* v. 1.06+ Combine InChIKey with extra hash(es) if present */
187 int bNoWarnings; /* v. 1.06+ suppress warning messages */
188 int bHideInChI; /* v. 1.06+ Do not print InChI itself */
189
190
191 /* */
194
195#if ( READ_INCHI_STRING == 1 )
197#endif
198
199/* post v.1 features */
200#if ( RENUMBER_ATOMS_AND_RECALC_V106 == 1 )
201 int bRenumber;
202#endif
203#if ( UNDERIVATIZE == 1 )
205#endif
206#if ( RING2CHAIN == 1 )
208#endif
209#if ( RING2CHAIN == 1 || UNDERIVATIZE == 1 )
211#endif
212#if ( ALLOW_SUBSTRUCTURE_FILTERING== 1 )
214#endif
216
218{
219 FSS_STARS_CYCLED, /* 0 bis-starred CRU - cycle, capped-ends - no frame shift (v.1.05) */
220 FSS_NONE, /* 1 no frame shift at all */
221 FSS_STARS_CYCLED_SORTED,/* 2 bis-starred CRU - cycle w sorted links , capped-ends - nothing */
222 FSS_STARS_OPENED, /* 2 bis-starred CRU - opened cycle, capped-ends - no frame shift */
223 FSS_STARS_ENDS_OPENED /* 3 bis-starred CRU - opened cycle, capped-ends - no frame shift */
225
226
227#endif /* _ICHIDRP_H_ */
tagTblLabels
Definition ichidrp.h:55
@ TDP_NUM_LBL
Definition ichidrp.h:55
@ ilSHOWN
Definition ichidrp.h:55
struct tagPersistDrawParms PER_DRAW_PARMS
struct tagTblDrawPatms TBL_DRAW_PARMS
tagInChIHashCalc
Definition ichidrp.h:111
@ INCHIHASH_NONE
Definition ichidrp.h:112
@ INCHIHASH_KEY_XTRA2
Definition ichidrp.h:115
@ INCHIHASH_KEY
Definition ichidrp.h:113
@ INCHIHASH_KEY_XTRA1
Definition ichidrp.h:114
@ INCHIHASH_KEY_XTRA1_XTRA2
Definition ichidrp.h:116
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:97
@ INPUT_SDFILE
Definition ichidrp.h:100
@ INPUT_MOLFILE
Definition ichidrp.h:99
@ INPUT_MAX
Definition ichidrp.h:105
@ INPUT_INCHI
Definition ichidrp.h:104
@ INPUT_CMLFILE
Definition ichidrp.h:103
@ INPUT_INCHI_XML
Definition ichidrp.h:101
@ INPUT_INCHI_PLAIN
Definition ichidrp.h:102
@ INPUT_NONE
Definition ichidrp.h:98
enum tagInChIHashCalc INCHI_HASH_CALC
tagTblTypes
Definition ichidrp.h:54
@ itISOTOPIC
Definition ichidrp.h:54
@ itSTEREO
Definition ichidrp.h:54
@ TDP_NUM_PAR
Definition ichidrp.h:54
@ itBASIC
Definition ichidrp.h:54
struct tagInputParms INPUT_PARMS
struct tagReturnedDrawParms RET_DRAW_PARMS
#define TDP_LEN_LBL
Definition ichidrp.h:51
enum tagTblTypes TBL_TYPES
tagFrameShifScheme
Definition ichidrp.h:218
@ FSS_STARS_ENDS_OPENED
Definition ichidrp.h:223
@ FSS_STARS_OPENED
Definition ichidrp.h:222
@ FSS_STARS_CYCLED
Definition ichidrp.h:219
@ FSS_STARS_CYCLED_SORTED
Definition ichidrp.h:221
@ FSS_NONE
Definition ichidrp.h:220
#define MAX_NUM_PATHS
Definition ichidrp.h:93
unsigned short AT_NUMB
Definition ichisize.h:45
unsigned long INCHI_MODE
Definition ichisize.h:60
#define MAX_SDF_HEADER
Definition incomdef.h:52
Definition ichidrp.h:63
unsigned long ulDisplTime
Definition ichidrp.h:65
int bOrigAtom
Definition ichidrp.h:66
TBL_DRAW_PARMS * tdp
Definition ichidrp.h:64
int nFontSize
Definition ichidrp.h:67
Definition ichidrp.h:78
SET_DRAW_PARMS sdp
Definition ichidrp.h:79
RET_DRAW_PARMS rdp
Definition ichidrp.h:80
PER_DRAW_PARMS * pdp
Definition ichidrp.h:81
Definition ichidrp.h:120
int bINChIOutputOptions
Definition ichidrp.h:153
int bMergeAllInputStructures
Definition ichidrp.h:162
long first_struct_number
Definition ichidrp.h:148
int bChiralFlag
Definition ichidrp.h:176
int bCtPredecessors
Definition ichidrp.h:155
int bGetSdfileId
Definition ichidrp.h:165
int bGetMolfileNumber
Definition ichidrp.h:166
int bRing2Chain
Definition ichidrp.h:207
int bCalcInChIHash
Definition ichidrp.h:174
int bNoStructLabels
Definition ichidrp.h:170
long last_struct_number
Definition ichidrp.h:149
int bReadInChIOptions
Definition ichidrp.h:196
int bAllowEmptyStructure
Definition ichidrp.h:177
int bDisplay
Definition ichidrp.h:160
char * pSdfValue
Definition ichidrp.h:123
int bDoNotAddH
Definition ichidrp.h:169
int bNPZz
Definition ichidrp.h:183
long ulDisplTime
Definition ichidrp.h:159
int bLargeMolecules
Definition ichidrp.h:178
int bDisplayEachComponentINChI
Definition ichidrp.h:156
int bCompareComponents
Definition ichidrp.h:167
int bDisplayCompositeResults
Definition ichidrp.h:168
int bSaveAllGoodStructsAsProblem
Definition ichidrp.h:164
int bSaveWarningStructsAsProblem
Definition ichidrp.h:163
int bINChIOutputOptions2
Definition ichidrp.h:154
char * pSdfLabel
Definition ichidrp.h:122
long msec_MaxTime
Definition ichidrp.h:157
INPUT_TYPE nInputType
Definition ichidrp.h:150
int bFilterSS
Definition ichidrp.h:213
int bNoWarnings
Definition ichidrp.h:187
int bMergeHash
Definition ichidrp.h:186
int bFoldPolymerSRU
Definition ichidrp.h:181
const char * path[MAX_NUM_PATHS]
Definition ichidrp.h:146
long msec_LeftTime
Definition ichidrp.h:158
int bFrameShiftScheme
Definition ichidrp.h:182
int bDisplayIfRestoreWarnings
Definition ichidrp.h:161
int bUnderivatize
Definition ichidrp.h:204
int bIgnoreUnchanged
Definition ichidrp.h:210
int bStereoAtZz
Definition ichidrp.h:184
long lMolfileNumber
Definition ichidrp.h:125
int bHideInChI
Definition ichidrp.h:188
int num_paths
Definition ichidrp.h:147
char szSdfDataHeader[MAX_SDF_HEADER+1]
Definition ichidrp.h:121
int bPolymers
Definition ichidrp.h:180
unsigned long lSdfId
Definition ichidrp.h:124
INCHI_MODE nMode
Definition ichidrp.h:151
int bLooseTSACheck
Definition ichidrp.h:179
int bAbcNumbers
Definition ichidrp.h:152
INCHI_MODE bTautFlags
Definition ichidrp.h:192
int bFixNonUniformDraw
Definition ichidrp.h:172
INCHI_MODE bTautFlagsDone
Definition ichidrp.h:193
Definition ichidrp.h:74
int rcPict[4]
Definition ichidrp.h:75
Definition ichidrp.h:70
int bEsc
Definition ichidrp.h:71
Definition ichidrp.h:56
char ReqShownFound[TDP_NUM_LBL][TDP_NUM_PAR]
Definition ichidrp.h:58
int bDrawTbl
Definition ichidrp.h:60
char ReqShownFoundTxt[TDP_NUM_LBL][TDP_LEN_LBL]
Definition ichidrp.h:57
int nOrientation
Definition ichidrp.h:59