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,539 @@
1
+ //
2
+ // Copyright (C) 2014-2021 David Cosgrove 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
+ // Original author: David Cosgrove (AstraZeneca)
11
+ // 27th May 2014
12
+ //
13
+ // This class makes a 2D drawing of an RDKit molecule.
14
+ // It draws heavily on $RDBASE/GraphMol/MolDrawing/MolDrawing.h.
15
+ // One purpose of this is to make it easier to overlay annotations on top of
16
+ // the molecule drawing, which is difficult to do from the output of
17
+ // MolDrawing.h
18
+ // The class design philosophy echoes a standard one:
19
+ // a virtual base class defines the interface and does all
20
+ // the heavy lifting and concrete derived classes implement
21
+ // library-specific drawing code such as drawing lines, writing strings
22
+ // etc.
23
+
24
+ #include <RDGeneral/export.h>
25
+ #ifndef RDKITMOLDRAW2D_H
26
+ #define RDKITMOLDRAW2D_H
27
+
28
+ #include <vector>
29
+
30
+ #include <Geometry/point.h>
31
+ #include <Geometry/Transform2D.h>
32
+ #include <GraphMol/RDKitBase.h>
33
+ #include <GraphMol/ChemReactions/Reaction.h>
34
+ #include <GraphMol/MolDraw2D/MolDraw2DHelpers.h>
35
+
36
+ // ****************************************************************************
37
+ using RDGeom::Point2D;
38
+
39
+ namespace RDKit {
40
+
41
+ namespace MolDraw2D_detail {
42
+ class DrawMol;
43
+ class DrawText;
44
+ } // namespace MolDraw2D_detail
45
+
46
+ //! MolDraw2D is the base class for doing 2D renderings of molecules
47
+ class RDKIT_MOLDRAW2D_EXPORT MolDraw2D {
48
+ public:
49
+ //! constructor for a particular size
50
+ /*!
51
+ \param width : width (in pixels) of the rendering
52
+ set this to -1 to have the canvas size set automatically
53
+ \param height : height (in pixels) of the rendering
54
+ set this to -1 to have the canvas size set automatically
55
+ \param panelWidth : (optional) width (in pixels) of a single panel
56
+ \param panelHeight : (optional) height (in pixels) of a single panel
57
+
58
+ The \c panelWidth and \c panelHeight arguments are used to provide the
59
+ sizes of the panels individual molecules are drawn in when
60
+ \c drawMolecules() is called.
61
+ */
62
+ MolDraw2D(int width, int height, int panelWidth, int panelHeight);
63
+ MolDraw2D(const MolDraw2D &rhs) = delete;
64
+ MolDraw2D(MolDraw2D &&rhs) = delete;
65
+ MolDraw2D &operator=(const MolDraw2D &rhs) = delete;
66
+ MolDraw2D &operator=(MolDraw2D &&rhs) = delete;
67
+ virtual ~MolDraw2D();
68
+
69
+ //! draw a single molecule
70
+ /*!
71
+ \param mol : the molecule to draw
72
+ \param legend : the legend (to be drawn under the molecule)
73
+ \param highlight_atoms : (optional) vector of atom ids to highlight
74
+ \param highlight_atoms : (optional) vector of bond ids to highlight
75
+ \param highlight_atom_map : (optional) map from atomId -> DrawColour
76
+ providing the highlight colors. If not provided the default highlight colour
77
+ from \c drawOptions() will be used.
78
+ \param highlight_bond_map : (optional) map from bondId -> DrawColour
79
+ providing the highlight colors. If not provided the default highlight colour
80
+ from \c drawOptions() will be used.
81
+ \param highlight_radii : (optional) map from atomId -> radius (in molecule
82
+ coordinates) for the radii of atomic highlights. If not provided the default
83
+ value from \c drawOptions() will be used.
84
+ \param confId : (optional) conformer ID to be used for atomic
85
+ coordinates
86
+
87
+ */
88
+ virtual void drawMolecule(
89
+ const ROMol &mol, const std::string &legend,
90
+ const std::vector<int> *highlight_atoms,
91
+ const std::vector<int> *highlight_bonds,
92
+ const std::map<int, DrawColour> *highlight_atom_map = nullptr,
93
+ const std::map<int, DrawColour> *highlight_bond_map = nullptr,
94
+ const std::map<int, double> *highlight_radii = nullptr, int confId = -1);
95
+
96
+ //! \overload
97
+ virtual void drawMolecule(
98
+ const ROMol &mol, const std::vector<int> *highlight_atoms = nullptr,
99
+ const std::map<int, DrawColour> *highlight_map = nullptr,
100
+ const std::map<int, double> *highlight_radii = nullptr, int confId = -1);
101
+
102
+ //! \overload
103
+ virtual void drawMolecule(
104
+ const ROMol &mol, const std::string &legend,
105
+ const std::vector<int> *highlight_atoms = nullptr,
106
+ const std::map<int, DrawColour> *highlight_map = nullptr,
107
+ const std::map<int, double> *highlight_radii = nullptr, int confId = -1);
108
+
109
+ //! \overload
110
+ virtual void drawMolecule(
111
+ const ROMol &mol, const std::vector<int> *highlight_atoms,
112
+ const std::vector<int> *highlight_bonds,
113
+ const std::map<int, DrawColour> *highlight_atom_map = nullptr,
114
+ const std::map<int, DrawColour> *highlight_bond_map = nullptr,
115
+ const std::map<int, double> *highlight_radii = nullptr, int confId = -1);
116
+
117
+ //! draw molecule with multiple colours allowed per atom.
118
+ /*!
119
+ \param mol : the molecule to draw
120
+ \param legend : the legend (to be drawn under the molecule)
121
+ \param highlight_atom_map : map from atomId -> DrawColours
122
+ providing the highlight colours.
123
+ \param highlight_bond_map : map from bondId -> DrawColours
124
+ providing the highlight colours.
125
+ \param highlight_radii : map from atomId -> radius (in molecule
126
+ coordinates) for the radii of atomic highlights. If not provided for an
127
+ index, the default value from \c drawOptions() will be used.
128
+ \param highlight_linewidth_multipliers : map from atomId -> int, used to
129
+ vary the width the highlight lines. Only active if
130
+ drawOptions().fillHighlights is false.
131
+ \param confId : (optional) conformer ID to be used for atomic
132
+ coordinates
133
+ */
134
+ virtual void drawMoleculeWithHighlights(
135
+ const ROMol &mol, const std::string &legend,
136
+ const std::map<int, std::vector<DrawColour>> &highlight_atom_map,
137
+ const std::map<int, std::vector<DrawColour>> &highlight_bond_map,
138
+ const std::map<int, double> &highlight_radii,
139
+ const std::map<int, int> &highlight_linewidth_multipliers,
140
+ int confId = -1);
141
+
142
+ //! draw multiple molecules in a grid
143
+ /*!
144
+ \param mols : the molecules to draw
145
+ \param legends : (optional) the legends (to be drawn under the
146
+ molecules)
147
+ \param highlight_atoms : (optional) vectors of atom ids to highlight
148
+ \param highlight_atoms : (optional) vectors of bond ids to highlight
149
+ \param highlight_atom_map : (optional) maps from atomId -> DrawColour
150
+ providing the highlight colors. If not provided the default highlight colour
151
+ from \c drawOptions() will be used.
152
+ \param highlight_bond_map : (optional) maps from bondId -> DrawColour
153
+ providing the highlight colors. If not provided the default highlight colour
154
+ from \c drawOptions() will be used.
155
+ \param highlight_radii : (optional) maps from atomId -> radius (in molecule
156
+ coordinates) for the radii of atomic highlights. If not provided the default
157
+ value from \c drawOptions() will be used.
158
+ \param confId : (optional) conformer IDs to be used for atomic
159
+ coordinates
160
+
161
+ The \c panelWidth and \c panelHeight values will be used to determine the
162
+ number of rows and columns to be drawn. Theres not a lot of error checking
163
+ here, so if you provide too many molecules for the number of panes things
164
+ are likely to get screwed up.
165
+ If the number of rows or columns ends up being <= 1, molecules will be
166
+ being drawn in a single row/column.
167
+ */
168
+ virtual void drawMolecules(
169
+ const std::vector<ROMol *> &mols,
170
+ const std::vector<std::string> *legends = nullptr,
171
+ const std::vector<std::vector<int>> *highlight_atoms = nullptr,
172
+ const std::vector<std::vector<int>> *highlight_bonds = nullptr,
173
+ const std::vector<std::map<int, DrawColour>> *highlight_atom_maps =
174
+ nullptr,
175
+ const std::vector<std::map<int, DrawColour>> *highlight_bond_maps =
176
+ nullptr,
177
+ const std::vector<std::map<int, double>> *highlight_radii = nullptr,
178
+ const std::vector<int> *confIds = nullptr);
179
+
180
+ //! draw a ChemicalReaction
181
+ /*!
182
+ \param rxn : the reaction to draw
183
+ \param highlightByReactant : (optional) if this is set, atoms and bonds will
184
+ be highlighted based on which reactant they come from. Atom map numbers
185
+ will not be shown.
186
+ \param highlightColorsReactants : (optional) provide a vector of colors for
187
+ the
188
+ reactant highlighting.
189
+ \param confIds : (optional) vector of confIds to use for rendering. These
190
+ are numbered by reactants, then agents, then products.
191
+ */
192
+ virtual void drawReaction(
193
+ const ChemicalReaction &rxn, bool highlightByReactant = false,
194
+ const std::vector<DrawColour> *highlightColorsReactants = nullptr,
195
+ const std::vector<int> *confIds = nullptr);
196
+
197
+ //! clears the contents of the drawing
198
+ virtual void clearDrawing() = 0;
199
+ //! draws a line from \c cds1 to \c cds2 using the current drawing style
200
+ //! in atom coords. If rawCoords is passed as true,
201
+ //! the coordinates are used as is, if not they are assumed to be in
202
+ //! the molecule coordinate frame and converted with getDrawCoords
203
+ //! into canvas coords.
204
+ virtual void drawLine(const Point2D &cds1, const Point2D &cds2,
205
+ bool rawCoords = false) = 0;
206
+ //! draw a polygon. Note that if fillPolys() returns false, it
207
+ //! doesn't close the path. If you want it to in that case, you
208
+ //! do it explicitly yourself. If rawCoords is passed as true,
209
+ //! the coordinates are used as is, if not they are assumed to be in
210
+ //! the molecule coordinate frame and converted with getDrawCoords
211
+ //! into canvas coords.
212
+ virtual void drawPolygon(const std::vector<Point2D> &cds,
213
+ bool rawCoords = false) = 0;
214
+ //@}
215
+
216
+ //! A Whole bunch of drawing primitives. They may be over-ridden
217
+ //! by different renderers, or they may be implemented in terms of
218
+ //! drawLine and drawPolygon above. If rawCoords is passed as true,
219
+ // the coordinates are used as is, if not they are assumed to be in
220
+ // the molecule coordinate frame and converted with getDrawCoords
221
+ // into canvas coords.
222
+ //! draw a line where the ends are different colours
223
+ virtual void drawLine(const Point2D &cds1, const Point2D &cds2,
224
+ const DrawColour &col1, const DrawColour &col2,
225
+ bool rawCoords = false);
226
+ //! draw a triangle
227
+ virtual void drawTriangle(const Point2D &cds1, const Point2D &cds2,
228
+ const Point2D &cds3, bool rawCoords = false);
229
+ //! draw an ellipse
230
+ virtual void drawEllipse(const Point2D &cds1, const Point2D &cds2,
231
+ bool rawCoords = false);
232
+ // draw the arc of a circle between ang1 and ang2. Note that 0 is
233
+ // at 3 o-clock and 90 at 12 o'clock as you'd expect from your maths.
234
+ // ang2 must be > ang1 - it won't draw backwards. This is not enforced.
235
+ // Angles in degrees.
236
+ virtual void drawArc(const Point2D &centre, double radius, double ang1,
237
+ double ang2, bool rawCoords = false);
238
+ // and a general ellipse form
239
+ virtual void drawArc(const Point2D &centre, double xradius, double yradius,
240
+ double ang1, double ang2, bool rawCoords = false);
241
+ //! draw a rectangle given two opposite corners
242
+ virtual void drawRect(const Point2D &cds1, const Point2D &cds2,
243
+ bool rawCoords = false);
244
+ //! draw a line indicating the presence of an attachment point (normally a
245
+ //! squiggle line perpendicular to a bond)
246
+ virtual void drawAttachmentLine(const Point2D &cds1, const Point2D &cds2,
247
+ const DrawColour &col, double len = 1.0,
248
+ unsigned int nSegments = 16,
249
+ bool rawCoords = false);
250
+ //! draw a wavy line like that used to indicate unknown stereochemistry
251
+ virtual void drawWavyLine(const Point2D &cds1, const Point2D &cds2,
252
+ const DrawColour &col1, const DrawColour &col2,
253
+ unsigned int nSegments = 16,
254
+ double vertOffset = 0.05, bool rawCoords = false);
255
+ //! Draw an arrow with either lines or a filled head (when asPolygon is true)
256
+ virtual void drawArrow(const Point2D &cds1, const Point2D &cds2,
257
+ bool asPolygon = false, double frac = 0.05,
258
+ double angle = M_PI / 6,
259
+ const DrawColour &col = DrawColour(0.0, 0.0, 0.0),
260
+ bool rawCoords = false);
261
+ // draw a plus sign with lines at the given position.
262
+ virtual void drawPlus(const Point2D &cds, int plusWidth,
263
+ const DrawColour &col, bool rawCoords = false);
264
+
265
+ //! drawString centres the string on cds.
266
+ virtual void drawString(const std::string &str, const Point2D &cds,
267
+ bool rawCoords = false);
268
+ // unless the specific drawer over-rides this overload, it will just call
269
+ // the first one. SVG for one needs the alignment flag.
270
+ virtual void drawString(const std::string &str, const Point2D &cds,
271
+ MolDraw2D_detail::TextAlignType align,
272
+ bool rawCoords = false);
273
+
274
+ //! \name Transformations
275
+ //@{
276
+ // transform a set of coords in the molecule's coordinate system
277
+ // to drawing system coordinates and vice versa. Note that the coordinates
278
+ // have
279
+ // the origin in the top left corner, which is how Qt and Cairo have it, no
280
+ // doubt a holdover from X Windows. This means that a higher y value will be
281
+ // nearer the bottom of the screen. This doesn't really matter except when
282
+ // doing text superscripts and subscripts.
283
+
284
+ //! transform a point from the molecule coordinate system into the drawing
285
+ //! coordinate system.
286
+ //! Prefers globalDrawTrans_ if it exists, otherwise
287
+ //! uses drawMols_[activeMolIdx_].
288
+ virtual Point2D getDrawCoords(const Point2D &mol_cds) const;
289
+ //! returns the drawing coordinates of a particular atom
290
+ virtual Point2D getDrawCoords(int at_num) const;
291
+ //! Prefers globalDrawTrans_ if it exists, otherwise
292
+ //! uses drawMols_[activeMolIdx_].
293
+ virtual Point2D getAtomCoords(const std::pair<int, int> &screen_cds) const;
294
+ //! transform a point from drawing coordinates to the molecule coordinate
295
+ //! system. Prefers globalDrawTrans_ if it exists, otherwise
296
+ //! uses drawMols_[activeMolIdx_].
297
+ virtual Point2D getAtomCoords(
298
+ const std::pair<double, double> &screen_cds) const;
299
+ //! returns the molecular coordinates of a particular atom. at_num refers
300
+ //! to the atom in activeMolIdx_.
301
+ virtual Point2D getAtomCoords(int at_num) const;
302
+ //@}
303
+ //! returns the coordinates of the atoms of the activeMolIdx_ molecule in
304
+ //! molecular coordinates.
305
+ const std::vector<Point2D> &atomCoords() const;
306
+ //! returns the atomic symbols of the activeMolIdx_ molecule
307
+ const std::vector<std::pair<std::string, MolDraw2D_detail::OrientType>>
308
+ &atomSyms() const;
309
+
310
+ //! return the width of the drawing area.
311
+ virtual int width() const { return width_; }
312
+ //! return the height of the drawing area.
313
+ virtual int height() const { return height_; }
314
+ //! return the width of the drawing panels.
315
+ virtual int panelWidth() const { return panel_width_; }
316
+ //! return the height of the drawing panels.
317
+ virtual int panelHeight() const { return panel_height_; }
318
+ virtual int drawHeight() const { return panel_height_ - legend_height_; }
319
+ // returns the width to draw a line in draw coords.
320
+ virtual double getDrawLineWidth() const;
321
+
322
+ //! returns the drawing scale (conversion from molecular coords -> drawing
323
+ /// coords)
324
+ double scale() const;
325
+ //! explicitly sets the scaling factors for the drawing
326
+ void setScale(double newScale);
327
+ void setScale(int width, int height, const Point2D &minv, const Point2D &maxv,
328
+ const ROMol *mol = nullptr);
329
+ //! sets the drawing offset (in drawing coords)
330
+ void setOffset(int x, int y) {
331
+ x_offset_ = x;
332
+ y_offset_ = y;
333
+ }
334
+ //! returns the drawing offset (in drawing coords)
335
+ Point2D offset() const { return Point2D(x_offset_, y_offset_); }
336
+
337
+ //! returns the minimum point of the drawing (in molecular coords)
338
+ Point2D minPt() const;
339
+ //! returns the width and height of the grid (in molecular coords)
340
+ Point2D range() const;
341
+
342
+ //! font size in drawing coordinate units. That's probably pixels.
343
+ virtual double fontSize() const;
344
+ virtual void setFontSize(double new_size);
345
+
346
+ //! sets the current draw color
347
+ virtual void setColour(const DrawColour &col) { curr_colour_ = col; }
348
+ //! returns the current draw color
349
+ virtual DrawColour colour() const { return curr_colour_; }
350
+ //! sets the current dash pattern
351
+ virtual void setDash(const DashPattern &patt) { curr_dash_ = patt; }
352
+ //! returns the current dash pattern
353
+ virtual const DashPattern &dash() const { return curr_dash_; }
354
+
355
+ //! sets the current line width
356
+ virtual void setLineWidth(int width) { drawOptions().bondLineWidth = width; }
357
+ //! returns the current line width
358
+ virtual int lineWidth() const { return drawOptions().bondLineWidth; }
359
+
360
+ //! using the current scale, work out the size of the label in molecule
361
+ //! coordinates.
362
+ /*!
363
+ Bear in mind when implementing this, that, for example, NH2 will appear as
364
+ NH<sub>2</sub> to convey that the 2 is a subscript, and this needs to
365
+ accounted for in the width and height.
366
+ */
367
+ virtual void getStringSize(const std::string &label, double &label_width,
368
+ double &label_height) const;
369
+ // get the overall size of the label, allowing for it being split
370
+ // into pieces according to orientation.
371
+ void getLabelSize(const std::string &label,
372
+ MolDraw2D_detail::OrientType orient, double &label_width,
373
+ double &label_height) const;
374
+ // return extremes for string in molecule coords.
375
+ void getStringExtremes(const std::string &label,
376
+ MolDraw2D_detail::OrientType orient,
377
+ const Point2D &cds, double &x_min, double &y_min,
378
+ double &x_max, double &y_max) const;
379
+
380
+ //! adds additional information about the atoms to the output. Does not make
381
+ //! sense for all renderers.
382
+ virtual void tagAtoms(const ROMol &mol) { RDUNUSED_PARAM(mol); }
383
+ //! set whether or not polygons are being filled
384
+ virtual bool fillPolys() const { return fill_polys_; }
385
+ //! returns either or not polygons should be filled
386
+ virtual void setFillPolys(bool val) { fill_polys_ = val; }
387
+
388
+ //! returns our current drawing options
389
+ MolDrawOptions &drawOptions() { return options_; }
390
+ //! \overload
391
+ const MolDrawOptions &drawOptions() const { return options_; }
392
+
393
+ virtual bool supportsAnnotations() const { return true; }
394
+
395
+ void setActiveMolIdx(int newIdx);
396
+ bool hasActiveAtmIdx() const { return activeAtmIdx1_ >= 0; }
397
+ int getActiveAtmIdx1() const { return activeAtmIdx1_; }
398
+ int getActiveAtmIdx2() const { return activeAtmIdx2_; }
399
+ void setActiveAtmIdx(int at_idx1 = -1, int at_idx2 = -1);
400
+ bool hasActiveBndIdx() const { return activeBndIdx_ >= 0; }
401
+ int getActiveBndIdx() const { return activeBndIdx_; }
402
+ void setActiveBndIdx(int bnd_idx = -1) {
403
+ activeBndIdx_ = (bnd_idx < 0 ? -1 : bnd_idx);
404
+ }
405
+ void setActiveClass(std::string actClass = std::string("")) {
406
+ d_activeClass = actClass;
407
+ }
408
+ std::string getActiveClass() const { return d_activeClass; }
409
+
410
+ protected:
411
+ std::unique_ptr<MolDraw2D_detail::DrawText> text_drawer_;
412
+ std::string d_activeClass;
413
+ bool needs_init_ = true;
414
+ std::vector<std::pair<std::string, std::string>> d_metadata;
415
+ unsigned int d_numMetadataEntries = 0;
416
+
417
+ private:
418
+ //! \name Methods that must be provided by child classes
419
+ //@{
420
+ virtual void initDrawing() = 0;
421
+ virtual void initTextDrawer(bool noFreetype) = 0;
422
+
423
+ // if the width or height of the DrawMol was -1, the new dimensions need to be
424
+ // transferred to MolDraw2D.
425
+ void fixVariableDimensions(const MolDraw2D_detail::DrawMol &drawMol);
426
+
427
+ // split the reaction up into the reagents, products and agents, each as
428
+ // a separate entity with its own scale.
429
+ void getReactionDrawMols(
430
+ const ChemicalReaction &rxn, bool highlightByReactant,
431
+ const std::vector<DrawColour> *highlightColorsReactants,
432
+ const std::vector<int> *confIds,
433
+ std::vector<std::shared_ptr<MolDraw2D_detail::DrawMol>> &reagents,
434
+ std::vector<std::shared_ptr<MolDraw2D_detail::DrawMol>> &products,
435
+ std::vector<std::shared_ptr<MolDraw2D_detail::DrawMol>> &agents,
436
+ int &plusWidth);
437
+ // take the given components from the reaction (bits will be either
438
+ // reagents, products or agents) and create the corresponding DrawMols.
439
+ void makeReactionComponents(
440
+ std::vector<RDKit::ROMOL_SPTR> const &bits,
441
+ const std::vector<int> *confIds, int heightToUse,
442
+ std::map<int, DrawColour> &atomColours,
443
+ std::vector<std::shared_ptr<MolDraw2D_detail::DrawMol>> &dms,
444
+ double &minScale, double &minFontScale);
445
+ // this puts a pointer to the DrawMol into _drawMols as well, hence the use
446
+ // of shared_ptr for reagents, products and agents above.
447
+ void makeReactionDrawMol(
448
+ RWMol &mol, int confId, int molHeight,
449
+ const std::vector<int> &highlightAtoms,
450
+ const std::vector<int> &highlightBonds,
451
+ const std::map<int, DrawColour> &highlightAtomMap,
452
+ const std::map<int, DrawColour> &highlightBondMap,
453
+ std::vector<std::shared_ptr<MolDraw2D_detail::DrawMol>> &mols);
454
+ // Strictly speaking, this isn't actually a const function, although the
455
+ // compiler can't spot it, because the scales of reagents etc may be changed,
456
+ // and they are also in drawMols_.
457
+ void calcReactionOffsets(
458
+ std::vector<std::shared_ptr<MolDraw2D_detail::DrawMol>> &reagents,
459
+ std::vector<std::shared_ptr<MolDraw2D_detail::DrawMol>> &products,
460
+ std::vector<std::shared_ptr<MolDraw2D_detail::DrawMol>> &agents,
461
+ int &plusWidth, std::vector<Point2D> &offsets, Point2D &arrowBeg,
462
+ Point2D &arrowEnd);
463
+ // returns the final offset. plusWidth of 0 means no pluses to be drawn.
464
+ int drawReactionPart(
465
+ std::vector<std::shared_ptr<MolDraw2D_detail::DrawMol>> &reactBit,
466
+ int plusWidth, int initOffset, const std::vector<Point2D> &offsets);
467
+ // returns a map of colours indexed by the atomMapNum. Each reagent gives
468
+ // a different colour.
469
+ void findReactionHighlights(
470
+ const ChemicalReaction &rxn, bool highlightByReactant,
471
+ const std::vector<DrawColour> *highlightColorsReactants,
472
+ std::map<int, DrawColour> &atomColours) const;
473
+
474
+ int width_, height_, panel_width_, panel_height_, legend_height_;
475
+ // if the user calls setScale() to explicitly force a scale on the
476
+ // DrawMols, this is set to true.
477
+ bool forceScale_ = false;
478
+ double scale_, fontScale_;
479
+ int x_offset_, y_offset_; // translation in screen coordinates
480
+ bool fill_polys_;
481
+ int activeMolIdx_;
482
+ int activeAtmIdx1_;
483
+ int activeAtmIdx2_;
484
+ int activeBndIdx_;
485
+ // these are shared_ptr rather than unique_ptr because the reactions
486
+ // keep their own copy.
487
+ std::vector<std::shared_ptr<MolDraw2D_detail::DrawMol>> drawMols_;
488
+ // this is for when we want to set up a MolDraw2D to a given scale and be
489
+ // able to draw molecules and arbitrary lines, arcs etc. onto it all to the
490
+ // same drawing transformation. If present, it will always be applied to
491
+ // any new drawMols_ before they are drawn. A separate class might have
492
+ // been better, but this is convenient.
493
+ std::unique_ptr<MolDraw2D_detail::DrawMol> globalDrawTrans_;
494
+
495
+ DrawColour curr_colour_;
496
+ DashPattern curr_dash_;
497
+ MolDrawOptions options_;
498
+
499
+ // Do the drawing, the new way
500
+ void startDrawing();
501
+ void drawTheMolecule(MolDraw2D_detail::DrawMol &drawMol);
502
+ void setupTextDrawer();
503
+
504
+ virtual void updateMetadata(const ROMol &mol, int confId) {
505
+ RDUNUSED_PARAM(mol);
506
+ RDUNUSED_PARAM(confId);
507
+ }
508
+ virtual void updateMetadata(const ChemicalReaction &rxn) {
509
+ RDUNUSED_PARAM(rxn);
510
+ }
511
+ };
512
+
513
+ inline void setDarkMode(MolDrawOptions &opts) {
514
+ assignDarkModePalette(opts.atomColourPalette);
515
+ opts.backgroundColour = DrawColour{0, 0, 0, 1};
516
+ opts.annotationColour = DrawColour{0.9, 0.9, 0.9, 1};
517
+ opts.legendColour = DrawColour{0.9, 0.9, 0.9, 1};
518
+ opts.symbolColour = DrawColour{0.9, 0.9, 0.9, 1};
519
+ opts.variableAttachmentColour = DrawColour{0.3, 0.3, 0.3, 1};
520
+ }
521
+ inline void setDarkMode(MolDraw2D &d2d) { setDarkMode(d2d.drawOptions()); }
522
+ inline void setMonochromeMode(MolDrawOptions &opts, const DrawColour &fgColour,
523
+ const DrawColour &bgColour) {
524
+ opts.atomColourPalette.clear();
525
+ opts.atomColourPalette[-1] = fgColour;
526
+ opts.backgroundColour = bgColour;
527
+ opts.annotationColour = fgColour;
528
+ opts.legendColour = fgColour;
529
+ opts.symbolColour = fgColour;
530
+ opts.variableAttachmentColour = fgColour;
531
+ }
532
+ inline void setMonochromeMode(MolDraw2D &opts, const DrawColour &fgColour,
533
+ const DrawColour &bgColour) {
534
+ setMonochromeMode(opts.drawOptions(), fgColour, bgColour);
535
+ }
536
+
537
+ } // namespace RDKit
538
+
539
+ #endif // RDKITMOLDRAW2D_H