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 40 #ifndef __INCHINORM_H__ 41 #define __INCHINORM_H__ 42 43 44 #include "mode.h" 45 #include "ichi_bns.h" 46 47 48 #ifndef COMPILE_ALL_CPP 49 #ifdef __cplusplus 50 extern "C" { 51 #endif 52 #endif 53 54 /* main normalization procedure */ 55 int mark_alt_bonds_and_taut_groups (inp_ATOM *at, inp_ATOM *at_fixed_bonds_out, int num_atoms, 56 T_GROUP_INFO *t_group_info, INCHI_MODE *inpbTautFlags, INCHI_MODE *inpbTautFlagsDone); 57 58 int MarkTautomerGroups(inp_ATOM *at, int num_atoms, 59 T_GROUP_INFO *t_group_info, C_GROUP_INFO *c_group_info, 60 struct BalancedNetworkStructure *pBNS, 61 struct BalancedNetworkData *pBD); 62 int MarkChargeGroups(inp_ATOM *at, int num_atoms, 63 C_GROUP_INFO *c_group_info, T_GROUP_INFO *t_group_info, 64 struct BalancedNetworkStructure *pBNS, 65 struct BalancedNetworkData *pBD); 66 int MarkSaltChargeGroups(inp_ATOM *at, int num_atoms, S_GROUP_INFO *s_group_info, 67 T_GROUP_INFO *t_group_info, C_GROUP_INFO *c_group_info, 68 struct BalancedNetworkStructure *pBNS, 69 struct BalancedNetworkData *pBD); 70 int MarkSaltChargeGroups2(inp_ATOM *at, int num_atoms, S_GROUP_INFO *s_group_info, 71 T_GROUP_INFO *t_group_info, C_GROUP_INFO *c_group_info, 72 struct BalancedNetworkStructure *pBNS, 73 struct BalancedNetworkData *pBD); 74 int MergeSaltTautGroups(inp_ATOM *at, int num_atoms, S_GROUP_INFO *s_group_info, 75 T_GROUP_INFO *t_group_info, C_GROUP_INFO *c_group_info, 76 struct BalancedNetworkStructure *pBNS); 77 int MakeIsotopicHGroup(inp_ATOM *at, int num_atoms, S_GROUP_INFO *s_group_info, 78 T_GROUP_INFO *t_group_info); 79 80 int remove_terminal_HDT(int num_atoms, inp_ATOM *at, int bFixTermHChrg); 81 int RemoveExcessiveImplicitH(int num_atoms, int num_removed_H, inp_ATOM *at); 82 int add_DT_to_num_H(int num_atoms, inp_ATOM *at); 83 int MarkRingSystemsInp(inp_ATOM *at, int num_atoms, int start); 84 int free_t_group_info(T_GROUP_INFO *t_group_info); 85 int make_a_copy_of_t_group_info(T_GROUP_INFO *t_group_info, 86 T_GROUP_INFO *t_group_info_orig); 87 int set_tautomer_iso_sort_keys(T_GROUP_INFO *t_group_info); 88 int CountTautomerGroups(sp_ATOM *at, int num_atoms, T_GROUP_INFO *t_group_info); 89 int CountTautomerGroupsInpAt(inp_ATOM *at, int num_atoms, T_GROUP_INFO *t_group_info); 90 int SortTautomerGroupsAndEndpoints(T_GROUP_INFO *t_group_info, 91 int num_atoms, int num_at_tg, AT_RANK *nRank); 92 int FillIsotopicAtLinearCT(int num_atoms, sp_ATOM* at, 93 const AT_RANK *nAtomNumber, 94 AT_ISOTOPIC *LinearCTIsotopic, 95 int nMaxLenLinearCTIsotopic, int *pnLenLinearCTIsotopic); 96 int FillTautLinearCT2(int num_atoms, int num_at_tg, int bIsoTaut, 97 const AT_RANK *nRank, const AT_RANK *nAtomNumber, 98 const AT_RANK *nSymmRank, const AT_RANK *nRankIso, 99 const AT_RANK *nAtomNumberIso, const AT_RANK *nSymmRankIso, 100 AT_TAUTOMER *LinearCTTautomer, 101 int nMaxLenLinearCTTautomer, int *pnLenLinearCTTautomer, 102 AT_ISO_TGROUP *LinearCTIsotopicTautomer, 103 int nMaxLenLinearCTIsotopicTautomer, 104 int *pnLenLinearCTIsotopicTautomer, 105 T_GROUP_INFO *t_group_info); 106 107 108 #ifndef COMPILE_ALL_CPP 109 #ifdef __cplusplus 110 } 111 #endif 112 #endif 113 114 #endif /* __INCHINORM_H__ */ 115