rdkit-headers 2022.3.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. rdkit_headers/__init__.py +13 -0
  2. rdkit_headers/include/rdkit/CIPLabeler/CIPLabeler.h +59 -0
  3. rdkit_headers/include/rdkit/CIPLabeler/TooManyNodesException.h +28 -0
  4. rdkit_headers/include/rdkit/Catalogs/Catalog.h +461 -0
  5. rdkit_headers/include/rdkit/Catalogs/CatalogEntry.h +48 -0
  6. rdkit_headers/include/rdkit/Catalogs/CatalogParams.h +42 -0
  7. rdkit_headers/include/rdkit/ChemicalFeatures/ChemicalFeature.h +38 -0
  8. rdkit_headers/include/rdkit/ChemicalFeatures/FreeChemicalFeature.h +97 -0
  9. rdkit_headers/include/rdkit/DataManip/MetricMatrixCalc/MetricFuncs.h +54 -0
  10. rdkit_headers/include/rdkit/DataManip/MetricMatrixCalc/MetricMatrixCalc.h +106 -0
  11. rdkit_headers/include/rdkit/DataStructs/BitOps.h +337 -0
  12. rdkit_headers/include/rdkit/DataStructs/BitVect.h +68 -0
  13. rdkit_headers/include/rdkit/DataStructs/BitVectUtils.h +35 -0
  14. rdkit_headers/include/rdkit/DataStructs/BitVects.h +25 -0
  15. rdkit_headers/include/rdkit/DataStructs/DatastructsException.h +31 -0
  16. rdkit_headers/include/rdkit/DataStructs/DatastructsStreamOps.h +72 -0
  17. rdkit_headers/include/rdkit/DataStructs/DiscreteDistMat.h +30 -0
  18. rdkit_headers/include/rdkit/DataStructs/DiscreteValueVect.h +146 -0
  19. rdkit_headers/include/rdkit/DataStructs/ExplicitBitVect.h +96 -0
  20. rdkit_headers/include/rdkit/DataStructs/FPBReader.h +281 -0
  21. rdkit_headers/include/rdkit/DataStructs/MultiFPBReader.h +213 -0
  22. rdkit_headers/include/rdkit/DataStructs/SparseBitVect.h +101 -0
  23. rdkit_headers/include/rdkit/DataStructs/SparseIntVect.h +571 -0
  24. rdkit_headers/include/rdkit/DataStructs/base64.h +41 -0
  25. rdkit_headers/include/rdkit/DistGeom/BoundsMatrix.h +121 -0
  26. rdkit_headers/include/rdkit/DistGeom/ChiralSet.h +58 -0
  27. rdkit_headers/include/rdkit/DistGeom/ChiralViolationContrib.h +96 -0
  28. rdkit_headers/include/rdkit/DistGeom/DistGeomUtils.h +195 -0
  29. rdkit_headers/include/rdkit/DistGeom/DistViolationContrib.h +54 -0
  30. rdkit_headers/include/rdkit/DistGeom/FourthDimContrib.h +65 -0
  31. rdkit_headers/include/rdkit/DistGeom/TriangleSmooth.h +36 -0
  32. rdkit_headers/include/rdkit/Features/Feature.h +96 -0
  33. rdkit_headers/include/rdkit/ForceField/Contrib.h +40 -0
  34. rdkit_headers/include/rdkit/ForceField/ForceField.h +253 -0
  35. rdkit_headers/include/rdkit/ForceField/MMFF/AngleBend.h +78 -0
  36. rdkit_headers/include/rdkit/ForceField/MMFF/AngleConstraint.h +64 -0
  37. rdkit_headers/include/rdkit/ForceField/MMFF/BondStretch.h +67 -0
  38. rdkit_headers/include/rdkit/ForceField/MMFF/Contribs.h +26 -0
  39. rdkit_headers/include/rdkit/ForceField/MMFF/DistanceConstraint.h +61 -0
  40. rdkit_headers/include/rdkit/ForceField/MMFF/Nonbonded.h +105 -0
  41. rdkit_headers/include/rdkit/ForceField/MMFF/OopBend.h +65 -0
  42. rdkit_headers/include/rdkit/ForceField/MMFF/Params.h +1134 -0
  43. rdkit_headers/include/rdkit/ForceField/MMFF/PositionConstraint.h +55 -0
  44. rdkit_headers/include/rdkit/ForceField/MMFF/StretchBend.h +70 -0
  45. rdkit_headers/include/rdkit/ForceField/MMFF/TorsionAngle.h +79 -0
  46. rdkit_headers/include/rdkit/ForceField/MMFF/TorsionConstraint.h +70 -0
  47. rdkit_headers/include/rdkit/ForceField/UFF/AngleBend.h +92 -0
  48. rdkit_headers/include/rdkit/ForceField/UFF/AngleConstraint.h +64 -0
  49. rdkit_headers/include/rdkit/ForceField/UFF/BondStretch.h +83 -0
  50. rdkit_headers/include/rdkit/ForceField/UFF/Contribs.h +23 -0
  51. rdkit_headers/include/rdkit/ForceField/UFF/DistanceConstraint.h +62 -0
  52. rdkit_headers/include/rdkit/ForceField/UFF/Inversion.h +81 -0
  53. rdkit_headers/include/rdkit/ForceField/UFF/Nonbonded.h +87 -0
  54. rdkit_headers/include/rdkit/ForceField/UFF/Params.h +153 -0
  55. rdkit_headers/include/rdkit/ForceField/UFF/PositionConstraint.h +55 -0
  56. rdkit_headers/include/rdkit/ForceField/UFF/TorsionAngle.h +115 -0
  57. rdkit_headers/include/rdkit/ForceField/UFF/TorsionConstraint.h +70 -0
  58. rdkit_headers/include/rdkit/Geometry/Grid3D.h +55 -0
  59. rdkit_headers/include/rdkit/Geometry/GridUtils.h +64 -0
  60. rdkit_headers/include/rdkit/Geometry/Transform.h +19 -0
  61. rdkit_headers/include/rdkit/Geometry/Transform2D.h +85 -0
  62. rdkit_headers/include/rdkit/Geometry/Transform3D.h +101 -0
  63. rdkit_headers/include/rdkit/Geometry/UniformGrid3D.h +217 -0
  64. rdkit_headers/include/rdkit/Geometry/Utils.h +97 -0
  65. rdkit_headers/include/rdkit/Geometry/point.h +585 -0
  66. rdkit_headers/include/rdkit/GraphMol/Abbreviations/Abbreviations.h +132 -0
  67. rdkit_headers/include/rdkit/GraphMol/Atom.h +449 -0
  68. rdkit_headers/include/rdkit/GraphMol/AtomIterators.h +212 -0
  69. rdkit_headers/include/rdkit/GraphMol/Bond.h +393 -0
  70. rdkit_headers/include/rdkit/GraphMol/BondIterators.h +75 -0
  71. rdkit_headers/include/rdkit/GraphMol/Canon.h +130 -0
  72. rdkit_headers/include/rdkit/GraphMol/ChemReactions/Enumerate/CartesianProduct.h +147 -0
  73. rdkit_headers/include/rdkit/GraphMol/ChemReactions/Enumerate/Enumerate.h +187 -0
  74. rdkit_headers/include/rdkit/GraphMol/ChemReactions/Enumerate/EnumerateBase.h +200 -0
  75. rdkit_headers/include/rdkit/GraphMol/ChemReactions/Enumerate/EnumerateTypes.h +59 -0
  76. rdkit_headers/include/rdkit/GraphMol/ChemReactions/Enumerate/EnumerationPickler.h +60 -0
  77. rdkit_headers/include/rdkit/GraphMol/ChemReactions/Enumerate/EnumerationStrategyBase.h +227 -0
  78. rdkit_headers/include/rdkit/GraphMol/ChemReactions/Enumerate/RandomSample.h +163 -0
  79. rdkit_headers/include/rdkit/GraphMol/ChemReactions/Enumerate/RandomSampleAllBBs.h +184 -0
  80. rdkit_headers/include/rdkit/GraphMol/ChemReactions/PreprocessRxn.h +64 -0
  81. rdkit_headers/include/rdkit/GraphMol/ChemReactions/Reaction.h +491 -0
  82. rdkit_headers/include/rdkit/GraphMol/ChemReactions/ReactionFingerprints.h +147 -0
  83. rdkit_headers/include/rdkit/GraphMol/ChemReactions/ReactionParser.h +274 -0
  84. rdkit_headers/include/rdkit/GraphMol/ChemReactions/ReactionPickler.h +119 -0
  85. rdkit_headers/include/rdkit/GraphMol/ChemReactions/ReactionRunner.h +116 -0
  86. rdkit_headers/include/rdkit/GraphMol/ChemReactions/ReactionUtils.h +74 -0
  87. rdkit_headers/include/rdkit/GraphMol/ChemReactions/SanitizeRxn.h +169 -0
  88. rdkit_headers/include/rdkit/GraphMol/ChemTransforms/ChemTransforms.h +270 -0
  89. rdkit_headers/include/rdkit/GraphMol/ChemTransforms/MolFragmenter.h +120 -0
  90. rdkit_headers/include/rdkit/GraphMol/Chirality.h +137 -0
  91. rdkit_headers/include/rdkit/GraphMol/Conformer.h +183 -0
  92. rdkit_headers/include/rdkit/GraphMol/CoordGen.h +195 -0
  93. rdkit_headers/include/rdkit/GraphMol/Depictor/DepictUtils.h +366 -0
  94. rdkit_headers/include/rdkit/GraphMol/Depictor/EmbeddedFrag.h +544 -0
  95. rdkit_headers/include/rdkit/GraphMol/Depictor/RDDepictor.h +284 -0
  96. rdkit_headers/include/rdkit/GraphMol/Deprotect/Deprotect.h +105 -0
  97. rdkit_headers/include/rdkit/GraphMol/Descriptors/AUTOCORR2D.h +49 -0
  98. rdkit_headers/include/rdkit/GraphMol/Descriptors/AUTOCORR3D.h +51 -0
  99. rdkit_headers/include/rdkit/GraphMol/Descriptors/AtomFeat.h +39 -0
  100. rdkit_headers/include/rdkit/GraphMol/Descriptors/BCUT.h +66 -0
  101. rdkit_headers/include/rdkit/GraphMol/Descriptors/ConnectivityDescriptors.h +211 -0
  102. rdkit_headers/include/rdkit/GraphMol/Descriptors/CoulombMat.h +42 -0
  103. rdkit_headers/include/rdkit/GraphMol/Descriptors/Crippen.h +137 -0
  104. rdkit_headers/include/rdkit/GraphMol/Descriptors/Data3Ddescriptors.h +55 -0
  105. rdkit_headers/include/rdkit/GraphMol/Descriptors/EEM.h +59 -0
  106. rdkit_headers/include/rdkit/GraphMol/Descriptors/GETAWAY.h +51 -0
  107. rdkit_headers/include/rdkit/GraphMol/Descriptors/Lipinski.h +169 -0
  108. rdkit_headers/include/rdkit/GraphMol/Descriptors/MORSE.h +50 -0
  109. rdkit_headers/include/rdkit/GraphMol/Descriptors/MQN.h +47 -0
  110. rdkit_headers/include/rdkit/GraphMol/Descriptors/MolData3Ddescriptors.h +62 -0
  111. rdkit_headers/include/rdkit/GraphMol/Descriptors/MolDescriptors.h +86 -0
  112. rdkit_headers/include/rdkit/GraphMol/Descriptors/MolDescriptors3D.h +25 -0
  113. rdkit_headers/include/rdkit/GraphMol/Descriptors/MolSurf.h +120 -0
  114. rdkit_headers/include/rdkit/GraphMol/Descriptors/PBF.h +60 -0
  115. rdkit_headers/include/rdkit/GraphMol/Descriptors/PMI.h +128 -0
  116. rdkit_headers/include/rdkit/GraphMol/Descriptors/Property.h +123 -0
  117. rdkit_headers/include/rdkit/GraphMol/Descriptors/RDF.h +52 -0
  118. rdkit_headers/include/rdkit/GraphMol/Descriptors/RegisterDescriptor.h +84 -0
  119. rdkit_headers/include/rdkit/GraphMol/Descriptors/USRDescriptor.h +137 -0
  120. rdkit_headers/include/rdkit/GraphMol/Descriptors/WHIM.h +51 -0
  121. rdkit_headers/include/rdkit/GraphMol/DistGeomHelpers/BoundsMatrixBuilder.h +77 -0
  122. rdkit_headers/include/rdkit/GraphMol/DistGeomHelpers/Embedder.h +437 -0
  123. rdkit_headers/include/rdkit/GraphMol/FMCS/FMCS.h +194 -0
  124. rdkit_headers/include/rdkit/GraphMol/FMCS/Graph.h +43 -0
  125. rdkit_headers/include/rdkit/GraphMol/FileParsers/FileParserUtils.h +231 -0
  126. rdkit_headers/include/rdkit/GraphMol/FileParsers/FileParsers.h +399 -0
  127. rdkit_headers/include/rdkit/GraphMol/FileParsers/GeneralFileReader.h +170 -0
  128. rdkit_headers/include/rdkit/GraphMol/FileParsers/MolFileStereochem.h +60 -0
  129. rdkit_headers/include/rdkit/GraphMol/FileParsers/MolSupplier.h +444 -0
  130. rdkit_headers/include/rdkit/GraphMol/FileParsers/MolWriters.h +338 -0
  131. rdkit_headers/include/rdkit/GraphMol/FileParsers/MultithreadedMolSupplier.h +102 -0
  132. rdkit_headers/include/rdkit/GraphMol/FileParsers/MultithreadedSDMolSupplier.h +65 -0
  133. rdkit_headers/include/rdkit/GraphMol/FileParsers/MultithreadedSmilesMolSupplier.h +66 -0
  134. rdkit_headers/include/rdkit/GraphMol/FileParsers/PNGParser.h +203 -0
  135. rdkit_headers/include/rdkit/GraphMol/FileParsers/SequenceParsers.h +117 -0
  136. rdkit_headers/include/rdkit/GraphMol/FileParsers/SequenceWriters.h +47 -0
  137. rdkit_headers/include/rdkit/GraphMol/FilterCatalog/FilterCatalog.h +260 -0
  138. rdkit_headers/include/rdkit/GraphMol/FilterCatalog/FilterCatalogEntry.h +276 -0
  139. rdkit_headers/include/rdkit/GraphMol/FilterCatalog/FilterMatcherBase.h +152 -0
  140. rdkit_headers/include/rdkit/GraphMol/FilterCatalog/FilterMatchers.h +576 -0
  141. rdkit_headers/include/rdkit/GraphMol/FilterCatalog/FunctionalGroupHierarchy.h +52 -0
  142. rdkit_headers/include/rdkit/GraphMol/Fingerprints/AtomPairGenerator.h +188 -0
  143. rdkit_headers/include/rdkit/GraphMol/Fingerprints/AtomPairs.h +268 -0
  144. rdkit_headers/include/rdkit/GraphMol/Fingerprints/FingerprintGenerator.h +372 -0
  145. rdkit_headers/include/rdkit/GraphMol/Fingerprints/FingerprintUtil.h +160 -0
  146. rdkit_headers/include/rdkit/GraphMol/Fingerprints/Fingerprints.h +167 -0
  147. rdkit_headers/include/rdkit/GraphMol/Fingerprints/MACCS.h +32 -0
  148. rdkit_headers/include/rdkit/GraphMol/Fingerprints/MHFP.h +285 -0
  149. rdkit_headers/include/rdkit/GraphMol/Fingerprints/MorganFingerprints.h +210 -0
  150. rdkit_headers/include/rdkit/GraphMol/Fingerprints/MorganGenerator.h +251 -0
  151. rdkit_headers/include/rdkit/GraphMol/Fingerprints/RDKitFPGenerator.h +162 -0
  152. rdkit_headers/include/rdkit/GraphMol/Fingerprints/TopologicalTorsionGenerator.h +127 -0
  153. rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/CrystalFF/TorsionAngleM6.h +72 -0
  154. rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/CrystalFF/TorsionPreferences.h +41 -0
  155. rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/FFConvenience.h +130 -0
  156. rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/MMFF/AtomTyper.h +236 -0
  157. rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/MMFF/Builder.h +141 -0
  158. rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/MMFF/MMFF.h +105 -0
  159. rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/UFF/AtomTyper.h +57 -0
  160. rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/UFF/Builder.h +129 -0
  161. rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/UFF/UFF.h +82 -0
  162. rdkit_headers/include/rdkit/GraphMol/FragCatalog/FragCatGenerator.h +33 -0
  163. rdkit_headers/include/rdkit/GraphMol/FragCatalog/FragCatParams.h +94 -0
  164. rdkit_headers/include/rdkit/GraphMol/FragCatalog/FragCatalogEntry.h +136 -0
  165. rdkit_headers/include/rdkit/GraphMol/FragCatalog/FragCatalogUtils.h +62 -0
  166. rdkit_headers/include/rdkit/GraphMol/FragCatalog/FragFPGenerator.h +38 -0
  167. rdkit_headers/include/rdkit/GraphMol/GenericGroups/GenericGroups.h +301 -0
  168. rdkit_headers/include/rdkit/GraphMol/GraphMol.h +22 -0
  169. rdkit_headers/include/rdkit/GraphMol/MMPA/MMPA.h +81 -0
  170. rdkit_headers/include/rdkit/GraphMol/MolAlign/AlignMolecules.h +183 -0
  171. rdkit_headers/include/rdkit/GraphMol/MolAlign/O3AAlignMolecules.h +354 -0
  172. rdkit_headers/include/rdkit/GraphMol/MolBundle.h +121 -0
  173. rdkit_headers/include/rdkit/GraphMol/MolCatalog/MolCatalog.h +20 -0
  174. rdkit_headers/include/rdkit/GraphMol/MolCatalog/MolCatalogEntry.h +109 -0
  175. rdkit_headers/include/rdkit/GraphMol/MolCatalog/MolCatalogParams.h +40 -0
  176. rdkit_headers/include/rdkit/GraphMol/MolChemicalFeatures/FeatureParser.h +58 -0
  177. rdkit_headers/include/rdkit/GraphMol/MolChemicalFeatures/MolChemicalFeature.h +98 -0
  178. rdkit_headers/include/rdkit/GraphMol/MolChemicalFeatures/MolChemicalFeatureDef.h +68 -0
  179. rdkit_headers/include/rdkit/GraphMol/MolChemicalFeatures/MolChemicalFeatureFactory.h +78 -0
  180. rdkit_headers/include/rdkit/GraphMol/MolDraw2D/MolDraw2D.h +539 -0
  181. rdkit_headers/include/rdkit/GraphMol/MolDraw2D/MolDraw2DHelpers.h +284 -0
  182. rdkit_headers/include/rdkit/GraphMol/MolDraw2D/MolDraw2DJS.h +62 -0
  183. rdkit_headers/include/rdkit/GraphMol/MolDraw2D/MolDraw2DSVG.h +88 -0
  184. rdkit_headers/include/rdkit/GraphMol/MolDraw2D/MolDraw2DUtils.h +179 -0
  185. rdkit_headers/include/rdkit/GraphMol/MolDraw2D/MolDraw2Dwx.h +107 -0
  186. rdkit_headers/include/rdkit/GraphMol/MolEnumerator/LinkNode.h +159 -0
  187. rdkit_headers/include/rdkit/GraphMol/MolEnumerator/MolEnumerator.h +276 -0
  188. rdkit_headers/include/rdkit/GraphMol/MolHash/MolHash.h +12 -0
  189. rdkit_headers/include/rdkit/GraphMol/MolHash/nmmolhash.h +60 -0
  190. rdkit_headers/include/rdkit/GraphMol/MolInterchange/MolInterchange.h +93 -0
  191. rdkit_headers/include/rdkit/GraphMol/MolInterchange/details.h +49 -0
  192. rdkit_headers/include/rdkit/GraphMol/MolOps.h +1016 -0
  193. rdkit_headers/include/rdkit/GraphMol/MolPickler.h +314 -0
  194. rdkit_headers/include/rdkit/GraphMol/MolStandardize/AcidBaseCatalog/AcidBaseCatalogEntry.h +56 -0
  195. rdkit_headers/include/rdkit/GraphMol/MolStandardize/AcidBaseCatalog/AcidBaseCatalogParams.h +65 -0
  196. rdkit_headers/include/rdkit/GraphMol/MolStandardize/AcidBaseCatalog/AcidBaseCatalogUtils.h +37 -0
  197. rdkit_headers/include/rdkit/GraphMol/MolStandardize/Charge.h +145 -0
  198. rdkit_headers/include/rdkit/GraphMol/MolStandardize/Fragment.h +105 -0
  199. rdkit_headers/include/rdkit/GraphMol/MolStandardize/FragmentCatalog/FragmentCatalogEntry.h +60 -0
  200. rdkit_headers/include/rdkit/GraphMol/MolStandardize/FragmentCatalog/FragmentCatalogParams.h +63 -0
  201. rdkit_headers/include/rdkit/GraphMol/MolStandardize/FragmentCatalog/FragmentCatalogUtils.h +35 -0
  202. rdkit_headers/include/rdkit/GraphMol/MolStandardize/Metal.h +73 -0
  203. rdkit_headers/include/rdkit/GraphMol/MolStandardize/MolStandardize.h +178 -0
  204. rdkit_headers/include/rdkit/GraphMol/MolStandardize/Normalize.h +104 -0
  205. rdkit_headers/include/rdkit/GraphMol/MolStandardize/Tautomer.h +428 -0
  206. rdkit_headers/include/rdkit/GraphMol/MolStandardize/TautomerCatalog/TautomerCatalogEntry.h +59 -0
  207. rdkit_headers/include/rdkit/GraphMol/MolStandardize/TautomerCatalog/TautomerCatalogParams.h +69 -0
  208. rdkit_headers/include/rdkit/GraphMol/MolStandardize/TautomerCatalog/TautomerCatalogUtils.h +81 -0
  209. rdkit_headers/include/rdkit/GraphMol/MolStandardize/TransformCatalog/TransformCatalogEntry.h +57 -0
  210. rdkit_headers/include/rdkit/GraphMol/MolStandardize/TransformCatalog/TransformCatalogParams.h +66 -0
  211. rdkit_headers/include/rdkit/GraphMol/MolStandardize/TransformCatalog/TransformCatalogUtils.h +37 -0
  212. rdkit_headers/include/rdkit/GraphMol/MolStandardize/Validate.h +199 -0
  213. rdkit_headers/include/rdkit/GraphMol/MolTransforms/MolTransforms.h +222 -0
  214. rdkit_headers/include/rdkit/GraphMol/MonomerInfo.h +138 -0
  215. rdkit_headers/include/rdkit/GraphMol/PartialCharges/GasteigerCharges.h +27 -0
  216. rdkit_headers/include/rdkit/GraphMol/PartialCharges/GasteigerParams.h +86 -0
  217. rdkit_headers/include/rdkit/GraphMol/PeriodicTable.h +325 -0
  218. rdkit_headers/include/rdkit/GraphMol/QueryAtom.h +161 -0
  219. rdkit_headers/include/rdkit/GraphMol/QueryBond.h +146 -0
  220. rdkit_headers/include/rdkit/GraphMol/QueryOps.h +1110 -0
  221. rdkit_headers/include/rdkit/GraphMol/RDKitBase.h +35 -0
  222. rdkit_headers/include/rdkit/GraphMol/RDKitQueries.h +25 -0
  223. rdkit_headers/include/rdkit/GraphMol/RGroupDecomposition/RGroupDecomp.h +225 -0
  224. rdkit_headers/include/rdkit/GraphMol/ROMol.h +844 -0
  225. rdkit_headers/include/rdkit/GraphMol/RWMol.h +222 -0
  226. rdkit_headers/include/rdkit/GraphMol/ReducedGraphs/ReducedGraphs.h +85 -0
  227. rdkit_headers/include/rdkit/GraphMol/Resonance.h +236 -0
  228. rdkit_headers/include/rdkit/GraphMol/RingInfo.h +274 -0
  229. rdkit_headers/include/rdkit/GraphMol/Rings.h +90 -0
  230. rdkit_headers/include/rdkit/GraphMol/SLNParse/SLNAttribs.h +93 -0
  231. rdkit_headers/include/rdkit/GraphMol/SLNParse/SLNParse.h +70 -0
  232. rdkit_headers/include/rdkit/GraphMol/SLNParse/SLNParseOps.h +328 -0
  233. rdkit_headers/include/rdkit/GraphMol/SanitException.h +120 -0
  234. rdkit_headers/include/rdkit/GraphMol/ScaffoldNetwork/ScaffoldNetwork.h +195 -0
  235. rdkit_headers/include/rdkit/GraphMol/ShapeHelpers/ShapeEncoder.h +73 -0
  236. rdkit_headers/include/rdkit/GraphMol/ShapeHelpers/ShapeUtils.h +279 -0
  237. rdkit_headers/include/rdkit/GraphMol/SmilesParse/SmartsWrite.h +46 -0
  238. rdkit_headers/include/rdkit/GraphMol/SmilesParse/SmilesParse.h +160 -0
  239. rdkit_headers/include/rdkit/GraphMol/SmilesParse/SmilesParseOps.h +53 -0
  240. rdkit_headers/include/rdkit/GraphMol/SmilesParse/SmilesWrite.h +288 -0
  241. rdkit_headers/include/rdkit/GraphMol/SmilesParse/primes.h +18 -0
  242. rdkit_headers/include/rdkit/GraphMol/StereoGroup.h +74 -0
  243. rdkit_headers/include/rdkit/GraphMol/Subgraphs/SubgraphUtils.h +57 -0
  244. rdkit_headers/include/rdkit/GraphMol/Subgraphs/Subgraphs.h +154 -0
  245. rdkit_headers/include/rdkit/GraphMol/SubstanceGroup.h +297 -0
  246. rdkit_headers/include/rdkit/GraphMol/Substruct/SubstructMatch.h +232 -0
  247. rdkit_headers/include/rdkit/GraphMol/Substruct/SubstructUtils.h +44 -0
  248. rdkit_headers/include/rdkit/GraphMol/SubstructLibrary/PatternFactory.h +40 -0
  249. rdkit_headers/include/rdkit/GraphMol/SubstructLibrary/SubstructLibrary.h +951 -0
  250. rdkit_headers/include/rdkit/GraphMol/SubstructLibrary/SubstructLibrarySerialization.h +231 -0
  251. rdkit_headers/include/rdkit/GraphMol/TautomerQuery/TautomerQuery.h +104 -0
  252. rdkit_headers/include/rdkit/GraphMol/Trajectory/Snapshot.h +69 -0
  253. rdkit_headers/include/rdkit/GraphMol/Trajectory/Trajectory.h +105 -0
  254. rdkit_headers/include/rdkit/GraphMol/atomic_data.h +76 -0
  255. rdkit_headers/include/rdkit/GraphMol/details.h +15 -0
  256. rdkit_headers/include/rdkit/GraphMol/new_canon.h +772 -0
  257. rdkit_headers/include/rdkit/Numerics/Alignment/AlignPoints.h +49 -0
  258. rdkit_headers/include/rdkit/Numerics/Conrec.h +203 -0
  259. rdkit_headers/include/rdkit/Numerics/EigenSolvers/PowerEigenSolver.h +68 -0
  260. rdkit_headers/include/rdkit/Numerics/Matrix.h +347 -0
  261. rdkit_headers/include/rdkit/Numerics/Optimizer/BFGSOpt.h +397 -0
  262. rdkit_headers/include/rdkit/Numerics/SquareMatrix.h +89 -0
  263. rdkit_headers/include/rdkit/Numerics/SymmMatrix.h +361 -0
  264. rdkit_headers/include/rdkit/Numerics/Vector.h +327 -0
  265. rdkit_headers/include/rdkit/Query/AndQuery.h +57 -0
  266. rdkit_headers/include/rdkit/Query/EqualityQuery.h +88 -0
  267. rdkit_headers/include/rdkit/Query/GreaterEqualQuery.h +74 -0
  268. rdkit_headers/include/rdkit/Query/GreaterQuery.h +74 -0
  269. rdkit_headers/include/rdkit/Query/LessEqualQuery.h +75 -0
  270. rdkit_headers/include/rdkit/Query/LessQuery.h +74 -0
  271. rdkit_headers/include/rdkit/Query/NullQueryAlgebra.h +86 -0
  272. rdkit_headers/include/rdkit/Query/OrQuery.h +58 -0
  273. rdkit_headers/include/rdkit/Query/Query.h +210 -0
  274. rdkit_headers/include/rdkit/Query/QueryObjects.h +38 -0
  275. rdkit_headers/include/rdkit/Query/RangeQuery.h +116 -0
  276. rdkit_headers/include/rdkit/Query/SetQuery.h +87 -0
  277. rdkit_headers/include/rdkit/Query/XOrQuery.h +63 -0
  278. rdkit_headers/include/rdkit/RDGeneral/BadFileException.h +39 -0
  279. rdkit_headers/include/rdkit/RDGeneral/BoostEndInclude.h +69 -0
  280. rdkit_headers/include/rdkit/RDGeneral/BoostStartInclude.h +95 -0
  281. rdkit_headers/include/rdkit/RDGeneral/ConcurrentQueue.h +132 -0
  282. rdkit_headers/include/rdkit/RDGeneral/Dict.h +350 -0
  283. rdkit_headers/include/rdkit/RDGeneral/Exceptions.h +73 -0
  284. rdkit_headers/include/rdkit/RDGeneral/FileParseException.h +36 -0
  285. rdkit_headers/include/rdkit/RDGeneral/Invariant.h +198 -0
  286. rdkit_headers/include/rdkit/RDGeneral/LocaleSwitcher.h +54 -0
  287. rdkit_headers/include/rdkit/RDGeneral/RDAny.h +217 -0
  288. rdkit_headers/include/rdkit/RDGeneral/RDConfig.h +49 -0
  289. rdkit_headers/include/rdkit/RDGeneral/RDExportMacros.h +40 -0
  290. rdkit_headers/include/rdkit/RDGeneral/RDLog.h +142 -0
  291. rdkit_headers/include/rdkit/RDGeneral/RDProps.h +172 -0
  292. rdkit_headers/include/rdkit/RDGeneral/RDThreads.h +44 -0
  293. rdkit_headers/include/rdkit/RDGeneral/RDValue-doublemagic.h +478 -0
  294. rdkit_headers/include/rdkit/RDGeneral/RDValue-taggedunion.h +518 -0
  295. rdkit_headers/include/rdkit/RDGeneral/RDValue.h +285 -0
  296. rdkit_headers/include/rdkit/RDGeneral/Ranking.h +87 -0
  297. rdkit_headers/include/rdkit/RDGeneral/StreamOps.h +637 -0
  298. rdkit_headers/include/rdkit/RDGeneral/export.h +559 -0
  299. rdkit_headers/include/rdkit/RDGeneral/hanoiSort.h +167 -0
  300. rdkit_headers/include/rdkit/RDGeneral/hash/detail/float_functions.hpp +156 -0
  301. rdkit_headers/include/rdkit/RDGeneral/hash/detail/hash_float.hpp +179 -0
  302. rdkit_headers/include/rdkit/RDGeneral/hash/extensions.hpp +152 -0
  303. rdkit_headers/include/rdkit/RDGeneral/hash/hash.hpp +463 -0
  304. rdkit_headers/include/rdkit/RDGeneral/hash/hash_fwd.hpp +51 -0
  305. rdkit_headers/include/rdkit/RDGeneral/test.h +274 -0
  306. rdkit_headers/include/rdkit/RDGeneral/types.h +401 -0
  307. rdkit_headers/include/rdkit/RDGeneral/utils.h +106 -0
  308. rdkit_headers/include/rdkit/RDGeneral/versions.h +27 -0
  309. rdkit_headers/include/rdkit/RDStreams/streams.h +19 -0
  310. rdkit_headers/include/rdkit/RingDecomposerLib.h +751 -0
  311. rdkit_headers/include/rdkit/SimDivPickers/DistPicker.h +92 -0
  312. rdkit_headers/include/rdkit/SimDivPickers/HierarchicalClusterPicker.h +107 -0
  313. rdkit_headers/include/rdkit/SimDivPickers/LeaderPicker.h +470 -0
  314. rdkit_headers/include/rdkit/SimDivPickers/MaxMinPicker.h +303 -0
  315. rdkit_headers-2022.3.3.dist-info/METADATA +24 -0
  316. rdkit_headers-2022.3.3.dist-info/RECORD +320 -0
  317. rdkit_headers-2022.3.3.dist-info/WHEEL +4 -0
  318. rdkit_headers-2022.3.3.dist-info/entry_points.txt +4 -0
  319. rdkit_headers-2022.3.3.dist-info/licenses/LICENSE +29 -0
  320. rdkit_headers-2022.3.3.dist-info/licenses/NOTICE +5 -0
@@ -0,0 +1,1016 @@
1
+ //
2
+ // Copyright (C) 2001-2021 Greg Landrum and Rational Discovery LLC
3
+ // Copyright (c) 2014, Novartis Institutes for BioMedical Research Inc.
4
+ //
5
+ // @@ All Rights Reserved @@
6
+ // This file is part of the RDKit.
7
+ // The contents are covered by the terms of the BSD license
8
+ // which is included in the file license.txt, found at the root
9
+ // of the RDKit source tree.
10
+ //
11
+ #include <RDGeneral/export.h>
12
+ #ifndef _RD_MOL_OPS_H_
13
+ #define _RD_MOL_OPS_H_
14
+
15
+ #include <vector>
16
+ #include <map>
17
+ #include <list>
18
+ #include <RDGeneral/BoostStartInclude.h>
19
+ #include <boost/smart_ptr.hpp>
20
+ #include <boost/dynamic_bitset.hpp>
21
+ #include <RDGeneral/BoostEndInclude.h>
22
+ #include <RDGeneral/types.h>
23
+ #include "SanitException.h"
24
+
25
+ RDKIT_GRAPHMOL_EXPORT extern const int ci_LOCAL_INF;
26
+ namespace RDKit {
27
+ class ROMol;
28
+ class RWMol;
29
+ class Atom;
30
+ class Bond;
31
+ class Conformer;
32
+ typedef std::vector<double> INVAR_VECT;
33
+ typedef INVAR_VECT::iterator INVAR_VECT_I;
34
+ typedef INVAR_VECT::const_iterator INVAR_VECT_CI;
35
+
36
+ //! \brief Groups a variety of molecular query and transformation operations.
37
+ namespace MolOps {
38
+
39
+ //! return the number of electrons available on an atom to donate for
40
+ /// aromaticity
41
+ /*!
42
+ The result is determined using the default valency, number of lone pairs,
43
+ number of bonds and the formal charge. Note that the atom may not donate
44
+ all of these electrons to a ring for aromaticity (also used in Conjugation
45
+ and hybridization code).
46
+
47
+ \param at the atom of interest
48
+
49
+ \return the number of electrons
50
+ */
51
+ RDKIT_GRAPHMOL_EXPORT int countAtomElec(const Atom *at);
52
+
53
+ //! sums up all atomic formal charges and returns the result
54
+ RDKIT_GRAPHMOL_EXPORT int getFormalCharge(const ROMol &mol);
55
+
56
+ //! returns whether or not the given Atom is involved in a conjugated bond
57
+ RDKIT_GRAPHMOL_EXPORT bool atomHasConjugatedBond(const Atom *at);
58
+
59
+ //! find fragments (disconnected components of the molecular graph)
60
+ /*!
61
+
62
+ \param mol the molecule of interest
63
+ \param mapping used to return the mapping of Atoms->fragments.
64
+ On return \c mapping will be <tt>mol->getNumAtoms()</tt> long
65
+ and will contain the fragment assignment for each Atom
66
+
67
+ \return the number of fragments found.
68
+
69
+ */
70
+ RDKIT_GRAPHMOL_EXPORT unsigned int getMolFrags(const ROMol &mol,
71
+ std::vector<int> &mapping);
72
+ //! find fragments (disconnected components of the molecular graph)
73
+ /*!
74
+
75
+ \param mol the molecule of interest
76
+ \param frags used to return the Atoms in each fragment
77
+ On return \c mapping will be \c numFrags long, and each entry
78
+ will contain the indices of the Atoms in that fragment.
79
+
80
+ \return the number of fragments found.
81
+
82
+ */
83
+ RDKIT_GRAPHMOL_EXPORT unsigned int getMolFrags(
84
+ const ROMol &mol, std::vector<std::vector<int>> &frags);
85
+
86
+ //! splits a molecule into its component fragments
87
+ /// (disconnected components of the molecular graph)
88
+ /*!
89
+
90
+ \param mol the molecule of interest
91
+ \param sanitizeFrags toggles sanitization of the fragments after
92
+ they are built
93
+ \param frags used to return the mapping of Atoms->fragments.
94
+ if provided, \c frags will be <tt>mol->getNumAtoms()</tt> long
95
+ on return and will contain the fragment assignment for each Atom
96
+ \param fragsMolAtomMapping used to return the Atoms in each fragment
97
+ On return \c mapping will be \c numFrags long, and each entry
98
+ will contain the indices of the Atoms in that fragment.
99
+ \param copyConformers toggles copying conformers of the fragments after
100
+ they are built
101
+ \return a vector of the fragments as smart pointers to ROMols
102
+
103
+ */
104
+ RDKIT_GRAPHMOL_EXPORT std::vector<boost::shared_ptr<ROMol>> getMolFrags(
105
+ const ROMol &mol, bool sanitizeFrags = true,
106
+ std::vector<int> *frags = nullptr,
107
+ std::vector<std::vector<int>> *fragsMolAtomMapping = nullptr,
108
+ bool copyConformers = true);
109
+
110
+ //! splits a molecule into pieces based on labels assigned using a query
111
+ /*!
112
+
113
+ \param mol the molecule of interest
114
+ \param query the query used to "label" the molecule for fragmentation
115
+ \param sanitizeFrags toggles sanitization of the fragments after
116
+ they are built
117
+ \param whiteList if provided, only labels in the list will be kept
118
+ \param negateList if true, the white list logic will be inverted: only labels
119
+ not in the list will be kept
120
+
121
+ \return a map of the fragments and their labels
122
+
123
+ */
124
+ template <typename T>
125
+ RDKIT_GRAPHMOL_EXPORT std::map<T, boost::shared_ptr<ROMol>>
126
+ getMolFragsWithQuery(const ROMol &mol, T (*query)(const ROMol &, const Atom *),
127
+ bool sanitizeFrags = true,
128
+ const std::vector<T> *whiteList = nullptr,
129
+ bool negateList = false);
130
+
131
+ #if 0
132
+ //! finds a molecule's minimum spanning tree (MST)
133
+ /*!
134
+ \param mol the molecule of interest
135
+ \param mst used to return the MST as a vector of bond indices
136
+ */
137
+ RDKIT_GRAPHMOL_EXPORT void findSpanningTree(const ROMol &mol,std::vector<int> &mst);
138
+ #endif
139
+
140
+ //! \name Dealing with hydrogens
141
+ //{@
142
+
143
+ //! returns a copy of a molecule with hydrogens added in as explicit Atoms
144
+ /*!
145
+ \param mol the molecule to add Hs to
146
+ \param explicitOnly (optional) if this \c true, only explicit Hs will be
147
+ added
148
+ \param addCoords (optional) If this is true, estimates for the atomic
149
+ coordinates
150
+ of the added Hs will be used.
151
+ \param onlyOnAtoms (optional) if provided, this should be a vector of
152
+ IDs of the atoms that will be considered for H addition.
153
+ \param addResidueInfo (optional) if this is true, add residue info to
154
+ hydrogen atoms (useful for PDB files).
155
+
156
+ \return the new molecule
157
+
158
+ <b>Notes:</b>
159
+ - it makes no sense to use the \c addCoords option if the molecule's
160
+ heavy
161
+ atoms don't already have coordinates.
162
+ - the caller is responsible for <tt>delete</tt>ing the pointer this
163
+ returns.
164
+ */
165
+ RDKIT_GRAPHMOL_EXPORT ROMol *addHs(const ROMol &mol, bool explicitOnly = false,
166
+ bool addCoords = false,
167
+ const UINT_VECT *onlyOnAtoms = nullptr,
168
+ bool addResidueInfo = false);
169
+ //! \overload
170
+ /// modifies the molecule in place
171
+ RDKIT_GRAPHMOL_EXPORT void addHs(RWMol &mol, bool explicitOnly = false,
172
+ bool addCoords = false,
173
+ const UINT_VECT *onlyOnAtoms = nullptr,
174
+ bool addResidueInfo = false);
175
+
176
+ //! Sets Cartesian coordinates for a terminal atom.
177
+ //! Useful for growing an atom off a molecule with sensible
178
+ //! coordinates based on the geometry of the neighbor.
179
+ /*!
180
+ NOTE: this sets appropriate coordinates in all of the molecule's conformers.
181
+ \param mol the molecule the atoms belong to
182
+ \param idx index of the terminal atom whose coordinates are set
183
+ \param otherIdx index of the bonded neighbor atom
184
+ */
185
+
186
+ RDKIT_GRAPHMOL_EXPORT void setTerminalAtomCoords(ROMol &mol, unsigned int idx,
187
+ unsigned int otherIdx);
188
+
189
+ //! returns a copy of a molecule with hydrogens removed
190
+ /*!
191
+ \param mol the molecule to remove Hs from
192
+ \param implicitOnly (optional) if this \c true, only implicit Hs will be
193
+ removed
194
+ \param updateExplicitCount (optional) If this is \c true, when explicit Hs
195
+ are removed
196
+ from the graph, the heavy atom to which they are bound will have its
197
+ counter of
198
+ explicit Hs increased.
199
+ \param sanitize: (optional) If this is \c true, the final molecule will be
200
+ sanitized
201
+
202
+ \return the new molecule
203
+
204
+ <b>Notes:</b>
205
+ - Hydrogens which aren't connected to a heavy atom will not be
206
+ removed. This prevents molecules like <tt>"[H][H]"</tt> from having
207
+ all atoms removed.
208
+ - Labelled hydrogen (e.g. atoms with atomic number=1, but mass > 1),
209
+ will not be removed.
210
+ - two coordinate Hs, like the central H in C[H-]C, will not be removed
211
+ - Hs connected to dummy atoms will not be removed
212
+ - Hs that are part of the definition of double bond Stereochemistry
213
+ will not be removed
214
+ - Hs that are not connected to anything else will not be removed
215
+ - Hs that have a query defined (i.e. hasQuery() returns true) will not
216
+ be removed
217
+
218
+ - the caller is responsible for <tt>delete</tt>ing the pointer this
219
+ returns.
220
+ */
221
+
222
+ RDKIT_GRAPHMOL_EXPORT ROMol *removeHs(const ROMol &mol,
223
+ bool implicitOnly = false,
224
+ bool updateExplicitCount = false,
225
+ bool sanitize = true);
226
+ //! \overload
227
+ /// modifies the molecule in place
228
+ RDKIT_GRAPHMOL_EXPORT void removeHs(RWMol &mol, bool implicitOnly = false,
229
+ bool updateExplicitCount = false,
230
+ bool sanitize = true);
231
+ struct RDKIT_GRAPHMOL_EXPORT RemoveHsParameters {
232
+ bool removeDegreeZero = false; /**< hydrogens that have no bonds */
233
+ bool removeHigherDegrees = false; /**< hydrogens with two (or more) bonds */
234
+ bool removeOnlyHNeighbors =
235
+ false; /**< hydrogens with bonds only to other hydrogens */
236
+ bool removeIsotopes = false; /**< hydrogens with non-default isotopes */
237
+ bool removeAndTrackIsotopes = false; /**< removes hydrogens with non-default
238
+ isotopes and keeps track of the heavy atom the isotopes were attached to in
239
+ the private _isotopicHs atom property, so they are re-added by AddHs() as the
240
+ original isotopes if possible*/
241
+ bool removeDummyNeighbors =
242
+ false; /**< hydrogens with at least one dummy-atom neighbor */
243
+ bool removeDefiningBondStereo =
244
+ false; /**< hydrogens defining bond stereochemistry */
245
+ bool removeWithWedgedBond = true; /**< hydrogens with wedged bonds to them */
246
+ bool removeWithQuery = false; /**< hydrogens with queries defined */
247
+ bool removeMapped = true; /**< mapped hydrogens */
248
+ bool removeInSGroups = false; /**< part of a SubstanceGroup */
249
+ bool showWarnings = true; /**< display warnings for Hs that are not removed */
250
+ bool removeNonimplicit = true; /**< DEPRECATED equivalent of !implicitOnly */
251
+ bool updateExplicitCount =
252
+ false; /**< DEPRECATED equivalent of updateExplicitCount */
253
+ bool removeHydrides = true; /**< Removing Hydrides */
254
+ };
255
+ //! \overload
256
+ /// modifies the molecule in place
257
+ RDKIT_GRAPHMOL_EXPORT void removeHs(RWMol &mol, const RemoveHsParameters &ps,
258
+ bool sanitize = true);
259
+ //! \overload
260
+ /// The caller owns the pointer this returns
261
+ RDKIT_GRAPHMOL_EXPORT ROMol *removeHs(const ROMol &mol,
262
+ const RemoveHsParameters &ps,
263
+ bool sanitize = true);
264
+
265
+ //! removes all Hs from a molecule
266
+ RDKIT_GRAPHMOL_EXPORT void removeAllHs(RWMol &mol, bool sanitize = true);
267
+ //! \overload
268
+ /// The caller owns the pointer this returns
269
+ RDKIT_GRAPHMOL_EXPORT ROMol *removeAllHs(const ROMol &mol,
270
+ bool sanitize = true);
271
+
272
+ //! returns a copy of a molecule with hydrogens removed and added as queries
273
+ //! to the heavy atoms to which they are bound.
274
+ /*!
275
+ This is really intended to be used with molecules that contain QueryAtoms
276
+
277
+ \param mol the molecule to remove Hs from
278
+
279
+ \return the new molecule
280
+
281
+ <b>Notes:</b>
282
+ - Atoms that do not already have hydrogen count queries will have one
283
+ added, other H-related queries will not be touched. Examples:
284
+ - C[H] -> [C;!H0]
285
+ - [C;H1][H] -> [C;H1]
286
+ - [C;H2][H] -> [C;H2]
287
+ - Hydrogens which aren't connected to a heavy atom will not be
288
+ removed. This prevents molecules like <tt>"[H][H]"</tt> from having
289
+ all atoms removed.
290
+ - the caller is responsible for <tt>delete</tt>ing the pointer this
291
+ returns.
292
+ - By default all hydrogens are removed, however if
293
+ mergeUnmappedOnly is true, any hydrogen participating
294
+ in an atom map will be retained
295
+
296
+ */
297
+ RDKIT_GRAPHMOL_EXPORT ROMol *mergeQueryHs(const ROMol &mol,
298
+ bool mergeUnmappedOnly = false);
299
+ //! \overload
300
+ /// modifies the molecule in place
301
+ RDKIT_GRAPHMOL_EXPORT void mergeQueryHs(RWMol &mol,
302
+ bool mergeUnmappedOnly = false);
303
+
304
+ typedef enum {
305
+ ADJUST_IGNORENONE = 0x0,
306
+ ADJUST_IGNORECHAINS = 0x1,
307
+ ADJUST_IGNORERINGS = 0x4,
308
+ ADJUST_IGNOREDUMMIES = 0x2,
309
+ ADJUST_IGNORENONDUMMIES = 0x8,
310
+ ADJUST_IGNOREMAPPED = 0x10,
311
+ ADJUST_IGNOREALL = 0xFFFFFFF
312
+ } AdjustQueryWhichFlags;
313
+
314
+ //! Parameters controlling the behavior of MolOps::adjustQueryProperties
315
+ /*!
316
+
317
+ Note that some of the options here are either directly contradictory or make
318
+ no sense when combined with each other. We generally assume that client code
319
+ is doing something sensible and don't attempt to detect possible conflicts or
320
+ problems.
321
+
322
+ */
323
+ struct RDKIT_GRAPHMOL_EXPORT AdjustQueryParameters {
324
+ bool adjustDegree = true; /**< add degree queries */
325
+ std::uint32_t adjustDegreeFlags = ADJUST_IGNOREDUMMIES | ADJUST_IGNORECHAINS;
326
+
327
+ bool adjustRingCount = false; /**< add ring-count queries */
328
+ std::uint32_t adjustRingCountFlags =
329
+ ADJUST_IGNOREDUMMIES | ADJUST_IGNORECHAINS;
330
+
331
+ bool makeDummiesQueries = true; /**< convert dummy atoms without isotope
332
+ labels to any-atom queries */
333
+
334
+ bool aromatizeIfPossible = true; /**< perceive and set aromaticity */
335
+
336
+ bool makeBondsGeneric =
337
+ false; /**< convert bonds to generic queries (any bonds) */
338
+ std::uint32_t makeBondsGenericFlags = ADJUST_IGNORENONE;
339
+
340
+ bool makeAtomsGeneric =
341
+ false; /**< convert atoms to generic queries (any atoms) */
342
+ std::uint32_t makeAtomsGenericFlags = ADJUST_IGNORENONE;
343
+
344
+ bool adjustHeavyDegree = false; /**< adjust the heavy-atom degree instead of
345
+ overall degree */
346
+ std::uint32_t adjustHeavyDegreeFlags =
347
+ ADJUST_IGNOREDUMMIES | ADJUST_IGNORECHAINS;
348
+
349
+ bool adjustRingChain = false; /**< add ring-chain queries */
350
+ std::uint32_t adjustRingChainFlags = ADJUST_IGNORENONE;
351
+
352
+ bool useStereoCareForBonds =
353
+ false; /**< remove stereochemistry info from double bonds that do not have
354
+ the stereoCare property set */
355
+
356
+ bool adjustConjugatedFiveRings =
357
+ false; /**< sets bond queries in conjugated five-rings to
358
+ SINGLE|DOUBLE|AROMATIC */
359
+
360
+ bool setMDLFiveRingAromaticity =
361
+ false; /**< uses the 5-ring aromaticity behavior of the (former) MDL
362
+ software as documented in the Chemical Representation Guide */
363
+
364
+ bool adjustSingleBondsToDegreeOneNeighbors =
365
+ false; /**< sets single bonds between aromatic or conjugated atoms and
366
+ degree one neighbors to SINGLE|AROMATIC */
367
+
368
+ bool adjustSingleBondsBetweenAromaticAtoms =
369
+ false; /**< sets non-ring single bonds between two aromatic or conjugated
370
+ atoms to SINGLE|AROMATIC */
371
+ //! \brief returns an AdjustQueryParameters object with all adjustments
372
+ //! disabled
373
+ static AdjustQueryParameters noAdjustments() {
374
+ AdjustQueryParameters res;
375
+ res.adjustDegree = false;
376
+ res.makeDummiesQueries = false;
377
+ res.aromatizeIfPossible = false;
378
+ return res;
379
+ }
380
+ AdjustQueryParameters() {}
381
+ };
382
+
383
+ //! updates an AdjustQueryParameters object from a JSON string
384
+ RDKIT_GRAPHMOL_EXPORT void parseAdjustQueryParametersFromJSON(
385
+ MolOps::AdjustQueryParameters &p, const std::string &json);
386
+
387
+ //! returns a copy of a molecule with query properties adjusted
388
+ /*!
389
+ \param mol the molecule to adjust
390
+ \param params controls the adjustments made
391
+
392
+ \return the new molecule, the caller owns the memory
393
+ */
394
+ RDKIT_GRAPHMOL_EXPORT ROMol *adjustQueryProperties(
395
+ const ROMol &mol, const AdjustQueryParameters *params = nullptr);
396
+ //! \overload
397
+ /// modifies the molecule in place
398
+ RDKIT_GRAPHMOL_EXPORT void adjustQueryProperties(
399
+ RWMol &mol, const AdjustQueryParameters *params = nullptr);
400
+
401
+ //! returns a copy of a molecule with the atoms renumbered
402
+ /*!
403
+
404
+ \param mol the molecule to work with
405
+ \param newOrder the new ordering of the atoms (should be numAtoms long)
406
+ for example: if newOrder is [3,2,0,1], then atom 3 in the original
407
+ molecule will be atom 0 in the new one
408
+
409
+ \return the new molecule
410
+
411
+ <b>Notes:</b>
412
+ - the caller is responsible for <tt>delete</tt>ing the pointer this
413
+ returns.
414
+
415
+ */
416
+ RDKIT_GRAPHMOL_EXPORT ROMol *renumberAtoms(
417
+ const ROMol &mol, const std::vector<unsigned int> &newOrder);
418
+
419
+ //@}
420
+
421
+ //! \name Sanitization
422
+ /// {
423
+
424
+ typedef enum {
425
+ SANITIZE_NONE = 0x0,
426
+ SANITIZE_CLEANUP = 0x1,
427
+ SANITIZE_PROPERTIES = 0x2,
428
+ SANITIZE_SYMMRINGS = 0x4,
429
+ SANITIZE_KEKULIZE = 0x8,
430
+ SANITIZE_FINDRADICALS = 0x10,
431
+ SANITIZE_SETAROMATICITY = 0x20,
432
+ SANITIZE_SETCONJUGATION = 0x40,
433
+ SANITIZE_SETHYBRIDIZATION = 0x80,
434
+ SANITIZE_CLEANUPCHIRALITY = 0x100,
435
+ SANITIZE_ADJUSTHS = 0x200,
436
+ SANITIZE_ALL = 0xFFFFFFF
437
+ } SanitizeFlags;
438
+
439
+ //! \brief carries out a collection of tasks for cleaning up a molecule and
440
+ /// ensuring
441
+ //! that it makes "chemical sense"
442
+ /*!
443
+ This functions calls the following in sequence
444
+ -# MolOps::cleanUp()
445
+ -# mol.updatePropertyCache()
446
+ -# MolOps::symmetrizeSSSR()
447
+ -# MolOps::Kekulize()
448
+ -# MolOps::assignRadicals()
449
+ -# MolOps::setAromaticity()
450
+ -# MolOps::setConjugation()
451
+ -# MolOps::setHybridization()
452
+ -# MolOps::cleanupChirality()
453
+ -# MolOps::adjustHs()
454
+
455
+ \param mol : the RWMol to be cleaned
456
+
457
+ \param operationThatFailed : the first (if any) sanitization operation that
458
+ fails is set here.
459
+ The values are taken from the \c SanitizeFlags
460
+ enum. On success, the value is \c
461
+ SanitizeFlags::SANITIZE_NONE
462
+
463
+ \param sanitizeOps : the bits here are used to set which sanitization
464
+ operations are carried out. The elements of the \c
465
+ SanitizeFlags enum define the operations.
466
+
467
+ <b>Notes:</b>
468
+ - If there is a failure in the sanitization, a \c MolSanitizeException
469
+ will be thrown.
470
+ - in general the user of this function should cast the molecule following
471
+ this function to a ROMol, so that new atoms and bonds cannot be added to
472
+ the molecule and screw up the sanitizing that has been done here
473
+ */
474
+ RDKIT_GRAPHMOL_EXPORT void sanitizeMol(RWMol &mol,
475
+ unsigned int &operationThatFailed,
476
+ unsigned int sanitizeOps = SANITIZE_ALL);
477
+ //! \overload
478
+ RDKIT_GRAPHMOL_EXPORT void sanitizeMol(RWMol &mol);
479
+
480
+ //! \brief Identifies chemistry problems (things that don't make chemical
481
+ //! sense) in a molecule
482
+ /*!
483
+ This functions uses the operations in sanitizeMol but does not change
484
+ the input structure and returns a list of the problems encountered instead
485
+ of stopping at the first failure,
486
+
487
+ The problems this looks for come from the sanitization operations:
488
+ -# mol.updatePropertyCache() : Unreasonable valences
489
+ -# MolOps::Kekulize() : Unkekulizable ring systems, aromatic atoms not
490
+ in rings, aromatic bonds to non-aromatic atoms.
491
+
492
+ \param mol : the ROMol to be cleaned
493
+
494
+ \param sanitizeOps : the bits here are used to set which sanitization
495
+ operations are carried out. The elements of the \c
496
+ SanitizeFlags enum define the operations.
497
+
498
+ \return a vector of \c MolSanitizeException values that indicate what
499
+ problems were encountered
500
+
501
+ */
502
+ RDKIT_GRAPHMOL_EXPORT
503
+ std::vector<std::unique_ptr<MolSanitizeException>> detectChemistryProblems(
504
+ const ROMol &mol, unsigned int sanitizeOps = SANITIZE_ALL);
505
+
506
+ //! Possible aromaticity models
507
+ /*!
508
+ - \c AROMATICITY_DEFAULT at the moment always uses \c AROMATICITY_RDKIT
509
+ - \c AROMATICITY_RDKIT is the standard RDKit model (as documented in the RDKit
510
+ Book)
511
+ - \c AROMATICITY_SIMPLE only considers 5- and 6-membered simple rings (it
512
+ does not consider the outer envelope of fused rings)
513
+ - \c AROMATICITY_MDL
514
+ - \c AROMATICITY_CUSTOM uses a caller-provided function
515
+ */
516
+ typedef enum {
517
+ AROMATICITY_DEFAULT = 0x0, ///< future proofing
518
+ AROMATICITY_RDKIT = 0x1,
519
+ AROMATICITY_SIMPLE = 0x2,
520
+ AROMATICITY_MDL = 0x4,
521
+ AROMATICITY_CUSTOM = 0xFFFFFFF ///< use a function
522
+ } AromaticityModel;
523
+
524
+ //! Sets up the aromaticity for a molecule
525
+ /*!
526
+
527
+ This is what happens here:
528
+ -# find all the simple rings by calling the findSSSR function
529
+ -# loop over all the Atoms in each ring and mark them if they are
530
+ candidates
531
+ for aromaticity. A ring atom is a candidate if it can spare electrons
532
+ to the ring and if it's from the first two rows of the periodic table.
533
+ -# based on the candidate atoms, mark the rings to be either candidates
534
+ or non-candidates. A ring is a candidate only if all its atoms are
535
+ candidates
536
+ -# apply Hueckel rule to each of the candidate rings to check if the ring
537
+ can be
538
+ aromatic
539
+
540
+ \param mol the RWMol of interest
541
+ \param model the aromaticity model to use
542
+ \param func a custom function for assigning aromaticity (only used when
543
+ model=\c AROMATICITY_CUSTOM)
544
+
545
+ \return >0 on success, <= 0 otherwise
546
+
547
+ <b>Assumptions:</b>
548
+ - Kekulization has been done (i.e. \c MolOps::Kekulize() has already
549
+ been called)
550
+
551
+ */
552
+ RDKIT_GRAPHMOL_EXPORT int setAromaticity(
553
+ RWMol &mol, AromaticityModel model = AROMATICITY_DEFAULT,
554
+ int (*func)(RWMol &) = nullptr);
555
+
556
+ //! Designed to be called by the sanitizer to handle special cases before
557
+ /// anything is done.
558
+ /*!
559
+
560
+ Currently this:
561
+ - modifies nitro groups, so that the nitrogen does not have an
562
+ unreasonable valence of 5, as follows:
563
+ - the nitrogen gets a positive charge
564
+ - one of the oxygens gets a negative chage and the double bond to
565
+ this oxygen is changed to a single bond The net result is that nitro groups
566
+ can be counted on to be: \c "[N+](=O)[O-]"
567
+ - modifies halogen-oxygen containing species as follows:
568
+ \c [Cl,Br,I](=O)(=O)(=O)O -> [X+3]([O-])([O-])([O-])O
569
+ \c [Cl,Br,I](=O)(=O)O -> [X+3]([O-])([O-])O
570
+ \c [Cl,Br,I](=O)O -> [X+]([O-])O
571
+ - converts the substructure [N,C]=P(=O)-* to [N,C]=[P+](-[O-])-*
572
+
573
+ \param mol the molecule of interest
574
+
575
+ */
576
+ RDKIT_GRAPHMOL_EXPORT void cleanUp(RWMol &mol);
577
+
578
+ //! Called by the sanitizer to assign radical counts to atoms
579
+ RDKIT_GRAPHMOL_EXPORT void assignRadicals(RWMol &mol);
580
+
581
+ //! adjust the number of implicit and explicit Hs for special cases
582
+ /*!
583
+
584
+ Currently this:
585
+ - modifies aromatic nitrogens so that, when appropriate, they have an
586
+ explicit H marked (e.g. so that we get things like \c "c1cc[nH]cc1"
587
+
588
+ \param mol the molecule of interest
589
+
590
+ <b>Assumptions</b>
591
+ - this is called after the molecule has been sanitized,
592
+ aromaticity has been perceived, and the implicit valence of
593
+ everything has been calculated.
594
+
595
+ */
596
+ RDKIT_GRAPHMOL_EXPORT void adjustHs(RWMol &mol);
597
+
598
+ //! Kekulizes the molecule
599
+ /*!
600
+
601
+ \param mol the molecule of interest
602
+
603
+ \param markAtomsBonds if this is set to true, \c isAromatic boolean settings
604
+ on both the Bonds and Atoms are turned to false following the Kekulization,
605
+ otherwise they are left alone in their original state.
606
+
607
+ \param maxBackTracks the maximum number of attempts at back-tracking. The
608
+ algorithm uses a back-tracking procedure to revisit a previous setting of
609
+ double bond if we hit a wall in the kekulization process
610
+
611
+ <b>Notes:</b>
612
+ - even if \c markAtomsBonds is \c false the \c BondType for all aromatic
613
+ bonds will be changed from \c RDKit::Bond::AROMATIC to \c
614
+ RDKit::Bond::SINGLE or RDKit::Bond::DOUBLE during Kekulization.
615
+
616
+ */
617
+ RDKIT_GRAPHMOL_EXPORT void Kekulize(RWMol &mol, bool markAtomsBonds = true,
618
+ unsigned int maxBackTracks = 100);
619
+ //! Kekulizes the molecule if possible. If the kekulization fails the molecule
620
+ //! will not be modified
621
+ /*!
622
+
623
+ \param mol the molecule of interest
624
+
625
+ \param markAtomsBonds if this is set to true, \c isAromatic boolean settings
626
+ on both the Bonds and Atoms are turned to false following the Kekulization,
627
+ otherwise they are left alone in their original state.
628
+
629
+ \param maxBackTracks the maximum number of attempts at back-tracking. The
630
+ algorithm uses a back-tracking procedure to revisit a previous setting of
631
+ double bond if we hit a wall in the kekulization process
632
+
633
+ \returns whether or not the kekulization succeeded
634
+
635
+ <b>Notes:</b>
636
+ - even if \c markAtomsBonds is \c false the \c BondType for all aromatic
637
+ bonds will be changed from \c RDKit::Bond::AROMATIC to \c
638
+ RDKit::Bond::SINGLE or RDKit::Bond::DOUBLE during Kekulization.
639
+
640
+ */
641
+ RDKIT_GRAPHMOL_EXPORT bool KekulizeIfPossible(RWMol &mol,
642
+ bool markAtomsBonds = true,
643
+ unsigned int maxBackTracks = 100);
644
+
645
+ //! flags the molecule's conjugated bonds
646
+ RDKIT_GRAPHMOL_EXPORT void setConjugation(ROMol &mol);
647
+
648
+ //! calculates and sets the hybridization of all a molecule's Stoms
649
+ RDKIT_GRAPHMOL_EXPORT void setHybridization(ROMol &mol);
650
+
651
+ // @}
652
+
653
+ //! \name Ring finding and SSSR
654
+ //@{
655
+
656
+ //! finds a molecule's Smallest Set of Smallest Rings
657
+ /*!
658
+ Currently this implements a modified form of Figueras algorithm
659
+ (JCICS - Vol. 36, No. 5, 1996, 986-991)
660
+
661
+ \param mol the molecule of interest
662
+ \param res used to return the vector of rings. Each entry is a vector with
663
+ atom indices. This information is also stored in the molecule's
664
+ RingInfo structure, so this argument is optional (see overload)
665
+
666
+ \return number of smallest rings found
667
+
668
+ Base algorithm:
669
+ - The original algorithm starts by finding representative degree 2
670
+ nodes.
671
+ - Representative because if a series of deg 2 nodes are found only
672
+ one of them is picked.
673
+ - The smallest ring around each of them is found.
674
+ - The bonds that connect to this degree 2 node are them chopped off,
675
+ yielding
676
+ new deg two nodes
677
+ - The process is repeated on the new deg 2 nodes.
678
+ - If no deg 2 nodes are found, a deg 3 node is picked. The smallest ring
679
+ with it is found. A bond from this is "carefully" (look in the paper)
680
+ selected and chopped, yielding deg 2 nodes. The process is same as
681
+ above once this is done.
682
+
683
+ Our Modifications:
684
+ - If available, more than one smallest ring around a representative deg 2
685
+ node will be computed and stored
686
+ - Typically 3 rings are found around a degree 3 node (when no deg 2s are
687
+ available)
688
+ and all the bond to that node are chopped.
689
+ - The extra rings that were found in this process are removed after all
690
+ the nodes have been covered.
691
+
692
+ These changes were motivated by several factors:
693
+ - We believe the original algorithm fails to find the correct SSSR
694
+ (finds the correct number of them but the wrong ones) on some sample
695
+ mols
696
+ - Since SSSR may not be unique, a post-SSSR step to symmetrize may be
697
+ done. The extra rings this process adds can be quite useful.
698
+ */
699
+ RDKIT_GRAPHMOL_EXPORT int findSSSR(const ROMol &mol,
700
+ std::vector<std::vector<int>> &res);
701
+ //! \overload
702
+ RDKIT_GRAPHMOL_EXPORT int findSSSR(
703
+ const ROMol &mol, std::vector<std::vector<int>> *res = nullptr);
704
+
705
+ //! use a DFS algorithm to identify ring bonds and atoms in a molecule
706
+ /*!
707
+ \b NOTE: though the RingInfo structure is populated by this function,
708
+ the only really reliable calls that can be made are to check if
709
+ mol.getRingInfo().numAtomRings(idx) or mol.getRingInfo().numBondRings(idx)
710
+ return values >0
711
+ */
712
+ RDKIT_GRAPHMOL_EXPORT void fastFindRings(const ROMol &mol);
713
+
714
+ RDKIT_GRAPHMOL_EXPORT void findRingFamilies(const ROMol &mol);
715
+
716
+ //! symmetrize the molecule's Smallest Set of Smallest Rings
717
+ /*!
718
+ SSSR rings obatined from "findSSSR" can be non-unique in some case.
719
+ For example, cubane has five SSSR rings, not six as one would hope.
720
+
721
+ This function adds additional rings to the SSSR list if necessary
722
+ to make the list symmetric, e.g. all atoms in cubane will be part of the
723
+ same number of SSSRs. This function choses these extra rings from the extra
724
+ rings computed and discarded during findSSSR. The new ring are chosen such
725
+ that:
726
+ - replacing a same sized ring in the SSSR list with an extra ring yields
727
+ the same union of bond IDs as the original SSSR list
728
+
729
+ \param mol - the molecule of interest
730
+ \param res used to return the vector of rings. Each entry is a vector with
731
+ atom indices. This information is also stored in the molecule's
732
+ RingInfo structure, so this argument is optional (see overload)
733
+
734
+ \return the total number of rings = (new rings + old SSSRs)
735
+
736
+ <b>Notes:</b>
737
+ - if no SSSR rings are found on the molecule - MolOps::findSSSR() is called
738
+ first
739
+ */
740
+ RDKIT_GRAPHMOL_EXPORT int symmetrizeSSSR(ROMol &mol,
741
+ std::vector<std::vector<int>> &res);
742
+ //! \overload
743
+ RDKIT_GRAPHMOL_EXPORT int symmetrizeSSSR(ROMol &mol);
744
+
745
+ //@}
746
+
747
+ //! \name Shortest paths and other matrices
748
+ //@{
749
+
750
+ //! returns a molecule's adjacency matrix
751
+ /*!
752
+ \param mol the molecule of interest
753
+ \param useBO toggles use of bond orders in the matrix
754
+ \param emptyVal sets the empty value (for non-adjacent atoms)
755
+ \param force forces calculation of the matrix, even if already
756
+ computed
757
+ \param propNamePrefix used to set the cached property name
758
+
759
+ \return the adjacency matrix.
760
+
761
+ <b>Notes</b>
762
+ - The result of this is cached in the molecule's local property
763
+ dictionary, which will handle deallocation. The caller should <b>not</b> \c
764
+ delete this pointer.
765
+
766
+ */
767
+ RDKIT_GRAPHMOL_EXPORT double *getAdjacencyMatrix(
768
+ const ROMol &mol, bool useBO = false, int emptyVal = 0, bool force = false,
769
+ const char *propNamePrefix = nullptr,
770
+ const boost::dynamic_bitset<> *bondsToUse = nullptr);
771
+
772
+ //! Computes the molecule's topological distance matrix
773
+ /*!
774
+ Uses the Floyd-Warshall all-pairs-shortest-paths algorithm.
775
+
776
+ \param mol the molecule of interest
777
+ \param useBO toggles use of bond orders in the matrix
778
+ \param useAtomWts sets the diagonal elements of the result to
779
+ 6.0/(atomic number) so that the matrix can be used to calculate
780
+ Balaban J values. This does not affect the bond weights.
781
+ \param force forces calculation of the matrix, even if already
782
+ computed
783
+ \param propNamePrefix used to set the cached property name
784
+
785
+ \return the distance matrix.
786
+
787
+ <b>Notes</b>
788
+ - The result of this is cached in the molecule's local property
789
+ dictionary, which will handle deallocation. The caller should <b>not</b> \c
790
+ delete this pointer.
791
+
792
+
793
+ */
794
+ RDKIT_GRAPHMOL_EXPORT double *getDistanceMat(
795
+ const ROMol &mol, bool useBO = false, bool useAtomWts = false,
796
+ bool force = false, const char *propNamePrefix = nullptr);
797
+
798
+ //! Computes the molecule's topological distance matrix
799
+ /*!
800
+ Uses the Floyd-Warshall all-pairs-shortest-paths algorithm.
801
+
802
+ \param mol the molecule of interest
803
+ \param activeAtoms only elements corresponding to these atom indices
804
+ will be included in the calculation
805
+ \param bonds only bonds found in this list will be included in the
806
+ calculation
807
+ \param useBO toggles use of bond orders in the matrix
808
+ \param useAtomWts sets the diagonal elements of the result to
809
+ 6.0/(atomic number) so that the matrix can be used to calculate
810
+ Balaban J values. This does not affect the bond weights.
811
+
812
+ \return the distance matrix.
813
+
814
+ <b>Notes</b>
815
+ - The results of this call are not cached, the caller <b>should</b> \c
816
+ delete
817
+ this pointer.
818
+
819
+
820
+ */
821
+ RDKIT_GRAPHMOL_EXPORT double *getDistanceMat(
822
+ const ROMol &mol, const std::vector<int> &activeAtoms,
823
+ const std::vector<const Bond *> &bonds, bool useBO = false,
824
+ bool useAtomWts = false);
825
+
826
+ //! Computes the molecule's 3D distance matrix
827
+ /*!
828
+
829
+ \param mol the molecule of interest
830
+ \param confId the conformer to use
831
+ \param useAtomWts sets the diagonal elements of the result to
832
+ 6.0/(atomic number)
833
+ \param force forces calculation of the matrix, even if already
834
+ computed
835
+ \param propNamePrefix used to set the cached property name
836
+ (if set to an empty string, the matrix will not be
837
+ cached)
838
+
839
+ \return the distance matrix.
840
+
841
+ <b>Notes</b>
842
+ - If propNamePrefix is not empty the result of this is cached in the
843
+ molecule's local property dictionary, which will handle deallocation.
844
+ In other cases the caller is responsible for freeing the memory.
845
+
846
+ */
847
+ RDKIT_GRAPHMOL_EXPORT double *get3DDistanceMat(
848
+ const ROMol &mol, int confId = -1, bool useAtomWts = false,
849
+ bool force = false, const char *propNamePrefix = nullptr);
850
+ //! Find the shortest path between two atoms
851
+ /*!
852
+ Uses the Bellman-Ford algorithm
853
+
854
+ \param mol molecule of interest
855
+ \param aid1 index of the first atom
856
+ \param aid2 index of the second atom
857
+
858
+ \return an std::list with the indices of the atoms along the shortest
859
+ path
860
+
861
+ <b>Notes:</b>
862
+ - the starting and end atoms are included in the path
863
+ - if no path is found, an empty path is returned
864
+
865
+ */
866
+ RDKIT_GRAPHMOL_EXPORT std::list<int> getShortestPath(const ROMol &mol, int aid1,
867
+ int aid2);
868
+
869
+ //@}
870
+
871
+ //! \name Stereochemistry
872
+ //@{
873
+
874
+ //! removes bogus chirality markers (those on non-sp3 centers):
875
+ RDKIT_GRAPHMOL_EXPORT void cleanupChirality(RWMol &mol);
876
+
877
+ //! \brief Uses a conformer to assign ChiralType to a molecule's atoms
878
+ /*!
879
+ \param mol the molecule of interest
880
+ \param confId the conformer to use
881
+ \param replaceExistingTags if this flag is true, any existing atomic chiral
882
+ tags will be replaced
883
+
884
+ If the conformer provided is not a 3D conformer, nothing will be done.
885
+ */
886
+ RDKIT_GRAPHMOL_EXPORT void assignChiralTypesFrom3D(
887
+ ROMol &mol, int confId = -1, bool replaceExistingTags = true);
888
+
889
+ //! \brief Uses a conformer to assign ChiralTypes to a molecule's atoms and
890
+ //! stereo flags to its bonds
891
+ /*!
892
+
893
+ \param mol the molecule of interest
894
+ \param confId the conformer to use
895
+ \param replaceExistingTags if this flag is true, any existing info about
896
+ stereochemistry will be replaced
897
+
898
+ If the conformer provided is not a 3D conformer, nothing will be done.
899
+ */
900
+ RDKIT_GRAPHMOL_EXPORT void assignStereochemistryFrom3D(
901
+ ROMol &mol, int confId = -1, bool replaceExistingTags = true);
902
+
903
+ //! \brief Use bond directions to assign ChiralTypes to a molecule's atoms and
904
+ //! stereo flags to its bonds
905
+ /*!
906
+
907
+ \param mol the molecule of interest
908
+ \param confId the conformer to use
909
+ \param replaceExistingTags if this flag is true, any existing info about
910
+ stereochemistry will be replaced
911
+ */
912
+ RDKIT_GRAPHMOL_EXPORT void assignChiralTypesFromBondDirs(
913
+ ROMol &mol, int confId = -1, bool replaceExistingTags = true);
914
+
915
+ //! \deprecated: this function will be removed in a future release. Use
916
+ //! setDoubleBondNeighborDirections() instead
917
+ RDKIT_GRAPHMOL_EXPORT void detectBondStereochemistry(ROMol &mol,
918
+ int confId = -1);
919
+ //! Sets bond directions based on double bond stereochemistry
920
+ RDKIT_GRAPHMOL_EXPORT void setDoubleBondNeighborDirections(
921
+ ROMol &mol, const Conformer *conf = nullptr);
922
+
923
+ //! Assign CIS/TRANS bond stereochemistry tags based on neighboring directions
924
+ RDKIT_GRAPHMOL_EXPORT void setBondStereoFromDirections(ROMol &mol);
925
+
926
+ //! Assign stereochemistry tags to atoms (i.e. R/S) and bonds (i.e. Z/E)
927
+ /*!
928
+ Does the CIP stereochemistry assignment for the molecule's atoms
929
+ (R/S) and double bond (Z/E). Chiral atoms will have a property
930
+ '_CIPCode' indicating their chiral code.
931
+
932
+ \param mol the molecule to use
933
+ \param cleanIt if true, any existing values of the property `_CIPCode`
934
+ will be cleared, atoms with a chiral specifier that aren't
935
+ actually chiral (e.g. atoms with duplicate
936
+ substituents or only 2 substituents, etc.) will have
937
+ their chiral code set to CHI_UNSPECIFIED. Bonds with
938
+ STEREOCIS/STEREOTRANS specified that have duplicate
939
+ substituents based upon the CIP atom ranks will be
940
+ marked STEREONONE.
941
+ \param force causes the calculation to be repeated even if it has
942
+ already been done
943
+ \param flagPossibleStereoCenters set the _ChiralityPossible property on
944
+ atoms that are possible stereocenters
945
+
946
+ <b>Notes:M</b>
947
+ - Throughout we assume that we're working with a hydrogen-suppressed
948
+ graph.
949
+
950
+ */
951
+ RDKIT_GRAPHMOL_EXPORT void assignStereochemistry(
952
+ ROMol &mol, bool cleanIt = false, bool force = false,
953
+ bool flagPossibleStereoCenters = false);
954
+ //! Removes all stereochemistry information from atoms (i.e. R/S) and bonds
955
+ /// i.e. Z/E)
956
+ /*!
957
+
958
+ \param mol the molecule of interest
959
+ */
960
+ RDKIT_GRAPHMOL_EXPORT void removeStereochemistry(ROMol &mol);
961
+
962
+ //! \brief finds bonds that could be cis/trans in a molecule and mark them as
963
+ //! Bond::STEREOANY.
964
+ /*!
965
+ \param mol the molecule of interest
966
+ \param cleanIt toggles removal of stereo flags from double bonds that can
967
+ not have stereochemistry
968
+
969
+ This function finds any double bonds that can potentially be part of
970
+ a cis/trans system. No attempt is made here to mark them cis or
971
+ trans. No attempt is made to detect double bond stereo in ring systems.
972
+
973
+ This function is useful in the following situations:
974
+ - when parsing a mol file; for the bonds marked here, coordinate
975
+ information on the neighbors can be used to indentify cis or trans states
976
+ - when writing a mol file; bonds that can be cis/trans but not marked as
977
+ either need to be specially marked in the mol file
978
+ - finding double bonds with unspecified stereochemistry so they
979
+ can be enumerated for downstream 3D tools
980
+
981
+ The CIPranks on the neighboring atoms are checked in this function. The
982
+ _CIPCode property if set to any on the double bond.
983
+ */
984
+ RDKIT_GRAPHMOL_EXPORT void findPotentialStereoBonds(ROMol &mol,
985
+ bool cleanIt = false);
986
+ //! \brief Uses the molParity atom property to assign ChiralType to a molecule's
987
+ //! atoms
988
+ /*!
989
+ \param mol the molecule of interest
990
+ \param replaceExistingTags if this flag is true, any existing atomic chiral
991
+ tags will be replaced
992
+ */
993
+ RDKIT_GRAPHMOL_EXPORT void assignChiralTypesFromMolParity(
994
+ ROMol &mol, bool replaceExistingTags = true);
995
+
996
+ //@}
997
+
998
+ //! returns the number of atoms which have a particular property set
999
+ RDKIT_GRAPHMOL_EXPORT unsigned getNumAtomsWithDistinctProperty(
1000
+ const ROMol &mol, std::string prop);
1001
+
1002
+ //! returns whether or not a molecule needs to have Hs added to it.
1003
+ RDKIT_GRAPHMOL_EXPORT bool needsHs(const ROMol &mol);
1004
+
1005
+ namespace details {
1006
+ //! not recommended for use in other code
1007
+ RDKIT_GRAPHMOL_EXPORT void KekulizeFragment(
1008
+ RWMol &mol, const boost::dynamic_bitset<> &atomsToUse,
1009
+ const boost::dynamic_bitset<> &bondsToUse, bool markAtomsBonds = true,
1010
+ unsigned int maxBackTracks = 100);
1011
+ } // namespace details
1012
+
1013
+ } // namespace MolOps
1014
+ } // namespace RDKit
1015
+
1016
+ #endif