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,107 @@
1
+ //
2
+ // @@ All Rights Reserved @@
3
+ // This file is part of the RDKit.
4
+ // The contents are covered by the terms of the BSD license
5
+ // which is included in the file license.txt, found at the root
6
+ // of the RDKit source tree.
7
+ //
8
+ // Author: Igor Filippov based on the work of David Cosgrove (AstraZeneca)
9
+ //
10
+ // This is a concrete class derived from MolDraw2D that uses RDKit to draw a
11
+ // molecule into a wxDC
12
+
13
+ #include <RDGeneral/export.h>
14
+ #ifndef MOLDRAW2DWX_H
15
+ #define MOLDRAW2DWX_H
16
+
17
+ #include <GraphMol/MolDraw2D/MolDraw2D.h>
18
+ #include <wx/dc.h>
19
+ #include <wx/font.h>
20
+ #include <wx/pen.h>
21
+ #include <wx/colour.h>
22
+ #include <wx/brush.h>
23
+
24
+ // ****************************************************************************
25
+
26
+ namespace RDKit {
27
+
28
+ class RDKIT_MOLDRAW2D_EXPORT MolDraw2Dwx : public MolDraw2D {
29
+ public:
30
+ MolDraw2Dwx(int width, int height, wxDC &dc, int panelWidth = -1,
31
+ int panelHeight = -1)
32
+ : MolDraw2D(width, height, panelWidth, panelHeight), m_dc(dc) {
33
+ // m_dc.SetFont(wxFont(10, wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL,
34
+ // wxFONTWEIGHT_NORMAL));
35
+ }
36
+
37
+ // set font size in molecule coordinate units. That's probably Angstrom for
38
+ // RDKit. It will turned into drawing units using scale_, which might be
39
+ // changed as a result, to make sure things still appear in the window.
40
+
41
+ void setFontSize(double new_size) {
42
+ MolDraw2D::setFontSize(new_size);
43
+ double font_size_in_points = fontSize() * scale();
44
+ wxFont font = m_dc.GetFont();
45
+ // font.SetPointSize(font_size_in_points);
46
+ font.SetPixelSize(wxSize(0, font_size_in_points));
47
+ m_dc.SetFont(font);
48
+ }
49
+
50
+ void setColour(const DrawColour &col) {
51
+ MolDraw2D::setColour(col);
52
+ double r = col.get<0>();
53
+ double g = col.get<1>();
54
+ double b = col.get<2>();
55
+ wxColour colour(r * 255, g * 255, b * 255);
56
+ m_dc.SetTextForeground(colour);
57
+ m_dc.SetPen(wxPen(colour));
58
+ m_dc.SetBrush(wxBrush(colour));
59
+ }
60
+
61
+ void drawLine(const Point2D &cds1, const Point2D &cds2) {
62
+ Point2D c1 = getDrawCoords(cds1);
63
+ Point2D c2 = getDrawCoords(cds2);
64
+ m_dc.DrawLine(c1.x, c1.y, c2.x, c2.y);
65
+ }
66
+
67
+ void drawChar(char c, const Point2D &cds) {
68
+ m_dc.DrawText(wxString(c), cds.x, cds.y);
69
+ }
70
+
71
+ void drawPolygon(const std::vector<Point2D> &cds) {
72
+ PRECONDITION(cds.size() >= 3, "must have at least three points");
73
+ wxPoint lines[cds.size()];
74
+ for (unsigned int i = 0; i < cds.size(); ++i) {
75
+ Point2D c1 = getDrawCoords(cds[i]);
76
+ lines[i] = wxPoint(c1.x, c1.y);
77
+ }
78
+ // FIX: deal with toggling fills
79
+ m_dc.DrawPolygon(cds.size(), lines);
80
+ }
81
+
82
+ void clearDrawing() {
83
+ const wxBrush &brush = m_dc.GetBrush();
84
+ const wxPen &pen = m_dc.GetPen();
85
+ setColour(drawOptions.backgroundColour);
86
+ m_dc.DrawRectangle(0, 0, width(), height());
87
+ m_dc.SetBrush(brush);
88
+ m_dc.SetPen(pen);
89
+ }
90
+
91
+ // using the current scale, work out the size of the label in molecule
92
+ // coordinates
93
+ void getStringSize(const std::string &label, double &label_width,
94
+ double &label_height) const {
95
+ if (m_dc.CanGetTextExtent()) {
96
+ wxCoord width, height;
97
+ m_dc.GetTextExtent(wxString(label), &width, &height);
98
+ label_width = double(width) / scale();
99
+ label_height = double(height) / scale();
100
+ }
101
+ }
102
+
103
+ private:
104
+ wxDC &m_dc;
105
+ };
106
+ } // namespace RDKit
107
+ #endif // MOLDRAW2DWX_H
@@ -0,0 +1,159 @@
1
+ //
2
+ // Copyright (C) 2020 Greg Landrum and T5 Informatics GmbH
3
+ //
4
+ // @@ All Rights Reserved @@
5
+ // This file is part of the RDKit.
6
+ // The contents are covered by the terms of the BSD license
7
+ // which is included in the file license.txt, found at the root
8
+ // of the RDKit source tree.
9
+ //
10
+ #include <RDGeneral/Invariant.h>
11
+
12
+ #include <map>
13
+ #include <boost/lexical_cast.hpp>
14
+ #include <boost/tokenizer.hpp>
15
+ #include <boost/format.hpp>
16
+ #include <algorithm>
17
+
18
+ typedef boost::tokenizer<boost::char_separator<char>> tokenizer;
19
+
20
+ namespace RDKit {
21
+ namespace MolEnumerator {
22
+
23
+ struct LinkNode {
24
+ unsigned int minRep = 0;
25
+ unsigned int maxRep = 0;
26
+ unsigned int nBonds = 0;
27
+ std::vector<std::pair<unsigned int, unsigned int>> bondAtoms;
28
+ };
29
+
30
+ namespace utils {
31
+ inline std::vector<LinkNode> getMolLinkNodes(
32
+ const ROMol &mol, bool strict = true,
33
+ const std::map<unsigned, Atom *> *atomIdxMap = nullptr) {
34
+ std::vector<LinkNode> res;
35
+ std::string pval;
36
+ if (!mol.getPropIfPresent(common_properties::molFileLinkNodes, pval)) {
37
+ return res;
38
+ }
39
+ std::vector<int> mapping;
40
+
41
+ boost::char_separator<char> pipesep("|");
42
+ boost::char_separator<char> spacesep(" ");
43
+ for (auto linknodetext : tokenizer(pval, pipesep)) {
44
+ LinkNode node;
45
+ tokenizer tokens(linknodetext, spacesep);
46
+ std::vector<unsigned int> data;
47
+ try {
48
+ std::transform(tokens.begin(), tokens.end(), std::back_inserter(data),
49
+ [](const std::string &token) -> unsigned int {
50
+ return boost::lexical_cast<unsigned int>(token);
51
+ });
52
+ } catch (boost::bad_lexical_cast &) {
53
+ std::ostringstream errout;
54
+ errout << "Cannot convert values in LINKNODE '" << linknodetext
55
+ << "' to unsigned ints";
56
+ if (strict) {
57
+ throw ValueErrorException(errout.str());
58
+ } else {
59
+ BOOST_LOG(rdWarningLog) << errout.str() << std::endl;
60
+ continue;
61
+ }
62
+ }
63
+ // the second test here is for the atom-pairs defining the bonds
64
+ // data[2] contains the number of bonds
65
+ if (data.size() < 5 || data.size() < 3 + 2 * data[2]) {
66
+ std::ostringstream errout;
67
+ errout << "not enough values in LINKNODE '" << linknodetext << "'";
68
+ if (strict) {
69
+ throw ValueErrorException(errout.str());
70
+ } else {
71
+ BOOST_LOG(rdWarningLog) << errout.str() << std::endl;
72
+ continue;
73
+ }
74
+ }
75
+
76
+ node.minRep = data[0];
77
+ node.maxRep = data[1];
78
+ if (node.minRep == 0 || node.maxRep < node.minRep) {
79
+ std::ostringstream errout;
80
+ errout << "bad counts in LINKNODE '" << linknodetext << "'";
81
+ if (strict) {
82
+ throw ValueErrorException(errout.str());
83
+ } else {
84
+ BOOST_LOG(rdWarningLog) << errout.str() << std::endl;
85
+ continue;
86
+ }
87
+ }
88
+ node.nBonds = data[2];
89
+ if (node.nBonds != 2) {
90
+ if (strict) {
91
+ UNDER_CONSTRUCTION(
92
+ "only link nodes with 2 bonds are currently supported");
93
+ } else {
94
+ BOOST_LOG(rdWarningLog)
95
+ << "only link nodes with 2 bonds are currently supported"
96
+ << std::endl;
97
+ continue;
98
+ }
99
+ }
100
+ // both bonds must start from the same atom:
101
+ if (data[3] != data[5]) {
102
+ std::ostringstream errout;
103
+ errout << "bonds don't start at the same atom for LINKNODE '"
104
+ << linknodetext << "'";
105
+ if (strict) {
106
+ throw ValueErrorException(errout.str());
107
+ } else {
108
+ BOOST_LOG(rdWarningLog) << errout.str() << std::endl;
109
+ continue;
110
+ }
111
+ }
112
+
113
+ if (atomIdxMap) {
114
+ // map the indices back to the original atom numbers
115
+ for (unsigned int i = 3; i <= 6; ++i) {
116
+ const auto aidx = atomIdxMap->find(data[i] - 1);
117
+ if (aidx == atomIdxMap->end()) {
118
+ std::ostringstream errout;
119
+ errout << "atom index " << data[i]
120
+ << " cannot be found in molecule for LINKNODE '"
121
+ << linknodetext << "'";
122
+ if (strict) {
123
+ throw ValueErrorException(errout.str());
124
+ } else {
125
+ BOOST_LOG(rdWarningLog) << errout.str() << std::endl;
126
+ continue;
127
+ }
128
+ } else {
129
+ data[i] = aidx->second->getIdx();
130
+ }
131
+ }
132
+ } else {
133
+ for (unsigned int i = 3; i <= 6; ++i) {
134
+ --data[i];
135
+ }
136
+ }
137
+ node.bondAtoms.push_back(std::make_pair(data[3], data[4]));
138
+ node.bondAtoms.push_back(std::make_pair(data[5], data[6]));
139
+ if (!mol.getBondBetweenAtoms(data[4], data[3]) ||
140
+ !mol.getBondBetweenAtoms(data[6], data[5])) {
141
+ std::ostringstream errout;
142
+ errout << "bond not found between atoms in LINKNODE '" << linknodetext
143
+ << "'";
144
+ if (strict) {
145
+ throw ValueErrorException(errout.str());
146
+ } else {
147
+ BOOST_LOG(rdWarningLog) << errout.str() << std::endl;
148
+ continue;
149
+ }
150
+ }
151
+ res.push_back(std::move(node));
152
+ }
153
+ return res;
154
+ }
155
+
156
+ } // namespace utils
157
+ } // namespace MolEnumerator
158
+
159
+ } // namespace RDKit
@@ -0,0 +1,276 @@
1
+ //
2
+ // Copyright (C) 2020-2021 Greg Landrum and T5 Informatics GmbH
3
+ //
4
+ // @@ All Rights Reserved @@
5
+ // This file is part of the RDKit.
6
+ // The contents are covered by the terms of the BSD license
7
+ // which is included in the file license.txt, found at the root
8
+ // of the RDKit source tree.
9
+ //
10
+ #ifndef RDKIT_MOLENUMERATOR_H
11
+ #define RDKIT_MOLENUMERATOR_H
12
+
13
+ #include <RDGeneral/export.h>
14
+ #include <GraphMol/RDKitBase.h>
15
+ #include <GraphMol/MolBundle.h>
16
+
17
+ #include <vector>
18
+ #include <map>
19
+ #include <string>
20
+ #include <memory>
21
+
22
+ namespace RDKit {
23
+ class ChemicalReaction;
24
+ namespace MolEnumerator {
25
+
26
+ namespace detail {
27
+ extern const std::string idxPropName;
28
+ void preserveOrigIndices(ROMol &mol);
29
+ void removeOrigIndices(ROMol &mol);
30
+ } // namespace detail
31
+
32
+ //! abstract base class for the a molecule enumeration operation
33
+ class RDKIT_MOLENUMERATOR_EXPORT MolEnumeratorOp {
34
+ public:
35
+ MolEnumeratorOp() {}
36
+ virtual ~MolEnumeratorOp() {}
37
+ //! returns a vector of the number of possible variations at variability point
38
+ //! covered by this operation
39
+ virtual std::vector<size_t> getVariationCounts() const = 0;
40
+ //! returns a the molecule corresponding to a particular variation
41
+ /*! which.size() should be equal to the number of variation counts.
42
+ */
43
+ virtual std::unique_ptr<ROMol> operator()(
44
+ const std::vector<size_t> &which) const = 0;
45
+ //! initializes this operation to work on a particular molecule
46
+ virtual void initFromMol(const ROMol &mol) = 0;
47
+ //! polymorphic copy
48
+ virtual std::unique_ptr<MolEnumeratorOp> copy() const = 0;
49
+ };
50
+
51
+ //! Molecule enumeration operation corresponding to position variation bonds
52
+ /*! This uses ATTACH and ENDPTS properties on bonds and requires that the bond
53
+ * has one dummy atom (which will be discarded). The other atom of the bond will
54
+ * be connected to the atoms listed in the ENDPTS property
55
+ */
56
+ class RDKIT_MOLENUMERATOR_EXPORT PositionVariationOp : public MolEnumeratorOp {
57
+ public:
58
+ PositionVariationOp() {}
59
+ PositionVariationOp(const std::shared_ptr<ROMol> mol) : dp_mol(mol) {
60
+ PRECONDITION(mol, "bad molecule");
61
+ initFromMol();
62
+ }
63
+ PositionVariationOp(const ROMol &mol) : dp_mol(new ROMol(mol)) {
64
+ initFromMol();
65
+ }
66
+ PositionVariationOp(const PositionVariationOp &other)
67
+ : dp_mol(other.dp_mol), d_variationPoints(other.d_variationPoints) {}
68
+ PositionVariationOp &operator=(const PositionVariationOp &other) {
69
+ if (&other == this) {
70
+ return *this;
71
+ }
72
+ dp_mol = other.dp_mol;
73
+ d_variationPoints = other.d_variationPoints;
74
+ return *this;
75
+ }
76
+ //! \override
77
+ std::vector<size_t> getVariationCounts() const override;
78
+
79
+ //! \override
80
+ std::unique_ptr<ROMol> operator()(
81
+ const std::vector<size_t> &which) const override;
82
+
83
+ //! \override
84
+ void initFromMol(const ROMol &mol) override;
85
+
86
+ //! \override
87
+ std::unique_ptr<MolEnumeratorOp> copy() const override {
88
+ return std::unique_ptr<MolEnumeratorOp>(new PositionVariationOp(*this));
89
+ }
90
+
91
+ private:
92
+ std::shared_ptr<ROMol> dp_mol{nullptr};
93
+ std::vector<std::pair<unsigned int, std::vector<unsigned int>>>
94
+ d_variationPoints{};
95
+ std::vector<size_t> d_dummiesAtEachPoint{};
96
+ void initFromMol();
97
+ };
98
+
99
+ //! Molecule enumeration operation corresponding to LINKNODES
100
+ /*!
101
+ */
102
+ class RDKIT_MOLENUMERATOR_EXPORT LinkNodeOp : public MolEnumeratorOp {
103
+ public:
104
+ LinkNodeOp() {}
105
+ LinkNodeOp(const std::shared_ptr<ROMol> mol) : dp_mol(mol) {
106
+ PRECONDITION(mol, "bad molecule");
107
+ initFromMol();
108
+ }
109
+ LinkNodeOp(const ROMol &mol) : dp_mol(new ROMol(mol)) { initFromMol(); }
110
+ LinkNodeOp(const LinkNodeOp &other)
111
+ : dp_mol(other.dp_mol),
112
+ dp_frame(other.dp_frame),
113
+ d_countAtEachPoint(other.d_countAtEachPoint),
114
+ d_variations(other.d_variations),
115
+ d_pointRanges(other.d_pointRanges),
116
+ d_isotopeMap(other.d_isotopeMap),
117
+ d_atomMap(other.d_atomMap) {}
118
+ LinkNodeOp &operator=(const LinkNodeOp &other) {
119
+ if (&other == this) {
120
+ return *this;
121
+ }
122
+ dp_mol = other.dp_mol;
123
+ dp_frame = other.dp_frame;
124
+ d_countAtEachPoint = other.d_countAtEachPoint;
125
+ d_variations = other.d_variations;
126
+ d_pointRanges = other.d_pointRanges;
127
+ d_isotopeMap = other.d_isotopeMap;
128
+ d_atomMap = other.d_atomMap;
129
+ return *this;
130
+ }
131
+ //! \override
132
+ std::vector<size_t> getVariationCounts() const override;
133
+
134
+ //! \override
135
+ std::unique_ptr<ROMol> operator()(
136
+ const std::vector<size_t> &which) const override;
137
+
138
+ //! \override
139
+ void initFromMol(const ROMol &mol) override;
140
+
141
+ //! \override
142
+ std::unique_ptr<MolEnumeratorOp> copy() const override {
143
+ return std::unique_ptr<MolEnumeratorOp>(new LinkNodeOp(*this));
144
+ }
145
+
146
+ private:
147
+ std::shared_ptr<ROMol> dp_mol{nullptr};
148
+ std::shared_ptr<RWMol> dp_frame{nullptr};
149
+ std::vector<size_t> d_countAtEachPoint{};
150
+ std::vector<std::tuple<unsigned, unsigned, unsigned>> d_variations;
151
+ std::vector<std::pair<unsigned, unsigned>> d_pointRanges;
152
+ std::map<unsigned, unsigned> d_isotopeMap;
153
+ std::map<unsigned, Atom *> d_atomMap;
154
+
155
+ void initFromMol();
156
+ };
157
+
158
+ //! Molecule enumeration operation corresponding to SRUs
159
+ /*!
160
+ This should be considered a work-in-progress and to be somewhat fragile.
161
+
162
+ Known limitations:
163
+ - Overlapping SRUs, i.e. where one monomer is contained within another, are
164
+ not supported
165
+
166
+ */
167
+ class RDKIT_MOLENUMERATOR_EXPORT RepeatUnitOp : public MolEnumeratorOp {
168
+ public:
169
+ RepeatUnitOp(){};
170
+ RepeatUnitOp(const std::shared_ptr<ROMol> mol) : dp_mol(mol) {
171
+ PRECONDITION(mol, "bad molecule");
172
+ initFromMol();
173
+ };
174
+ RepeatUnitOp(const ROMol &mol) : dp_mol(new ROMol(mol)) { initFromMol(); };
175
+ RepeatUnitOp(const RepeatUnitOp &other)
176
+ : d_defaultRepeatCount(other.d_defaultRepeatCount),
177
+ dp_mol(other.dp_mol),
178
+ dp_frame(other.dp_frame),
179
+ d_repeats(other.d_repeats),
180
+ d_countAtEachPoint(other.d_countAtEachPoint),
181
+ d_variations(other.d_variations),
182
+ d_pointRanges(other.d_pointRanges),
183
+ d_isotopeMap(other.d_isotopeMap),
184
+ d_atomMap(other.d_atomMap){};
185
+ RepeatUnitOp &operator=(const RepeatUnitOp &other) {
186
+ if (&other == this) {
187
+ return *this;
188
+ }
189
+ dp_mol = other.dp_mol;
190
+ dp_frame = other.dp_frame;
191
+ d_repeats = other.d_repeats;
192
+ d_countAtEachPoint = other.d_countAtEachPoint;
193
+ d_variations = other.d_variations;
194
+ d_pointRanges = other.d_pointRanges;
195
+ d_isotopeMap = other.d_isotopeMap;
196
+ d_atomMap = other.d_atomMap;
197
+ d_defaultRepeatCount = other.d_defaultRepeatCount;
198
+ return *this;
199
+ };
200
+ //! \override
201
+ std::vector<size_t> getVariationCounts() const override;
202
+
203
+ //! \override
204
+ std::unique_ptr<ROMol> operator()(
205
+ const std::vector<size_t> &which) const override;
206
+
207
+ //! \override
208
+ void initFromMol(const ROMol &mol) override;
209
+
210
+ //! \override
211
+ std::unique_ptr<MolEnumeratorOp> copy() const override {
212
+ return std::unique_ptr<MolEnumeratorOp>(new RepeatUnitOp(*this));
213
+ }
214
+
215
+ size_t d_defaultRepeatCount =
216
+ 4; //! from mol files we typically don't know the repeat count. This is
217
+ //! what we use instead
218
+ private:
219
+ std::shared_ptr<ROMol> dp_mol{nullptr};
220
+ std::shared_ptr<RWMol> dp_frame{nullptr};
221
+ std::vector<std::shared_ptr<RWMol>> d_repeats;
222
+ std::vector<RWMol> dp_repeatUnits{};
223
+ std::vector<size_t> d_countAtEachPoint{};
224
+ std::vector<unsigned> d_sruOrder{};
225
+ std::vector<std::tuple<unsigned, unsigned, unsigned>> d_variations;
226
+ std::vector<std::pair<unsigned, unsigned>> d_pointRanges;
227
+ std::map<unsigned, unsigned> d_isotopeMap;
228
+ std::map<unsigned, Atom *> d_atomMap;
229
+
230
+ void initFromMol();
231
+ };
232
+
233
+ //! Parameters used to control the molecule enumeration
234
+ struct RDKIT_MOLENUMERATOR_EXPORT MolEnumeratorParams {
235
+ bool sanitize = false;
236
+ size_t maxToEnumerate = 1000;
237
+ bool doRandom = false; //< not yet implemented
238
+ int randomSeed = -1; //< not yet implemented
239
+ std::shared_ptr<MolEnumeratorOp> dp_operation;
240
+ };
241
+
242
+ //! Returns a MolBundle containing the molecules resulting from applying the
243
+ //! operators contained in \c paramsLists to \c mol.
244
+ //! the operators are applied in order
245
+ /*!
246
+ NOTE: the current implementation does not support molecules which include
247
+ both LINKNODE and SRU features.
248
+
249
+ */
250
+ RDKIT_MOLENUMERATOR_EXPORT MolBundle
251
+ enumerate(const ROMol &mol, const std::vector<MolEnumeratorParams> &paramsList);
252
+
253
+ //! Returns a MolBundle containing the molecules resulting from applying the
254
+ //! enumerable operators contained in \c mol.
255
+ /*!
256
+ \param maxPerOperation: the maximum number of molecules which an individual
257
+ operation is allowed to generate
258
+
259
+ NOTE: the current implementation does not support molecules which include
260
+ both LINKNODE and SRU features.
261
+
262
+ */
263
+ RDKIT_MOLENUMERATOR_EXPORT MolBundle enumerate(const ROMol &mol,
264
+ size_t maxPerOperation = 0);
265
+
266
+ //! Returns a MolBundle containing the molecules resulting from applying the
267
+ //! operator contained in \c params to \c mol.
268
+ inline MolBundle enumerate(const ROMol &mol,
269
+ const MolEnumeratorParams &params) {
270
+ std::vector<MolEnumeratorParams> v = {params};
271
+ return enumerate(mol, v);
272
+ };
273
+ } // namespace MolEnumerator
274
+ } // namespace RDKit
275
+
276
+ #endif
@@ -0,0 +1,12 @@
1
+ //
2
+ // Copyright (C) 2020 Greg Landrum and other RDKit contributors
3
+ //
4
+ // @@ All Rights Reserved @@
5
+ // This file is part of the RDKit.
6
+ // The contents are covered by the terms of the BSD license
7
+ // which is included in the file license.txt, found at the root
8
+ // of the RDKit source tree.
9
+ //
10
+ #include <RDGeneral/export.h>
11
+ #pragma once
12
+ #include "nmmolhash.h"
@@ -0,0 +1,60 @@
1
+ /*==============================================*/
2
+ /* Copyright (C) 2019 NextMove Software */
3
+ /* All rights reserved. */
4
+ /* */
5
+ /* This file is part of molhash. */
6
+ /* */
7
+ /* The contents are covered by the terms of the */
8
+ /* BSD license, which is included in the file */
9
+ /* license.txt. */
10
+ /*==============================================*/
11
+
12
+ // This file will disappear in a future release; please don't include it
13
+ // directly. Use MolHash.h instead.
14
+
15
+ #include <RDGeneral/export.h>
16
+ #ifndef NMS_MOLHASH_H
17
+ #define NMS_MOLHASH_H
18
+
19
+ #include <string>
20
+ #include <vector>
21
+
22
+ namespace RDKit {
23
+ class RWMol;
24
+ namespace MolHash {
25
+ enum class HashFunction {
26
+ AnonymousGraph = 1,
27
+ ElementGraph = 2,
28
+ CanonicalSmiles = 3,
29
+ MurckoScaffold = 4,
30
+ ExtendedMurcko = 5,
31
+ MolFormula = 6,
32
+ AtomBondCounts = 7,
33
+ DegreeVector = 8,
34
+ Mesomer = 9,
35
+ HetAtomTautomer = 10,
36
+ HetAtomProtomer = 11,
37
+ RedoxPair = 12,
38
+ Regioisomer = 13,
39
+ NetCharge = 14,
40
+ SmallWorldIndexBR = 15,
41
+ SmallWorldIndexBRL = 16,
42
+ ArthorSubstructureOrder = 17
43
+ };
44
+
45
+ RDKIT_MOLHASH_EXPORT std::string MolHash(RWMol *mol, HashFunction func,
46
+ bool useCXSmiles = false);
47
+
48
+ enum class StripType {
49
+ AtomStereo = 1,
50
+ BondStereo = 2,
51
+ Isotope = 4,
52
+ AtomMap = 8,
53
+ Hydrogen = 16
54
+ };
55
+
56
+ RDKIT_MOLHASH_EXPORT void Strip(RWMol *mol, unsigned int striptype);
57
+ RDKIT_MOLHASH_EXPORT void SplitMolecule(RWMol *mol, std::vector<RWMol *> &molv);
58
+ } // namespace MolHash
59
+ } // namespace RDKit
60
+ #endif // NMS_MOLHASH_H