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,231 @@
1
+ //
2
+ // Copyright (C) 2010-2022 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
+ #ifndef RD_FILEPARSERUTILS_H
12
+ #define RD_FILEPARSERUTILS_H
13
+
14
+ #include <string>
15
+ #include <iostream>
16
+ #include <RDGeneral/BoostStartInclude.h>
17
+ #include <boost/lexical_cast.hpp>
18
+ #include <boost/algorithm/string.hpp>
19
+ #include <boost/format.hpp>
20
+ #include <RDGeneral/BoostEndInclude.h>
21
+
22
+ namespace RDKit {
23
+ class RWMol;
24
+ class Conformer;
25
+
26
+ namespace FileParserUtils {
27
+ template <typename T>
28
+ T stripSpacesAndCast(const std::string &input, bool acceptSpaces = false) {
29
+ std::string trimmed = boost::trim_copy(input);
30
+ if (acceptSpaces && trimmed == "") {
31
+ return 0;
32
+ } else {
33
+ return boost::lexical_cast<T>(trimmed);
34
+ }
35
+ }
36
+ RDKIT_FILEPARSERS_EXPORT int toInt(const std::string &input,
37
+ bool acceptSpaces = true);
38
+ RDKIT_FILEPARSERS_EXPORT unsigned int toUnsigned(const std::string &input,
39
+ bool acceptSpaces = true);
40
+ RDKIT_FILEPARSERS_EXPORT double toDouble(const std::string &input,
41
+ bool acceptSpaces = true);
42
+
43
+ // parses info from a V3000 CTAB into a molecule
44
+ RDKIT_FILEPARSERS_EXPORT std::string getV3000CTAB(const ROMol &tmol,
45
+ int confId = -1);
46
+ // reads a line from an MDL v3K CTAB
47
+ RDKIT_FILEPARSERS_EXPORT std::string getV3000Line(std::istream *inStream,
48
+ unsigned int &line);
49
+
50
+ // nAtoms and nBonds are ignored on input, set on output
51
+ RDKIT_FILEPARSERS_EXPORT bool ParseV3000CTAB(
52
+ std::istream *inStream, unsigned int &line, RWMol *mol, Conformer *&conf,
53
+ bool &chiralityPossible, unsigned int &nAtoms, unsigned int &nBonds,
54
+ bool strictParsing = true, bool expectMEND = true);
55
+
56
+ // nAtoms and nBonds are used
57
+ RDKIT_FILEPARSERS_EXPORT bool ParseV2000CTAB(
58
+ std::istream *inStream, unsigned int &line, RWMol *mol, Conformer *&conf,
59
+ bool &chiralityPossible, unsigned int &nAtoms, unsigned int &nBonds,
60
+ bool strictParsing = true);
61
+
62
+ //! finishes up the processing (sanitization, etc.) of a molecule read from
63
+ //! CTAB
64
+ RDKIT_FILEPARSERS_EXPORT void finishMolProcessing(RWMol *res,
65
+ bool chiralityPossible,
66
+ bool sanitize, bool removeHs);
67
+
68
+ //! Deprecated, please use QueryOps::replaceAtomWithQueryAtom instead
69
+ RDKIT_FILEPARSERS_EXPORT Atom *replaceAtomWithQueryAtom(RWMol *mol, Atom *atom);
70
+
71
+ //! applies a particular property to the atoms as an atom property list
72
+ template <typename T>
73
+ void applyMolListPropToAtoms(ROMol &mol, const std::string &pn,
74
+ const std::string &prefix,
75
+ const std::string &missingValueMarker = "n/a") {
76
+ std::string atompn = pn.substr(prefix.size());
77
+ std::string strVect = mol.getProp<std::string>(pn);
78
+ std::vector<std::string> tokens;
79
+ boost::split(tokens, strVect, boost::is_any_of(" \t\n"),
80
+ boost::token_compress_on);
81
+ if (tokens.size() < mol.getNumAtoms()) {
82
+ BOOST_LOG(rdWarningLog)
83
+ << "Property list " << pn << " too short, only " << tokens.size()
84
+ << " elements found. Ignoring it." << std::endl;
85
+ return;
86
+ }
87
+ std::string mv = missingValueMarker;
88
+ size_t first_token = 0;
89
+ if (tokens.size() == mol.getNumAtoms() + 1 && tokens[0].front() == '[' &&
90
+ tokens[0].back() == ']') {
91
+ mv = std::string(tokens[0].begin() + 1, tokens[0].end() - 1);
92
+ first_token = 1;
93
+ }
94
+ if (mv.empty()) {
95
+ BOOST_LOG(rdWarningLog) << "Missing value marker for property " << pn
96
+ << " is empty." << std::endl;
97
+ }
98
+ for (size_t i = first_token; i < tokens.size(); ++i) {
99
+ if (tokens[i] != mv) {
100
+ unsigned int atomid = i - first_token;
101
+ try {
102
+ T apv = boost::lexical_cast<T>(tokens[i]);
103
+ mol.getAtomWithIdx(atomid)->setProp(atompn, apv);
104
+ } catch (const boost::bad_lexical_cast &) {
105
+ BOOST_LOG(rdWarningLog)
106
+ << "Value " << tokens[i] << " for property " << pn << " of atom "
107
+ << atomid << " can not be parsed. Ignoring it." << std::endl;
108
+ }
109
+ }
110
+ }
111
+ }
112
+
113
+ //! applies all properties matching a particular prefix as an atom property
114
+ //! list
115
+ template <typename T>
116
+ void applyMolListPropsToAtoms(ROMol &mol, const std::string &prefix,
117
+ const std::string missingValueMarker = "n/a") {
118
+ for (auto pn : mol.getPropList()) {
119
+ if (pn.find(prefix) == 0 && pn.length() > prefix.length()) {
120
+ applyMolListPropToAtoms<T>(mol, pn, prefix, missingValueMarker);
121
+ }
122
+ }
123
+ }
124
+ static const std::string atomPropPrefix = "atom.";
125
+ //! if the property name matches our rules for atom property lists, we'll
126
+ //! apply it to the atoms
127
+ inline void processMolPropertyList(
128
+ ROMol &mol, const std::string pn,
129
+ const std::string &missingValueMarker = "n/a") {
130
+ if (pn.find(atomPropPrefix) == 0 && pn.length() > atomPropPrefix.length()) {
131
+ std::string prefix = atomPropPrefix + "prop.";
132
+ if (pn.find(prefix) == 0 && pn.length() > prefix.length()) {
133
+ applyMolListPropToAtoms<std::string>(mol, pn, prefix, missingValueMarker);
134
+ } else {
135
+ prefix = atomPropPrefix + "iprop.";
136
+ if (pn.find(prefix) == 0 && pn.length() > prefix.length()) {
137
+ applyMolListPropToAtoms<std::int64_t>(mol, pn, prefix,
138
+ missingValueMarker);
139
+ } else {
140
+ prefix = atomPropPrefix + "dprop.";
141
+ if (pn.find(prefix) == 0 && pn.length() > prefix.length()) {
142
+ applyMolListPropToAtoms<double>(mol, pn, prefix, missingValueMarker);
143
+ } else {
144
+ prefix = atomPropPrefix + "bprop.";
145
+ if (pn.find(prefix) == 0 && pn.length() > prefix.length()) {
146
+ applyMolListPropToAtoms<bool>(mol, pn, prefix, missingValueMarker);
147
+ }
148
+ }
149
+ }
150
+ }
151
+ }
152
+ }
153
+ //! loops over all properties and applies the ones that match the rules for
154
+ //! atom property lists to the atoms
155
+ inline void processMolPropertyLists(
156
+ ROMol &mol, const std::string &missingValueMarker = "n/a") {
157
+ for (auto pn : mol.getPropList()) {
158
+ processMolPropertyList(mol, pn, missingValueMarker);
159
+ }
160
+ }
161
+ template <typename T>
162
+ std::string getAtomPropertyList(ROMol &mol, const std::string &atomPropName,
163
+ std::string missingValueMarker = "",
164
+ unsigned int lineSize = 190) {
165
+ std::string res;
166
+ std::string propVal;
167
+ if (!missingValueMarker.empty()) {
168
+ propVal += boost::str(boost::format("[%s] ") % missingValueMarker);
169
+ } else {
170
+ missingValueMarker = "n/a";
171
+ }
172
+ for (const auto &atom : mol.atoms()) {
173
+ std::string apVal = missingValueMarker;
174
+ if (atom->hasProp(atomPropName)) {
175
+ T tVal = atom->getProp<T>(atomPropName);
176
+ apVal = boost::lexical_cast<std::string>(tVal);
177
+ // seems like this should work, but it doesn't:
178
+ // atom->getProp(atomPropName,apVal);
179
+ }
180
+ if (propVal.length() + apVal.length() + 1 >= lineSize) {
181
+ // remove trailing space:
182
+ propVal.pop_back();
183
+ res += propVal + "\n";
184
+ propVal = "";
185
+ }
186
+ propVal += apVal + " ";
187
+ }
188
+ if (!propVal.empty()) {
189
+ // remove the trailing space:
190
+ propVal.pop_back();
191
+ res += propVal;
192
+ }
193
+ return res;
194
+ }
195
+ inline void createAtomIntPropertyList(
196
+ ROMol &mol, const std::string &atomPropName,
197
+ const std::string &missingValueMarker = "", unsigned int lineSize = 190) {
198
+ std::string molPropName = "atom.iprop." + atomPropName;
199
+ mol.setProp(molPropName,
200
+ getAtomPropertyList<boost::int64_t>(
201
+ mol, atomPropName, missingValueMarker, lineSize));
202
+ }
203
+ inline void createAtomDoublePropertyList(
204
+ ROMol &mol, const std::string &atomPropName,
205
+ const std::string &missingValueMarker = "", unsigned int lineSize = 190) {
206
+ std::string molPropName = "atom.dprop." + atomPropName;
207
+ mol.setProp(molPropName,
208
+ getAtomPropertyList<double>(mol, atomPropName, missingValueMarker,
209
+ lineSize));
210
+ }
211
+ inline void createAtomBoolPropertyList(
212
+ ROMol &mol, const std::string &atomPropName,
213
+ const std::string &missingValueMarker = "", unsigned int lineSize = 190) {
214
+ std::string molPropName = "atom.bprop." + atomPropName;
215
+ mol.setProp(molPropName,
216
+ getAtomPropertyList<bool>(mol, atomPropName, missingValueMarker,
217
+ lineSize));
218
+ }
219
+ inline void createAtomStringPropertyList(
220
+ ROMol &mol, const std::string &atomPropName,
221
+ const std::string &missingValueMarker = "", unsigned int lineSize = 190) {
222
+ std::string molPropName = "atom.prop." + atomPropName;
223
+ mol.setProp(molPropName,
224
+ getAtomPropertyList<std::string>(mol, atomPropName,
225
+ missingValueMarker, lineSize));
226
+ }
227
+
228
+ } // namespace FileParserUtils
229
+ } // namespace RDKit
230
+
231
+ #endif
@@ -0,0 +1,399 @@
1
+ //
2
+ // Copyright (C) 2002-2013 Greg Landrum, 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_FILEPARSERS_H
12
+ #define _RD_FILEPARSERS_H
13
+
14
+ #include <RDGeneral/types.h>
15
+ #include <GraphMol/RDKitBase.h>
16
+
17
+ #include <string>
18
+ #include <iostream>
19
+ #include <vector>
20
+ #include <exception>
21
+
22
+ #include <boost/shared_ptr.hpp>
23
+
24
+ namespace RDKit {
25
+ const int MOLFILE_MAXLINE = 256;
26
+ RDKIT_FILEPARSERS_EXPORT std::string strip(const std::string &orig);
27
+
28
+ class RDKIT_FILEPARSERS_EXPORT MolFileUnhandledFeatureException
29
+ : public std::exception {
30
+ public:
31
+ //! construct with an error message
32
+ explicit MolFileUnhandledFeatureException(const char *msg) : _msg(msg) {}
33
+ //! construct with an error message
34
+ explicit MolFileUnhandledFeatureException(const std::string msg)
35
+ : _msg(msg) {}
36
+ //! get the error message
37
+ const char *what() const noexcept override { return _msg.c_str(); }
38
+ ~MolFileUnhandledFeatureException() noexcept override = default;
39
+
40
+ private:
41
+ std::string _msg;
42
+ };
43
+
44
+ //-----
45
+ // mol files
46
+ //-----
47
+ typedef std::vector<RWMOL_SPTR> RWMOL_SPTR_VECT;
48
+ // \brief construct a molecule from MDL mol data in a stream
49
+ /*!
50
+ * \param inStream - stream containing the data
51
+ * \param line - current line number (used for error reporting)
52
+ * \param sanitize - toggles sanitization and stereochemistry
53
+ * perception of the molecule
54
+ * \param removeHs - toggles removal of Hs from the molecule. H removal
55
+ * is only done if the molecule is sanitized
56
+ * \param line - current line number (used for error reporting)
57
+ * \param strictParsing - if set to false, the parser is more lax about
58
+ * correctness of the contents.
59
+ *
60
+ */
61
+ RDKIT_FILEPARSERS_EXPORT RWMol *MolDataStreamToMol(std::istream *inStream,
62
+ unsigned int &line,
63
+ bool sanitize = true,
64
+ bool removeHs = true,
65
+ bool strictParsing = true);
66
+ // \overload
67
+ RDKIT_FILEPARSERS_EXPORT RWMol *MolDataStreamToMol(std::istream &inStream,
68
+ unsigned int &line,
69
+ bool sanitize = true,
70
+ bool removeHs = true,
71
+ bool strictParsing = true);
72
+ // \brief construct a molecule from an MDL mol block
73
+ /*!
74
+ * \param molBlock - string containing the mol block
75
+ * \param sanitize - toggles sanitization and stereochemistry
76
+ * perception of the molecule
77
+ * \param removeHs - toggles removal of Hs from the molecule. H removal
78
+ * is only done if the molecule is sanitized
79
+ * \param strictParsing - if set to false, the parser is more lax about
80
+ * correctness of the contents.
81
+ */
82
+ RDKIT_FILEPARSERS_EXPORT RWMol *MolBlockToMol(const std::string &molBlock,
83
+ bool sanitize = true,
84
+ bool removeHs = true,
85
+ bool strictParsing = true);
86
+
87
+ // \brief construct a molecule from an MDL mol file
88
+ /*!
89
+ * \param fName - string containing the file name
90
+ * \param sanitize - toggles sanitization and stereochemistry
91
+ * perception of the molecule
92
+ * \param removeHs - toggles removal of Hs from the molecule. H removal
93
+ * is only done if the molecule is sanitized
94
+ * \param strictParsing - if set to false, the parser is more lax about
95
+ * correctness of the contents.
96
+ */
97
+ RDKIT_FILEPARSERS_EXPORT RWMol *MolFileToMol(const std::string &fName,
98
+ bool sanitize = true,
99
+ bool removeHs = true,
100
+ bool strictParsing = true);
101
+
102
+ // \brief generates an MDL mol block for a molecule
103
+ /*!
104
+ * \param mol - the molecule in question
105
+ * \param includeStereo - toggles inclusion of stereochemistry information
106
+ * \param confId - selects the conformer to be used
107
+ * \param kekulize - triggers kekulization of the molecule before it is
108
+ * written
109
+ * \param forceV3000 - force generation a V3000 mol block (happens
110
+ * automatically with
111
+ * more than 999 atoms or bonds)
112
+ */
113
+ RDKIT_FILEPARSERS_EXPORT std::string MolToMolBlock(const ROMol &mol,
114
+ bool includeStereo = true,
115
+ int confId = -1,
116
+ bool kekulize = true,
117
+ bool forceV3000 = false);
118
+
119
+ // \brief generates an MDL v3000 mol block for a molecule
120
+ /*!
121
+ * \param mol - the molecule in question
122
+ * \param includeStereo - toggles inclusion of stereochemistry information
123
+ * \param confId - selects the conformer to be used
124
+ * \param kekulize - triggers kekulization of the molecule before it is
125
+ * written
126
+ */
127
+ inline std::string MolToV3KMolBlock(const ROMol &mol, bool includeStereo = true,
128
+ int confId = -1, bool kekulize = true) {
129
+ return MolToMolBlock(mol, includeStereo, confId, kekulize, true);
130
+ }
131
+
132
+ // \brief Writes a molecule to an MDL mol file
133
+ /*!
134
+ * \param mol - the molecule in question
135
+ * \param fName - the name of the file to use
136
+ * \param includeStereo - toggles inclusion of stereochemistry information
137
+ * \param confId - selects the conformer to be used
138
+ * \param kekulize - triggers kekulization of the molecule before it is
139
+ * written
140
+ * \param forceV3000 - force generation a V3000 mol block (happens
141
+ * automatically with
142
+ * more than 999 atoms or bonds)
143
+ */
144
+ RDKIT_FILEPARSERS_EXPORT void MolToMolFile(
145
+ const ROMol &mol, const std::string &fName, bool includeStereo = true,
146
+ int confId = -1, bool kekulize = true, bool forceV3000 = false);
147
+
148
+ // \brief Writes a molecule to an MDL V3000 mol file
149
+ /*!
150
+ * \param mol - the molecule in question
151
+ * \param fName - the name of the file to use
152
+ * \param includeStereo - toggles inclusion of stereochemistry information
153
+ * \param confId - selects the conformer to be used
154
+ * \param kekulize - triggers kekulization of the molecule before it is
155
+ * written
156
+ */
157
+ inline void MolToV3KMolFile(const ROMol &mol, const std::string &fName,
158
+ bool includeStereo = true, int confId = -1,
159
+ bool kekulize = true) {
160
+ MolToMolFile(mol, fName, includeStereo, confId, kekulize, true);
161
+ }
162
+
163
+ RDKIT_FILEPARSERS_EXPORT std::string MolToCMLBlock(const ROMol &mol,
164
+ int confId = -1,
165
+ bool kekulize = true);
166
+
167
+ RDKIT_FILEPARSERS_EXPORT void MolToCMLFile(const ROMol &mol,
168
+ const std::string &fName,
169
+ int confId = -1,
170
+ bool kekulize = true);
171
+
172
+ RDKIT_FILEPARSERS_EXPORT std::string MolToXYZBlock(const ROMol &mol,
173
+ int confId = -1);
174
+
175
+ RDKIT_FILEPARSERS_EXPORT void MolToXYZFile(const ROMol &mol,
176
+ const std::string &fName,
177
+ int confId = -1);
178
+
179
+ //-----
180
+ // TPL handling:
181
+ //-----
182
+
183
+ //! \brief translate TPL data (BioCad format) into a multi-conf molecule
184
+ /*!
185
+ \param inStream: the stream from which to read
186
+ \param line: used to track the line number of errors
187
+ \param sanitize: toggles sanitization and stereochemistry
188
+ perception of the molecule
189
+ \param skipFirstConf: according to the TPL format description, the atomic
190
+ coords in the atom-information block describe the first
191
+ conformation and the first conf block describes second
192
+ conformation. The CombiCode, on the other hand, writes
193
+ the first conformation data both to the atom-information
194
+ block and to the first conf block. We want to be able to
195
+ read CombiCode-style tpls, so we'll allow this
196
+ mis-feature
197
+ to be parsed when this flag is set.
198
+ */
199
+ RDKIT_FILEPARSERS_EXPORT RWMol *TPLDataStreamToMol(std::istream *inStream,
200
+ unsigned int &line,
201
+ bool sanitize = true,
202
+ bool skipFirstConf = false);
203
+
204
+ //! \brief construct a multi-conf molecule from a TPL (BioCad format) file
205
+ /*!
206
+ \param fName: the name of the file from which to read
207
+ \param sanitize: toggles sanitization and stereochemistry
208
+ perception of the molecule
209
+ \param skipFirstConf: according to the TPL format description, the atomic
210
+ coords in the atom-information block describe the first
211
+ conformation and the first conf block describes second
212
+ conformation. The CombiCode, on the other hand, writes
213
+ the first conformation data both to the atom-information
214
+ block and to the first conf block. We want to be able to
215
+ read CombiCode-style tpls, so we'll allow this
216
+ mis-feature
217
+ to be parsed when this flag is set.
218
+ */
219
+ RDKIT_FILEPARSERS_EXPORT RWMol *TPLFileToMol(const std::string &fName,
220
+ bool sanitize = true,
221
+ bool skipFirstConf = false);
222
+
223
+ RDKIT_FILEPARSERS_EXPORT std::string MolToTPLText(
224
+ const ROMol &mol, const std::string &partialChargeProp = "_GasteigerCharge",
225
+ bool writeFirstConfTwice = false);
226
+ RDKIT_FILEPARSERS_EXPORT void MolToTPLFile(
227
+ const ROMol &mol, const std::string &fName,
228
+ const std::string &partialChargeProp = "_GasteigerCharge",
229
+ bool writeFirstConfTwice = false);
230
+
231
+ //-----
232
+ // MOL2 handling
233
+ //-----
234
+
235
+ typedef enum {
236
+ CORINA = 0 //! supports output from Corina and some dbtranslate output
237
+ } Mol2Type;
238
+
239
+ // \brief construct a molecule from a Tripos mol2 file
240
+ /*!
241
+ *
242
+ * \param fName - string containing the file name
243
+ * \param sanitize - toggles sanitization of the molecule
244
+ * \param removeHs - toggles removal of Hs from the molecule. H removal
245
+ * is only done if the molecule is sanitized
246
+ * \param variant - the atom type definitions to use
247
+ * \param cleanupSubstructures - toggles recognition and cleanup of common
248
+ * substructures
249
+ */
250
+ RDKIT_FILEPARSERS_EXPORT RWMol *Mol2FileToMol(const std::string &fName,
251
+ bool sanitize = true,
252
+ bool removeHs = true,
253
+ Mol2Type variant = CORINA,
254
+ bool cleanupSubstructures = true);
255
+
256
+ // \brief construct a molecule from Tripos mol2 data in a stream
257
+ /*!
258
+ * \param inStream - stream containing the data
259
+ * \param sanitize - toggles sanitization of the molecule
260
+ * \param removeHs - toggles removal of Hs from the molecule. H removal
261
+ * is only done if the molecule is sanitized
262
+ * \param variant - the atom type definitions to use
263
+ * \param cleanupSubstructures - toggles recognition and cleanup of common
264
+ * substructures
265
+ */
266
+ RDKIT_FILEPARSERS_EXPORT RWMol *Mol2DataStreamToMol(
267
+ std::istream *inStream, bool sanitize = true, bool removeHs = true,
268
+ Mol2Type variant = CORINA, bool cleanupSubstructures = true);
269
+ // \overload
270
+ RDKIT_FILEPARSERS_EXPORT RWMol *Mol2DataStreamToMol(
271
+ std::istream &inStream, bool sanitize = true, bool removeHs = true,
272
+ Mol2Type variant = CORINA, bool cleanupSubstructures = true);
273
+
274
+ // \brief construct a molecule from a Tripos mol2 block
275
+ /*!
276
+ * \param molBlock - string containing the mol block
277
+ * \param sanitize - toggles sanitization of the molecule
278
+ * \param removeHs - toggles removal of Hs from the molecule. H removal
279
+ * is only done if the molecule is sanitized
280
+ * \param variant - the atom type definitions to use
281
+ * \param cleanupSubstructures - toggles recognition and cleanup of common
282
+ * substructures
283
+ */
284
+ RDKIT_FILEPARSERS_EXPORT RWMol *Mol2BlockToMol(
285
+ const std::string &molBlock, bool sanitize = true, bool removeHs = true,
286
+ Mol2Type variant = CORINA, bool cleanupSubstructures = true);
287
+
288
+ RDKIT_FILEPARSERS_EXPORT RWMol *PDBBlockToMol(const char *str,
289
+ bool sanitize = true,
290
+ bool removeHs = true,
291
+ unsigned int flavor = 0,
292
+ bool proximityBonding = true);
293
+
294
+ RDKIT_FILEPARSERS_EXPORT RWMol *PDBBlockToMol(const std::string &str,
295
+ bool sanitize = true,
296
+ bool removeHs = true,
297
+ unsigned int flavor = 0,
298
+ bool proximityBonding = true);
299
+ RDKIT_FILEPARSERS_EXPORT RWMol *PDBDataStreamToMol(
300
+ std::istream *inStream, bool sanitize = true, bool removeHs = true,
301
+ unsigned int flavor = 0, bool proximityBonding = true);
302
+ RDKIT_FILEPARSERS_EXPORT RWMol *PDBDataStreamToMol(
303
+ std::istream &inStream, bool sanitize = true, bool removeHs = true,
304
+ unsigned int flavor = 0, bool proximityBonding = true);
305
+ RDKIT_FILEPARSERS_EXPORT RWMol *PDBFileToMol(const std::string &fname,
306
+ bool sanitize = true,
307
+ bool removeHs = true,
308
+ unsigned int flavor = 0,
309
+ bool proximityBonding = true);
310
+
311
+ // \brief generates an PDB block for a molecule
312
+ /*!
313
+ * \param mol - the molecule in question
314
+ * \param confId - selects the conformer to be used
315
+ * \param flavor - controls what gets written:
316
+ * flavor & 1 : Write MODEL/ENDMDL lines around each record
317
+ * flavor & 2 : Don't write single CONECT records
318
+ * flavor & 4 : Write CONECT records in both directions
319
+ * flavor & 8 : Don't use multiple CONECTs to encode bond order
320
+ * flavor & 16 : Write MASTER record
321
+ * flavor & 32 : Write TER record
322
+ */
323
+ RDKIT_FILEPARSERS_EXPORT std::string MolToPDBBlock(const ROMol &mol,
324
+ int confId = -1,
325
+ unsigned int flavor = 0);
326
+ // \brief Writes a molecule to an MDL mol file
327
+ /*!
328
+ * \param mol - the molecule in question
329
+ * \param fName - the name of the file to use
330
+ * \param confId - selects the conformer to be used
331
+ * \param flavor - controls what gets written:
332
+ * flavor & 1 : Write MODEL/ENDMDL lines around each record
333
+ * flavor & 2 : Don't write single CONECT records
334
+ * flavor & 4 : Write CONECT records in both directions
335
+ * flavor & 8 : Don't use multiple CONECTs to encode bond order
336
+ * flavor & 16 : Write MASTER record
337
+ * flavor & 32 : Write TER record
338
+ */
339
+ RDKIT_FILEPARSERS_EXPORT void MolToPDBFile(const ROMol &mol,
340
+ const std::string &fname,
341
+ int confId = -1,
342
+ unsigned int flavor = 0);
343
+
344
+ // \brief reads a molecule from the metadata in an RDKit-generated SVG file
345
+ /*!
346
+ * \param svg - string containing the SVG
347
+ * \param sanitize - toggles sanitization of the molecule
348
+ * \param removeHs - toggles removal of Hs from the molecule. H removal
349
+ * is only done if the molecule is sanitized
350
+ *
351
+ * **NOTE** This functionality should be considered beta.
352
+ */
353
+ RDKIT_FILEPARSERS_EXPORT RWMol *RDKitSVGToMol(const std::string &svg,
354
+ bool sanitize = true,
355
+ bool removeHs = true);
356
+ /*! \overload
357
+ */
358
+ RDKIT_FILEPARSERS_EXPORT RWMol *RDKitSVGToMol(std::istream *instream,
359
+ bool sanitize = true,
360
+ bool removeHs = true);
361
+
362
+ inline std::unique_ptr<RDKit::RWMol> operator"" _ctab(const char *text,
363
+ size_t len) {
364
+ std::string data(text, len);
365
+ RWMol *ptr = nullptr;
366
+ try {
367
+ ptr = MolBlockToMol(data);
368
+ } catch (const RDKit::MolSanitizeException &) {
369
+ ptr = nullptr;
370
+ }
371
+ return std::unique_ptr<RWMol>(ptr);
372
+ }
373
+ inline std::unique_ptr<RDKit::RWMol> operator"" _mol2(const char *text,
374
+ size_t len) {
375
+ std::string data(text, len);
376
+ RWMol *ptr = nullptr;
377
+ try {
378
+ ptr = Mol2BlockToMol(data);
379
+ } catch (const RDKit::MolSanitizeException &) {
380
+ ptr = nullptr;
381
+ }
382
+ return std::unique_ptr<RWMol>(ptr);
383
+ }
384
+
385
+ inline std::unique_ptr<RDKit::RWMol> operator"" _pdb(const char *text,
386
+ size_t len) {
387
+ std::string data(text, len);
388
+ RWMol *ptr = nullptr;
389
+ try {
390
+ ptr = PDBBlockToMol(data);
391
+ } catch (const RDKit::MolSanitizeException &) {
392
+ ptr = nullptr;
393
+ }
394
+ return std::unique_ptr<RWMol>(ptr);
395
+ }
396
+
397
+ } // namespace RDKit
398
+
399
+ #endif