1 /* 2 * International Chemical Identifier (InChI) 3 * Version 1 4 * Software version 1.04 5 * September 9, 2011 6 * 7 * The InChI library and programs are free software developed under the 8 * auspices of the International Union of Pure and Applied Chemistry (IUPAC). 9 * Originally developed at NIST. Modifications and additions by IUPAC 10 * and the InChI Trust. 11 * 12 * IUPAC/InChI-Trust Licence for the International Chemical Identifier (InChI) 13 * Software version 1.0. 14 * Copyright (C) IUPAC and InChI Trust Limited 15 * 16 * This library is free software; you can redistribute it and/or modify it under the 17 * terms of the IUPAC/InChI Trust Licence for the International Chemical Identifier 18 * (InChI) Software version 1.0; either version 1.0 of the License, or 19 * (at your option) any later version. 20 * 21 * This library is distributed in the hope that it will be useful, 22 * but WITHOUT ANY WARRANTY; without even the implied warranty of 23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 24 * See the IUPAC/InChI Trust Licence for the International Chemical Identifier (InChI) 25 * Software version 1.0 for more details. 26 * 27 * You should have received a copy of the IUPAC/InChI Trust Licence for the 28 * International Chemical Identifier (InChI) Software version 1.0 along with 29 * this library; if not, write to: 30 * 31 * The InChI Trust 32 * c/o FIZ CHEMIE Berlin 33 * Franklinstrasse 11 34 * 10587 Berlin 35 * GERMANY 36 * 37 */ 38 39 #ifndef __INCHI_DLL_A_H__ 40 #define __INCHI_DLL_A_H__ 41 42 43 44 45 /*^^^ */ 46 47 48 49 50 51 #include "ichicant.h" 52 53 typedef struct tagCOMPONENT_TREAT_INFO 54 { 55 int n1; 56 int n2; 57 int num_atoms; 58 int num_at_tg; 59 int num_deleted_H; 60 int num_deleted_H_taut; 61 INCHI_MODE nMode; 62 T_GROUP_INFO vt_group_info; 63 T_GROUP_INFO vt_group_info_orig; 64 ATOM_SIZES s[TAUT_NUM]; 65 BCN Bcn; 66 int bHasIsotopicAtoms; 67 int bMayHaveStereo; 68 int num_taut_at; 69 70 int bPointedEdgeStereo; 71 int vABParityUnknown; /* actual value of constant for unknown parity (2009-12-10 ) */ 72 73 INCHI_MODE bTautFlags; 74 INCHI_MODE bTautFlagsDone; 75 INCHI_MODE nUserMode; 76 77 sp_ATOM *at[TAUT_NUM]; 78 inp_ATOM *out_at; 79 int fix_isofixedh; /*^^^ 04-12-2008 */ 80 int fix_termhchrg; /*^^^ 07-06-2008 */ 81 82 } COMPONENT_TREAT_INFO; 83 84 typedef struct tagINCHIGEN_CONTROL 85 { 86 87 int init_passed; 88 int norm_passed; 89 int canon_passed; 90 91 INPUT_PARMS InpParms; 92 93 unsigned long ulTotalProcessingTime; 94 char szTitle[MAX_SDF_HEADER+MAX_SDF_VALUE+256]; 95 char *pStr; 96 long num_err; 97 long num_inp; 98 99 100 ORIG_STRUCT OrigStruct; 101 ORIG_ATOM_DATA OrigInpData; 102 103 /*^^^ For the whole structure: */ 104 STRUCT_DATA StructData; 105 106 /*^^^ For each member of pair disconnected/reconnected structures: */ 107 ORIG_ATOM_DATA PrepInpData[INCHI_NUM]; /*^^^ INCHI_NUM=2; 0 disconnected/original 108 1 reconnected */ 109 INP_ATOM_DATA *InpCurAtData[INCHI_NUM]; 110 111 INP_ATOM_DATA *InpNormAtData[INCHI_NUM]; 112 INP_ATOM_DATA *InpNormTautData[INCHI_NUM]; 113 114 COMP_ATOM_DATA composite_norm_data[INCHI_NUM][TAUT_NUM+1]; 115 /*^^^ TAUT_NUM=2; 0 non-tautomeric 116 1 tautomeric 117 2 intermediate tautomeric */ 118 119 NORM_CANON_FLAGS 120 ncFlags; 121 122 /*^^^ For each connected component of structures: */ 123 PINChI2 *pINChI[INCHI_NUM]; 124 PINChI_Aux2 *pINChI_Aux[INCHI_NUM]; 125 126 /*^^^ For each connected component of structures: */ 127 COMPONENT_TREAT_INFO 128 *cti[INCHI_NUM]; 129 130 /*^^^ Placed at the end intentionally */ 131 INCHI_IOSTREAM inchi_file[3]; 132 133 } INCHIGEN_CONTROL; 134 135 136 137 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 138 Exported functions 139 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ 140 141 142 #if (defined( _WIN32 ) && defined( _MSC_VER ) && defined(BUILD_LINK_AS_DLL) ) 143 /* Win32 & MS VC ++, compile and link as a DLL */ 144 #ifdef _USRDLL 145 /* InChI library dll */ 146 #define INCHI_API __declspec(dllexport) 147 #define EXPIMP_TEMPLATE 148 #define INCHI_DECL __stdcall 149 #else 150 /* calling the InChI dll program */ 151 #define INCHI_API __declspec(dllimport) 152 #define EXPIMP_TEMPLATE extern 153 #define INCHI_DECL __stdcall 154 #endif 155 #else 156 /* create a statically linked InChI library or link to an executable */ 157 #define INCHI_API 158 #define EXPIMP_TEMPLATE 159 #define INCHI_DECL 160 #endif 161 162 163 164 /* to compile all InChI code as a C++ code #define COMPILE_ALL_CPP */ 165 #ifndef COMPILE_ALL_CPP 166 #ifdef __cplusplus 167 extern "C" { 168 #endif 169 #endif 170 171 172 173 174 /*^^^ Local functions */ 175 void make_norm_atoms_from_inp_atoms(INCHIGEN_DATA *gendata, INCHIGEN_CONTROL *genctl); 176 177 #ifndef COMPILE_ALL_CPP 178 #ifdef __cplusplus 179 } 180 #endif 181 #endif 182 183 #define PSTR_BUFFER_SIZE 64000 184 #define INCHI_MAX_NUM_ARG 32 185 186 #endif /* __INCHI_DLL_A_H__ */ 187