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,13 @@
1
+ """Ships prebuilt rdkit-headers headers for use as a C++ include path."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from pathlib import Path
6
+
7
+ __version__ = "2022.3.3"
8
+ __builder_version__ = "0.1.0"
9
+
10
+
11
+ def get_include() -> Path:
12
+ """Returns path to the bundled rdkit-headers headers."""
13
+ return Path(__file__).parent / "include"
@@ -0,0 +1,59 @@
1
+ //
2
+ //
3
+ // Copyright (C) 2020 Schrödinger, LLC
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
+ #pragma once
12
+
13
+ #include <boost/dynamic_bitset.hpp>
14
+
15
+ #include <RDGeneral/export.h>
16
+
17
+ namespace RDKit {
18
+
19
+ class ROMol;
20
+
21
+ namespace CIPLabeler {
22
+
23
+ /**
24
+ * Calculate Stereochemical labels based on an accurate implementation
25
+ * of the CIP rules.
26
+ *
27
+ * This is a C++ port of https://github.com/SiMolecule/centres, which was
28
+ * originally written by John Mayfield in Java. The original algorithm was
29
+ * described in:
30
+ *
31
+ * Hanson, R. M., Musacchio, S., Mayfield, J. W., Vainio, M. J., Yerin, A.,
32
+ * Redkin, D. Algorithmic Analysis of Cahn--Ingold--Prelog Rules of
33
+ * Stereochemistry: Proposals for Revised Rules and a Guide for Machine
34
+ * Implementation. J. Chem. Inf. Model. 2018, 58, 1755-1765.
35
+ *
36
+ * \param mol - the molecule to be labelled.
37
+ *
38
+ * \note only atoms with chiral tags and double bonds with proper
39
+ * bond directions will be labelled.
40
+ * \note Labels will be stored under the common_properties::_CIPCode
41
+ * property of the relevant atoms/bonds.
42
+ */
43
+ RDKIT_CIPLABELER_EXPORT void assignCIPLabels(ROMol &mol);
44
+
45
+ /**
46
+ * Overload that allows selecting which atoms and/or bonds will be labeled.
47
+ *
48
+ * \param mol - the molecule to be labelled.
49
+ *
50
+ * \param atoms - bitset with the atom indexes to be labeled.
51
+ *
52
+ * \param bonds - bitset with the bond indexes to be labeled.
53
+ *
54
+ */
55
+ RDKIT_CIPLABELER_EXPORT void assignCIPLabels(
56
+ ROMol &mol, const boost::dynamic_bitset<> &atoms,
57
+ const boost::dynamic_bitset<> &bonds);
58
+ } // namespace CIPLabeler
59
+ } // namespace RDKit
@@ -0,0 +1,28 @@
1
+ //
2
+ //
3
+ // Copyright (C) 2020 Schrödinger, LLC
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
+ #pragma once
12
+
13
+ #include <stdexcept>
14
+ #include <string>
15
+
16
+ #include <RDGeneral/export.h>
17
+
18
+ namespace RDKit {
19
+ namespace CIPLabeler {
20
+
21
+ class RDKIT_CIPLABELER_EXPORT TooManyNodesException
22
+ : public std::runtime_error {
23
+ public:
24
+ TooManyNodesException(const std::string &msg) : std::runtime_error(msg) {}
25
+ };
26
+
27
+ } // namespace CIPLabeler
28
+ } // namespace RDKit
@@ -0,0 +1,461 @@
1
+ //
2
+ // Copyright (C) 2003-2006 Rational Discovery LLC
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
+
11
+ #include <RDGeneral/export.h>
12
+ #ifndef RD_CATALOG_H
13
+ #define RD_CATALOG_H
14
+
15
+ // Boost graph stuff
16
+ #include <RDGeneral/BoostStartInclude.h>
17
+ #include <boost/graph/graph_traits.hpp>
18
+ #include <boost/graph/adjacency_list.hpp>
19
+ #include <boost/version.hpp>
20
+ #if BOOST_VERSION >= 104000
21
+ #include <boost/property_map/property_map.hpp>
22
+ #else
23
+ #include <boost/property_map.hpp>
24
+ #endif
25
+ #include <RDGeneral/BoostEndInclude.h>
26
+
27
+ // for some typedefs
28
+ #include <RDGeneral/types.h>
29
+ #include <RDGeneral/StreamOps.h>
30
+
31
+ namespace RDCatalog {
32
+ const int versionMajor = 1;
33
+ const int versionMinor = 0;
34
+ const int versionPatch = 0;
35
+ const int endianId = 0xDEADBEEF;
36
+
37
+ //-----------------------------------------------------------------------------
38
+ //! abstract base class for a catalog object
39
+ template <class entryType, class paramType>
40
+ class Catalog {
41
+ public:
42
+ typedef entryType entryType_t;
43
+ typedef paramType paramType_t;
44
+
45
+ //------------------------------------
46
+ Catalog() : dp_cParams(nullptr) {}
47
+
48
+ //------------------------------------
49
+ virtual ~Catalog() { delete dp_cParams; }
50
+
51
+ //------------------------------------
52
+ //! return a serialized form of the Catalog as an std::string
53
+ virtual std::string Serialize() const = 0;
54
+
55
+ //------------------------------------
56
+ //! adds an entry to the catalog
57
+ /*!
58
+
59
+ \param entry the entry to be added
60
+ \param updateFPLength (optional) if this is true, our internal
61
+ fingerprint length will also be updated.
62
+
63
+ */
64
+ virtual unsigned int addEntry(entryType *entry,
65
+ bool updateFPLength = true) = 0;
66
+
67
+ //------------------------------------
68
+ //! returns a particular entry in the Catalog
69
+ virtual const entryType *getEntryWithIdx(unsigned int idx) const = 0;
70
+
71
+ //------------------------------------
72
+ //! returns the number of entries
73
+ virtual unsigned int getNumEntries() const = 0;
74
+
75
+ //------------------------------------
76
+ //! returns the length of our fingerprint
77
+ unsigned int getFPLength() const { return d_fpLength; }
78
+
79
+ //------------------------------------
80
+ //! sets our fingerprint length
81
+ void setFPLength(unsigned int val) { d_fpLength = val; }
82
+
83
+ //------------------------------------
84
+ //! sets our parameters by copying the \c params argument
85
+ virtual void setCatalogParams(const paramType *params) {
86
+ PRECONDITION(params, "bad parameter object");
87
+ // if we already have a parameter object throw an exception
88
+ PRECONDITION(!dp_cParams,
89
+ "A parameter object already exists on the catalog");
90
+ /*
91
+ if (dp_cParams) {
92
+ // we already have parameter object on the catalog
93
+ // can't overwrite it
94
+ PRECONDITION(0, "A parameter object already exist on the catalog");
95
+ }*/
96
+ dp_cParams = new paramType(*params);
97
+ }
98
+
99
+ //------------------------------------
100
+ //! returns a pointer to our parameters
101
+ const paramType *getCatalogParams() const { return dp_cParams; }
102
+
103
+ protected:
104
+ // this is the ID that will be assigned to the next entry
105
+ // added to the catalog - need not be same as the number of entries
106
+ // in the catalog and does not correspond with the
107
+ // id of the entry in the catalog.
108
+ // this is more along the lines of bitId
109
+ unsigned int d_fpLength{0}; //!< the length of our fingerprint
110
+ paramType *dp_cParams; //!< our params object
111
+ };
112
+
113
+ //-----------------------------------------------------------------------------
114
+ //! A Catalog with a hierarchical structure
115
+ /*!
116
+
117
+ The entries of a HierarchCatalog are arranged in a directed graph
118
+
119
+ <b>The difference between <i>Indices</i> and <i>Bit Ids</i></b>
120
+
121
+ A HierarchCatalog may contain more entries than the user is actually
122
+ interested in. For example a HierarchCatalog constructed to contain
123
+ orders 5 through 8 may well contain information about orders 1-5,
124
+ in order to facilitate some search optimizations.
125
+
126
+ - <i>Bit Ids</i> refer to the "interesting" bits.
127
+ So, in the above example, Bit Id \c 0 will be the first entry
128
+ with order 5.
129
+ - <i>Indices</i> refer to the underlying structure of the catalog.
130
+ So, in the above example, the entry with index \c 0 will be
131
+ the first entry with order 1.
132
+
133
+ */
134
+ template <class entryType, class paramType, class orderType>
135
+ class HierarchCatalog : public Catalog<entryType, paramType> {
136
+ // the entries in the catalog can be traversed using the edges
137
+ // in a desired order
138
+ public:
139
+ //! used by the BGL to set up the node properties in our graph
140
+ struct vertex_entry_t {
141
+ enum { num = 1003 };
142
+ typedef boost::vertex_property_tag kind;
143
+ };
144
+ typedef boost::property<vertex_entry_t, entryType *> EntryProperty;
145
+
146
+ //! the type of the graph itself:
147
+ typedef boost::adjacency_list<
148
+ boost::vecS,
149
+ boost::vecS, // FIX: should be using setS for edges so that parallel
150
+ // edges are never added (page 225 BGL book)
151
+ // but that seems result in compile errors
152
+ boost::bidirectionalS, EntryProperty>
153
+ CatalogGraph;
154
+
155
+ typedef boost::graph_traits<CatalogGraph> CAT_GRAPH_TRAITS;
156
+ typedef typename CAT_GRAPH_TRAITS::vertex_iterator VER_ITER;
157
+ typedef std::pair<VER_ITER, VER_ITER> ENT_ITER_PAIR;
158
+ typedef typename CAT_GRAPH_TRAITS::adjacency_iterator DOWN_ENT_ITER;
159
+ typedef std::pair<DOWN_ENT_ITER, DOWN_ENT_ITER> DOWN_ENT_ITER_PAIR;
160
+
161
+ //------------------------------------
162
+ HierarchCatalog<entryType, paramType, orderType>(){};
163
+
164
+ //------------------------------------
165
+ //! Construct by making a copy of the input \c params object
166
+ HierarchCatalog<entryType, paramType, orderType>(const paramType *params)
167
+ : Catalog<entryType, paramType>() {
168
+ this->setCatalogParams(params);
169
+ }
170
+
171
+ //------------------------------------
172
+ //! Construct from a \c pickle (a serialized form of the HierarchCatalog)
173
+ HierarchCatalog<entryType, paramType, orderType>(const std::string &pickle) {
174
+ this->initFromString(pickle);
175
+ }
176
+
177
+ //------------------------------------
178
+ ~HierarchCatalog() override { destroy(); }
179
+
180
+ //------------------------------------
181
+ //! serializes this object to a stream
182
+ void toStream(std::ostream &ss) const {
183
+ PRECONDITION(this->getCatalogParams(), "NULL parameter object");
184
+
185
+ // the i/o header:
186
+ RDKit::streamWrite(ss, endianId);
187
+ RDKit::streamWrite(ss, versionMajor);
188
+ RDKit::streamWrite(ss, versionMinor);
189
+ RDKit::streamWrite(ss, versionPatch);
190
+
191
+ // information about the catalog itself:
192
+ int tmpUInt;
193
+ tmpUInt = this->getFPLength();
194
+ RDKit::streamWrite(ss, tmpUInt);
195
+ tmpUInt = this->getNumEntries();
196
+ RDKit::streamWrite(ss, tmpUInt);
197
+
198
+ // std::cout << ">>>>-------------------------------" << std::endl;
199
+ // std::cout << "\tlength: " << getFPLength() << " " << getNumEntries() <<
200
+ // std::endl;
201
+
202
+ // add the params object:
203
+ this->getCatalogParams()->toStream(ss);
204
+ // std::cout << "\tparams: " << getCatalogParams()->getLowerFragLength();
205
+ // std::cout << " " << getCatalogParams()->getUpperFragLength();
206
+ // std::cout << " " << getCatalogParams()->getNumFuncGroups();
207
+ // std::cout << std::endl;
208
+
209
+ // write the entries in order:
210
+ for (unsigned int i = 0; i < getNumEntries(); i++) {
211
+ this->getEntryWithIdx(i)->toStream(ss);
212
+ }
213
+
214
+ // finally the adjacency list:
215
+ for (unsigned int i = 0; i < getNumEntries(); i++) {
216
+ RDKit::INT_VECT children = this->getDownEntryList(i);
217
+ tmpUInt = static_cast<unsigned int>(children.size());
218
+ RDKit::streamWrite(ss, tmpUInt);
219
+ for (RDKit::INT_VECT::const_iterator ivci = children.begin();
220
+ ivci != children.end(); ivci++) {
221
+ RDKit::streamWrite(ss, *ivci);
222
+ }
223
+ }
224
+ }
225
+
226
+ //------------------------------------
227
+ //! serializes this object and returns the resulting \c pickle
228
+ std::string Serialize() const override {
229
+ std::stringstream ss(std::ios_base::binary | std::ios_base::out |
230
+ std::ios_base::in);
231
+ this->toStream(ss);
232
+ return ss.str();
233
+ }
234
+
235
+ //------------------------------------
236
+ //! fills the contents of this object from a stream containing a \c pickle
237
+ void initFromStream(std::istream &ss) {
238
+ int tmpInt;
239
+ // FIX: at the moment we ignore the header info:
240
+ RDKit::streamRead(ss, tmpInt);
241
+ RDKit::streamRead(ss, tmpInt);
242
+ RDKit::streamRead(ss, tmpInt);
243
+ RDKit::streamRead(ss, tmpInt);
244
+
245
+ unsigned int tmpUInt;
246
+ RDKit::streamRead(ss, tmpUInt); // fp length
247
+ this->setFPLength(tmpUInt);
248
+
249
+ unsigned int numEntries;
250
+ RDKit::streamRead(ss, numEntries);
251
+ // std::cout << "<<<-------------------------------" << std::endl;
252
+ // std::cout << "\tlength: " << getFPLength() << " " << numEntries <<
253
+ // std::endl;
254
+
255
+ // grab the params:
256
+ paramType *params = new paramType();
257
+ params->initFromStream(ss);
258
+ this->setCatalogParams(params);
259
+ delete params;
260
+
261
+ // std::cout << "\tparams: " << getCatalogParams()->getLowerFragLength();
262
+ // std::cout << " " << getCatalogParams()->getUpperFragLength();
263
+ // std::cout << " " << getCatalogParams()->getNumFuncGroups();
264
+ // std::cout << std::endl;
265
+
266
+ // now all of the entries:
267
+ for (unsigned int i = 0; i < numEntries; i++) {
268
+ entryType *entry = new entryType();
269
+ entry->initFromStream(ss);
270
+ this->addEntry(entry, false);
271
+ }
272
+
273
+ // and, finally, the adjacency list:
274
+ for (unsigned int i = 0; i < numEntries; i++) {
275
+ unsigned int nNeighbors;
276
+ RDKit::streamRead(ss, nNeighbors);
277
+ for (unsigned int j = 0; j < nNeighbors; j++) {
278
+ RDKit::streamRead(ss, tmpInt);
279
+ this->addEdge(i, tmpInt);
280
+ }
281
+ }
282
+ }
283
+
284
+ //------------------------------------
285
+ unsigned int getNumEntries() const override {
286
+ return static_cast<unsigned int>(boost::num_vertices(d_graph));
287
+ }
288
+
289
+ //------------------------------------
290
+ //! fills the contents of this object from a string containing a \c pickle
291
+ void initFromString(const std::string &text) {
292
+ std::stringstream ss(std::ios_base::binary | std::ios_base::out |
293
+ std::ios_base::in);
294
+ // initialize the stream:
295
+ ss.write(text.c_str(), text.length());
296
+ // now start reading out values:
297
+ this->initFromStream(ss);
298
+ }
299
+
300
+ //------------------------------------
301
+ //! add a new entry to the catalog
302
+ /*!
303
+
304
+ \param entry the entry to be added
305
+ \param updateFPLength (optional) if this is true, our internal
306
+ fingerprint length will also be updated.
307
+
308
+ */
309
+ unsigned int addEntry(entryType *entry, bool updateFPLength = true) override {
310
+ PRECONDITION(entry, "bad arguments");
311
+ if (updateFPLength) {
312
+ unsigned int fpl = this->getFPLength();
313
+ entry->setBitId(fpl);
314
+ fpl++;
315
+ this->setFPLength(fpl);
316
+ }
317
+ unsigned int eid = static_cast<unsigned int>(
318
+ boost::add_vertex(EntryProperty(entry), d_graph));
319
+ orderType etype = entry->getOrder();
320
+ // REVIEW: this initialization is not required: the STL map, in
321
+ // theory, will create a new object when operator[] is called
322
+ // for a new item
323
+ if (d_orderMap.find(etype) == d_orderMap.end()) {
324
+ RDKit::INT_VECT nets;
325
+ d_orderMap[etype] = nets;
326
+ }
327
+ d_orderMap[etype].push_back(eid);
328
+ return eid;
329
+ }
330
+
331
+ //------------------------------------
332
+ //! adds an edge between two entries in the catalog
333
+ /*!
334
+ Since we are using a bidirectional graph - the order in
335
+ which the ids are supplied here makes a difference
336
+
337
+ \param id1 index of the edge's beginning
338
+ \param id2 index of the edge's end
339
+
340
+ */
341
+ void addEdge(unsigned int id1, unsigned int id2) {
342
+ unsigned int nents = getNumEntries();
343
+ URANGE_CHECK(id1, nents);
344
+ URANGE_CHECK(id2, nents);
345
+ // FIX: if we boost::setS for the edgeList BGL will
346
+ // do the checking for duplicity (parallel edges)
347
+ // But for reasons unknown setS results in compile
348
+ // errors while using adjacent_vertices.
349
+ typename CAT_GRAPH_TRAITS::edge_descriptor edge;
350
+ bool found;
351
+ boost::tie(edge, found) = boost::edge(boost::vertex(id1, d_graph),
352
+ boost::vertex(id2, d_graph), d_graph);
353
+ if (!found) {
354
+ boost::add_edge(id1, id2, d_graph);
355
+ }
356
+ }
357
+
358
+ //------------------------------------
359
+ //! returns a pointer to our entry with a particular index
360
+ const entryType *getEntryWithIdx(unsigned int idx) const override {
361
+ URANGE_CHECK(idx, getNumEntries());
362
+ int vd = static_cast<int>(boost::vertex(idx, d_graph));
363
+ typename boost::property_map<CatalogGraph, vertex_entry_t>::const_type
364
+ pMap = boost::get(vertex_entry_t(), d_graph);
365
+ return pMap[vd];
366
+ }
367
+
368
+ //------------------------------------
369
+ //! returns a pointer to our entry with a particular bit ID
370
+ const entryType *getEntryWithBitId(unsigned int idx) const {
371
+ URANGE_CHECK(idx, this->getFPLength());
372
+ typename boost::property_map<CatalogGraph, vertex_entry_t>::const_type
373
+ pMap = boost::get(vertex_entry_t(), d_graph);
374
+ const entryType *res = nullptr;
375
+ for (unsigned int i = idx; i < this->getNumEntries(); i++) {
376
+ const entryType *e = pMap[i];
377
+ if (e->getBitId() == static_cast<int>(idx)) {
378
+ res = e;
379
+ break;
380
+ }
381
+ }
382
+ return res;
383
+ }
384
+
385
+ //------------------------------------
386
+ //! returns the index of the entry with a particular bit ID
387
+ int getIdOfEntryWithBitId(unsigned int idx) const {
388
+ URANGE_CHECK(idx, this->getFPLength());
389
+ typename boost::property_map<CatalogGraph, vertex_entry_t>::const_type
390
+ pMap = boost::get(vertex_entry_t(), d_graph);
391
+ int res = -1;
392
+ for (unsigned int i = idx; i < this->getNumEntries(); i++) {
393
+ const entryType *e = pMap[i];
394
+ if (static_cast<unsigned int>(e->getBitId()) == idx) {
395
+ res = i;
396
+ break;
397
+ }
398
+ }
399
+ return res;
400
+ }
401
+
402
+ //------------------------------------
403
+ //! returns a list of the indices of entries below the one passed in
404
+ RDKit::INT_VECT getDownEntryList(unsigned int idx) const {
405
+ RDKit::INT_VECT res;
406
+ DOWN_ENT_ITER nbrIdx, endIdx;
407
+ boost::tie(nbrIdx, endIdx) = boost::adjacent_vertices(idx, d_graph);
408
+ while (nbrIdx != endIdx) {
409
+ res.push_back(static_cast<int>(*nbrIdx));
410
+ nbrIdx++;
411
+ }
412
+ // std::cout << res.size() << "\n";
413
+ return res;
414
+ }
415
+
416
+ //------------------------------------
417
+ //! returns a list of the indices that have a particular order
418
+ const RDKit::INT_VECT &getEntriesOfOrder(orderType ord) {
419
+ return d_orderMap[ord];
420
+ }
421
+
422
+ //------------------------------------
423
+ //! returns a list of the indices that have a particular order
424
+ /*!
425
+ \overload
426
+ */
427
+ const RDKit::INT_VECT &getEntriesOfOrder(orderType ord) const {
428
+ typename std::map<orderType, RDKit::INT_VECT>::const_iterator elem;
429
+ elem = d_orderMap.find(ord);
430
+ CHECK_INVARIANT(
431
+ elem != d_orderMap.end(),
432
+ " catalog does not contain any entries of the order specified");
433
+ return elem->second;
434
+ }
435
+
436
+ private:
437
+ // graphs that store the entries in the catalog in a hierarchical manner
438
+ CatalogGraph d_graph;
439
+ // a map that maps the order type of entries in the catalog to
440
+ // a vector of vertex indices in the graphs above
441
+ // e.g. for a catalog with molecular fragments, the order of a fragment can
442
+ // simply be the number of bond in it. The list this oder maps to is all the
443
+ // vertex ids of these fragment in the catalog that have this many bonds in
444
+ // them
445
+ std::map<orderType, RDKit::INT_VECT> d_orderMap;
446
+
447
+ //------------------------------------
448
+ //! clear any memory that we've used
449
+ void destroy() {
450
+ ENT_ITER_PAIR entItP = boost::vertices(d_graph);
451
+ typename boost::property_map<CatalogGraph, vertex_entry_t>::type pMap =
452
+ boost::get(vertex_entry_t(), d_graph);
453
+ while (entItP.first != entItP.second) {
454
+ delete pMap[*(entItP.first++)];
455
+ }
456
+ }
457
+ };
458
+
459
+ } // namespace RDCatalog
460
+
461
+ #endif
@@ -0,0 +1,48 @@
1
+ //
2
+ // Copyright (C) 2003-2006 Rational Discovery LLC
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
+ #ifndef __RD_CATALOGENTRY_H__
12
+ #define __RD_CATALOGENTRY_H__
13
+
14
+ #include <iostream>
15
+ #include <string>
16
+
17
+ namespace RDCatalog {
18
+
19
+ //! Abstract base class to be used to represent an entry in a Catalog
20
+ class RDKIT_CATALOGS_EXPORT CatalogEntry {
21
+ public:
22
+ virtual ~CatalogEntry() = 0;
23
+
24
+ //! sets our bit Id
25
+ void setBitId(int bid) { d_bitId = bid; }
26
+
27
+ //! returns our bit Id
28
+ int getBitId() const { return d_bitId; }
29
+
30
+ //! returns a text description of this entry
31
+ virtual std::string getDescription() const = 0;
32
+
33
+ //! serializes (pickles) to a stream
34
+ virtual void toStream(std::ostream &ss) const = 0;
35
+ //! returns a string with a serialized (pickled) representation
36
+ virtual std::string Serialize() const = 0;
37
+ //! initializes from a stream pickle
38
+ virtual void initFromStream(std::istream &ss) = 0;
39
+ //! initializes from a string pickle
40
+ virtual void initFromString(const std::string &text) = 0;
41
+
42
+ private:
43
+ int d_bitId; //!< our bit Id. This needs to be signed so that we can mark
44
+ // uninitialized entries.
45
+ };
46
+ } // namespace RDCatalog
47
+
48
+ #endif
@@ -0,0 +1,42 @@
1
+ //
2
+ // Copyright (C) 2003-2006 Rational Discovery LLC
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
+ #ifndef __RD_CATALOGPARAMS_H__
12
+ #define __RD_CATALOGPARAMS_H__
13
+
14
+ #include <string>
15
+
16
+ namespace RDCatalog {
17
+ //! abstract base class for the container used to create a catalog
18
+ class RDKIT_CATALOGS_EXPORT CatalogParams {
19
+ public:
20
+ virtual ~CatalogParams() = 0;
21
+
22
+ //! returns our type string
23
+ std::string getTypeStr() const { return d_typeStr; }
24
+
25
+ //! sets our type string
26
+ void setTypeStr(const std::string &typeStr) { d_typeStr = typeStr; }
27
+
28
+ //! serializes (pickles) to a stream
29
+ virtual void toStream(std::ostream &) const = 0;
30
+ //! returns a string with a serialized (pickled) representation
31
+ virtual std::string Serialize() const = 0;
32
+ //! initializes from a stream pickle
33
+ virtual void initFromStream(std::istream &ss) = 0;
34
+ //! initializes from a string pickle
35
+ virtual void initFromString(const std::string &text) = 0;
36
+
37
+ protected:
38
+ std::string d_typeStr; //!< our type string
39
+ };
40
+ } // namespace RDCatalog
41
+
42
+ #endif
@@ -0,0 +1,38 @@
1
+ //
2
+ // Copyright (C) 2004-2008 Greg Landrum and Rational Discovery LLC
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
+ #ifndef __CHEMICALFEATURE_H_11012005_1310__
12
+ #define __CHEMICALFEATURE_H_11012005_1310__
13
+
14
+ #include <Geometry/point.h>
15
+ namespace ChemicalFeatures {
16
+
17
+ //------------------------------------------------------------------
18
+ //! abstract base class for chemical feature
19
+ class ChemicalFeature {
20
+ public:
21
+ ChemicalFeature() {}
22
+ virtual ~ChemicalFeature() {}
23
+
24
+ // returns the feature id
25
+ virtual int getId() const = 0;
26
+
27
+ // returns the type of the feature
28
+ virtual const std::string& getType() const = 0;
29
+
30
+ // returns the family of the feature
31
+ virtual const std::string& getFamily() const = 0;
32
+
33
+ // returns the position of the feature
34
+ virtual RDGeom::Point3D getPos() const = 0;
35
+ };
36
+ } // namespace ChemicalFeatures
37
+
38
+ #endif