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.
- rdkit_headers/__init__.py +13 -0
- rdkit_headers/include/rdkit/CIPLabeler/CIPLabeler.h +59 -0
- rdkit_headers/include/rdkit/CIPLabeler/TooManyNodesException.h +28 -0
- rdkit_headers/include/rdkit/Catalogs/Catalog.h +461 -0
- rdkit_headers/include/rdkit/Catalogs/CatalogEntry.h +48 -0
- rdkit_headers/include/rdkit/Catalogs/CatalogParams.h +42 -0
- rdkit_headers/include/rdkit/ChemicalFeatures/ChemicalFeature.h +38 -0
- rdkit_headers/include/rdkit/ChemicalFeatures/FreeChemicalFeature.h +97 -0
- rdkit_headers/include/rdkit/DataManip/MetricMatrixCalc/MetricFuncs.h +54 -0
- rdkit_headers/include/rdkit/DataManip/MetricMatrixCalc/MetricMatrixCalc.h +106 -0
- rdkit_headers/include/rdkit/DataStructs/BitOps.h +337 -0
- rdkit_headers/include/rdkit/DataStructs/BitVect.h +68 -0
- rdkit_headers/include/rdkit/DataStructs/BitVectUtils.h +35 -0
- rdkit_headers/include/rdkit/DataStructs/BitVects.h +25 -0
- rdkit_headers/include/rdkit/DataStructs/DatastructsException.h +31 -0
- rdkit_headers/include/rdkit/DataStructs/DatastructsStreamOps.h +72 -0
- rdkit_headers/include/rdkit/DataStructs/DiscreteDistMat.h +30 -0
- rdkit_headers/include/rdkit/DataStructs/DiscreteValueVect.h +146 -0
- rdkit_headers/include/rdkit/DataStructs/ExplicitBitVect.h +96 -0
- rdkit_headers/include/rdkit/DataStructs/FPBReader.h +281 -0
- rdkit_headers/include/rdkit/DataStructs/MultiFPBReader.h +213 -0
- rdkit_headers/include/rdkit/DataStructs/SparseBitVect.h +101 -0
- rdkit_headers/include/rdkit/DataStructs/SparseIntVect.h +571 -0
- rdkit_headers/include/rdkit/DataStructs/base64.h +41 -0
- rdkit_headers/include/rdkit/DistGeom/BoundsMatrix.h +121 -0
- rdkit_headers/include/rdkit/DistGeom/ChiralSet.h +58 -0
- rdkit_headers/include/rdkit/DistGeom/ChiralViolationContrib.h +96 -0
- rdkit_headers/include/rdkit/DistGeom/DistGeomUtils.h +195 -0
- rdkit_headers/include/rdkit/DistGeom/DistViolationContrib.h +54 -0
- rdkit_headers/include/rdkit/DistGeom/FourthDimContrib.h +65 -0
- rdkit_headers/include/rdkit/DistGeom/TriangleSmooth.h +36 -0
- rdkit_headers/include/rdkit/Features/Feature.h +96 -0
- rdkit_headers/include/rdkit/ForceField/Contrib.h +40 -0
- rdkit_headers/include/rdkit/ForceField/ForceField.h +253 -0
- rdkit_headers/include/rdkit/ForceField/MMFF/AngleBend.h +78 -0
- rdkit_headers/include/rdkit/ForceField/MMFF/AngleConstraint.h +64 -0
- rdkit_headers/include/rdkit/ForceField/MMFF/BondStretch.h +67 -0
- rdkit_headers/include/rdkit/ForceField/MMFF/Contribs.h +26 -0
- rdkit_headers/include/rdkit/ForceField/MMFF/DistanceConstraint.h +61 -0
- rdkit_headers/include/rdkit/ForceField/MMFF/Nonbonded.h +105 -0
- rdkit_headers/include/rdkit/ForceField/MMFF/OopBend.h +65 -0
- rdkit_headers/include/rdkit/ForceField/MMFF/Params.h +1134 -0
- rdkit_headers/include/rdkit/ForceField/MMFF/PositionConstraint.h +55 -0
- rdkit_headers/include/rdkit/ForceField/MMFF/StretchBend.h +70 -0
- rdkit_headers/include/rdkit/ForceField/MMFF/TorsionAngle.h +79 -0
- rdkit_headers/include/rdkit/ForceField/MMFF/TorsionConstraint.h +70 -0
- rdkit_headers/include/rdkit/ForceField/UFF/AngleBend.h +92 -0
- rdkit_headers/include/rdkit/ForceField/UFF/AngleConstraint.h +64 -0
- rdkit_headers/include/rdkit/ForceField/UFF/BondStretch.h +83 -0
- rdkit_headers/include/rdkit/ForceField/UFF/Contribs.h +23 -0
- rdkit_headers/include/rdkit/ForceField/UFF/DistanceConstraint.h +62 -0
- rdkit_headers/include/rdkit/ForceField/UFF/Inversion.h +81 -0
- rdkit_headers/include/rdkit/ForceField/UFF/Nonbonded.h +87 -0
- rdkit_headers/include/rdkit/ForceField/UFF/Params.h +153 -0
- rdkit_headers/include/rdkit/ForceField/UFF/PositionConstraint.h +55 -0
- rdkit_headers/include/rdkit/ForceField/UFF/TorsionAngle.h +115 -0
- rdkit_headers/include/rdkit/ForceField/UFF/TorsionConstraint.h +70 -0
- rdkit_headers/include/rdkit/Geometry/Grid3D.h +55 -0
- rdkit_headers/include/rdkit/Geometry/GridUtils.h +64 -0
- rdkit_headers/include/rdkit/Geometry/Transform.h +19 -0
- rdkit_headers/include/rdkit/Geometry/Transform2D.h +85 -0
- rdkit_headers/include/rdkit/Geometry/Transform3D.h +101 -0
- rdkit_headers/include/rdkit/Geometry/UniformGrid3D.h +217 -0
- rdkit_headers/include/rdkit/Geometry/Utils.h +97 -0
- rdkit_headers/include/rdkit/Geometry/point.h +585 -0
- rdkit_headers/include/rdkit/GraphMol/Abbreviations/Abbreviations.h +132 -0
- rdkit_headers/include/rdkit/GraphMol/Atom.h +449 -0
- rdkit_headers/include/rdkit/GraphMol/AtomIterators.h +212 -0
- rdkit_headers/include/rdkit/GraphMol/Bond.h +393 -0
- rdkit_headers/include/rdkit/GraphMol/BondIterators.h +75 -0
- rdkit_headers/include/rdkit/GraphMol/Canon.h +130 -0
- rdkit_headers/include/rdkit/GraphMol/ChemReactions/Enumerate/CartesianProduct.h +147 -0
- rdkit_headers/include/rdkit/GraphMol/ChemReactions/Enumerate/Enumerate.h +187 -0
- rdkit_headers/include/rdkit/GraphMol/ChemReactions/Enumerate/EnumerateBase.h +200 -0
- rdkit_headers/include/rdkit/GraphMol/ChemReactions/Enumerate/EnumerateTypes.h +59 -0
- rdkit_headers/include/rdkit/GraphMol/ChemReactions/Enumerate/EnumerationPickler.h +60 -0
- rdkit_headers/include/rdkit/GraphMol/ChemReactions/Enumerate/EnumerationStrategyBase.h +227 -0
- rdkit_headers/include/rdkit/GraphMol/ChemReactions/Enumerate/RandomSample.h +163 -0
- rdkit_headers/include/rdkit/GraphMol/ChemReactions/Enumerate/RandomSampleAllBBs.h +184 -0
- rdkit_headers/include/rdkit/GraphMol/ChemReactions/PreprocessRxn.h +64 -0
- rdkit_headers/include/rdkit/GraphMol/ChemReactions/Reaction.h +491 -0
- rdkit_headers/include/rdkit/GraphMol/ChemReactions/ReactionFingerprints.h +147 -0
- rdkit_headers/include/rdkit/GraphMol/ChemReactions/ReactionParser.h +274 -0
- rdkit_headers/include/rdkit/GraphMol/ChemReactions/ReactionPickler.h +119 -0
- rdkit_headers/include/rdkit/GraphMol/ChemReactions/ReactionRunner.h +116 -0
- rdkit_headers/include/rdkit/GraphMol/ChemReactions/ReactionUtils.h +74 -0
- rdkit_headers/include/rdkit/GraphMol/ChemReactions/SanitizeRxn.h +169 -0
- rdkit_headers/include/rdkit/GraphMol/ChemTransforms/ChemTransforms.h +270 -0
- rdkit_headers/include/rdkit/GraphMol/ChemTransforms/MolFragmenter.h +120 -0
- rdkit_headers/include/rdkit/GraphMol/Chirality.h +137 -0
- rdkit_headers/include/rdkit/GraphMol/Conformer.h +183 -0
- rdkit_headers/include/rdkit/GraphMol/CoordGen.h +195 -0
- rdkit_headers/include/rdkit/GraphMol/Depictor/DepictUtils.h +366 -0
- rdkit_headers/include/rdkit/GraphMol/Depictor/EmbeddedFrag.h +544 -0
- rdkit_headers/include/rdkit/GraphMol/Depictor/RDDepictor.h +284 -0
- rdkit_headers/include/rdkit/GraphMol/Deprotect/Deprotect.h +105 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/AUTOCORR2D.h +49 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/AUTOCORR3D.h +51 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/AtomFeat.h +39 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/BCUT.h +66 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/ConnectivityDescriptors.h +211 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/CoulombMat.h +42 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/Crippen.h +137 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/Data3Ddescriptors.h +55 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/EEM.h +59 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/GETAWAY.h +51 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/Lipinski.h +169 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/MORSE.h +50 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/MQN.h +47 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/MolData3Ddescriptors.h +62 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/MolDescriptors.h +86 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/MolDescriptors3D.h +25 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/MolSurf.h +120 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/PBF.h +60 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/PMI.h +128 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/Property.h +123 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/RDF.h +52 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/RegisterDescriptor.h +84 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/USRDescriptor.h +137 -0
- rdkit_headers/include/rdkit/GraphMol/Descriptors/WHIM.h +51 -0
- rdkit_headers/include/rdkit/GraphMol/DistGeomHelpers/BoundsMatrixBuilder.h +77 -0
- rdkit_headers/include/rdkit/GraphMol/DistGeomHelpers/Embedder.h +437 -0
- rdkit_headers/include/rdkit/GraphMol/FMCS/FMCS.h +194 -0
- rdkit_headers/include/rdkit/GraphMol/FMCS/Graph.h +43 -0
- rdkit_headers/include/rdkit/GraphMol/FileParsers/FileParserUtils.h +231 -0
- rdkit_headers/include/rdkit/GraphMol/FileParsers/FileParsers.h +399 -0
- rdkit_headers/include/rdkit/GraphMol/FileParsers/GeneralFileReader.h +170 -0
- rdkit_headers/include/rdkit/GraphMol/FileParsers/MolFileStereochem.h +60 -0
- rdkit_headers/include/rdkit/GraphMol/FileParsers/MolSupplier.h +444 -0
- rdkit_headers/include/rdkit/GraphMol/FileParsers/MolWriters.h +338 -0
- rdkit_headers/include/rdkit/GraphMol/FileParsers/MultithreadedMolSupplier.h +102 -0
- rdkit_headers/include/rdkit/GraphMol/FileParsers/MultithreadedSDMolSupplier.h +65 -0
- rdkit_headers/include/rdkit/GraphMol/FileParsers/MultithreadedSmilesMolSupplier.h +66 -0
- rdkit_headers/include/rdkit/GraphMol/FileParsers/PNGParser.h +203 -0
- rdkit_headers/include/rdkit/GraphMol/FileParsers/SequenceParsers.h +117 -0
- rdkit_headers/include/rdkit/GraphMol/FileParsers/SequenceWriters.h +47 -0
- rdkit_headers/include/rdkit/GraphMol/FilterCatalog/FilterCatalog.h +260 -0
- rdkit_headers/include/rdkit/GraphMol/FilterCatalog/FilterCatalogEntry.h +276 -0
- rdkit_headers/include/rdkit/GraphMol/FilterCatalog/FilterMatcherBase.h +152 -0
- rdkit_headers/include/rdkit/GraphMol/FilterCatalog/FilterMatchers.h +576 -0
- rdkit_headers/include/rdkit/GraphMol/FilterCatalog/FunctionalGroupHierarchy.h +52 -0
- rdkit_headers/include/rdkit/GraphMol/Fingerprints/AtomPairGenerator.h +188 -0
- rdkit_headers/include/rdkit/GraphMol/Fingerprints/AtomPairs.h +268 -0
- rdkit_headers/include/rdkit/GraphMol/Fingerprints/FingerprintGenerator.h +372 -0
- rdkit_headers/include/rdkit/GraphMol/Fingerprints/FingerprintUtil.h +160 -0
- rdkit_headers/include/rdkit/GraphMol/Fingerprints/Fingerprints.h +167 -0
- rdkit_headers/include/rdkit/GraphMol/Fingerprints/MACCS.h +32 -0
- rdkit_headers/include/rdkit/GraphMol/Fingerprints/MHFP.h +285 -0
- rdkit_headers/include/rdkit/GraphMol/Fingerprints/MorganFingerprints.h +210 -0
- rdkit_headers/include/rdkit/GraphMol/Fingerprints/MorganGenerator.h +251 -0
- rdkit_headers/include/rdkit/GraphMol/Fingerprints/RDKitFPGenerator.h +162 -0
- rdkit_headers/include/rdkit/GraphMol/Fingerprints/TopologicalTorsionGenerator.h +127 -0
- rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/CrystalFF/TorsionAngleM6.h +72 -0
- rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/CrystalFF/TorsionPreferences.h +41 -0
- rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/FFConvenience.h +130 -0
- rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/MMFF/AtomTyper.h +236 -0
- rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/MMFF/Builder.h +141 -0
- rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/MMFF/MMFF.h +105 -0
- rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/UFF/AtomTyper.h +57 -0
- rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/UFF/Builder.h +129 -0
- rdkit_headers/include/rdkit/GraphMol/ForceFieldHelpers/UFF/UFF.h +82 -0
- rdkit_headers/include/rdkit/GraphMol/FragCatalog/FragCatGenerator.h +33 -0
- rdkit_headers/include/rdkit/GraphMol/FragCatalog/FragCatParams.h +94 -0
- rdkit_headers/include/rdkit/GraphMol/FragCatalog/FragCatalogEntry.h +136 -0
- rdkit_headers/include/rdkit/GraphMol/FragCatalog/FragCatalogUtils.h +62 -0
- rdkit_headers/include/rdkit/GraphMol/FragCatalog/FragFPGenerator.h +38 -0
- rdkit_headers/include/rdkit/GraphMol/GenericGroups/GenericGroups.h +301 -0
- rdkit_headers/include/rdkit/GraphMol/GraphMol.h +22 -0
- rdkit_headers/include/rdkit/GraphMol/MMPA/MMPA.h +81 -0
- rdkit_headers/include/rdkit/GraphMol/MolAlign/AlignMolecules.h +183 -0
- rdkit_headers/include/rdkit/GraphMol/MolAlign/O3AAlignMolecules.h +354 -0
- rdkit_headers/include/rdkit/GraphMol/MolBundle.h +121 -0
- rdkit_headers/include/rdkit/GraphMol/MolCatalog/MolCatalog.h +20 -0
- rdkit_headers/include/rdkit/GraphMol/MolCatalog/MolCatalogEntry.h +109 -0
- rdkit_headers/include/rdkit/GraphMol/MolCatalog/MolCatalogParams.h +40 -0
- rdkit_headers/include/rdkit/GraphMol/MolChemicalFeatures/FeatureParser.h +58 -0
- rdkit_headers/include/rdkit/GraphMol/MolChemicalFeatures/MolChemicalFeature.h +98 -0
- rdkit_headers/include/rdkit/GraphMol/MolChemicalFeatures/MolChemicalFeatureDef.h +68 -0
- rdkit_headers/include/rdkit/GraphMol/MolChemicalFeatures/MolChemicalFeatureFactory.h +78 -0
- rdkit_headers/include/rdkit/GraphMol/MolDraw2D/MolDraw2D.h +539 -0
- rdkit_headers/include/rdkit/GraphMol/MolDraw2D/MolDraw2DHelpers.h +284 -0
- rdkit_headers/include/rdkit/GraphMol/MolDraw2D/MolDraw2DJS.h +62 -0
- rdkit_headers/include/rdkit/GraphMol/MolDraw2D/MolDraw2DSVG.h +88 -0
- rdkit_headers/include/rdkit/GraphMol/MolDraw2D/MolDraw2DUtils.h +179 -0
- rdkit_headers/include/rdkit/GraphMol/MolDraw2D/MolDraw2Dwx.h +107 -0
- rdkit_headers/include/rdkit/GraphMol/MolEnumerator/LinkNode.h +159 -0
- rdkit_headers/include/rdkit/GraphMol/MolEnumerator/MolEnumerator.h +276 -0
- rdkit_headers/include/rdkit/GraphMol/MolHash/MolHash.h +12 -0
- rdkit_headers/include/rdkit/GraphMol/MolHash/nmmolhash.h +60 -0
- rdkit_headers/include/rdkit/GraphMol/MolInterchange/MolInterchange.h +93 -0
- rdkit_headers/include/rdkit/GraphMol/MolInterchange/details.h +49 -0
- rdkit_headers/include/rdkit/GraphMol/MolOps.h +1016 -0
- rdkit_headers/include/rdkit/GraphMol/MolPickler.h +314 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/AcidBaseCatalog/AcidBaseCatalogEntry.h +56 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/AcidBaseCatalog/AcidBaseCatalogParams.h +65 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/AcidBaseCatalog/AcidBaseCatalogUtils.h +37 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/Charge.h +145 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/Fragment.h +105 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/FragmentCatalog/FragmentCatalogEntry.h +60 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/FragmentCatalog/FragmentCatalogParams.h +63 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/FragmentCatalog/FragmentCatalogUtils.h +35 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/Metal.h +73 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/MolStandardize.h +178 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/Normalize.h +104 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/Tautomer.h +428 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/TautomerCatalog/TautomerCatalogEntry.h +59 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/TautomerCatalog/TautomerCatalogParams.h +69 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/TautomerCatalog/TautomerCatalogUtils.h +81 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/TransformCatalog/TransformCatalogEntry.h +57 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/TransformCatalog/TransformCatalogParams.h +66 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/TransformCatalog/TransformCatalogUtils.h +37 -0
- rdkit_headers/include/rdkit/GraphMol/MolStandardize/Validate.h +199 -0
- rdkit_headers/include/rdkit/GraphMol/MolTransforms/MolTransforms.h +222 -0
- rdkit_headers/include/rdkit/GraphMol/MonomerInfo.h +138 -0
- rdkit_headers/include/rdkit/GraphMol/PartialCharges/GasteigerCharges.h +27 -0
- rdkit_headers/include/rdkit/GraphMol/PartialCharges/GasteigerParams.h +86 -0
- rdkit_headers/include/rdkit/GraphMol/PeriodicTable.h +325 -0
- rdkit_headers/include/rdkit/GraphMol/QueryAtom.h +161 -0
- rdkit_headers/include/rdkit/GraphMol/QueryBond.h +146 -0
- rdkit_headers/include/rdkit/GraphMol/QueryOps.h +1110 -0
- rdkit_headers/include/rdkit/GraphMol/RDKitBase.h +35 -0
- rdkit_headers/include/rdkit/GraphMol/RDKitQueries.h +25 -0
- rdkit_headers/include/rdkit/GraphMol/RGroupDecomposition/RGroupDecomp.h +225 -0
- rdkit_headers/include/rdkit/GraphMol/ROMol.h +844 -0
- rdkit_headers/include/rdkit/GraphMol/RWMol.h +222 -0
- rdkit_headers/include/rdkit/GraphMol/ReducedGraphs/ReducedGraphs.h +85 -0
- rdkit_headers/include/rdkit/GraphMol/Resonance.h +236 -0
- rdkit_headers/include/rdkit/GraphMol/RingInfo.h +274 -0
- rdkit_headers/include/rdkit/GraphMol/Rings.h +90 -0
- rdkit_headers/include/rdkit/GraphMol/SLNParse/SLNAttribs.h +93 -0
- rdkit_headers/include/rdkit/GraphMol/SLNParse/SLNParse.h +70 -0
- rdkit_headers/include/rdkit/GraphMol/SLNParse/SLNParseOps.h +328 -0
- rdkit_headers/include/rdkit/GraphMol/SanitException.h +120 -0
- rdkit_headers/include/rdkit/GraphMol/ScaffoldNetwork/ScaffoldNetwork.h +195 -0
- rdkit_headers/include/rdkit/GraphMol/ShapeHelpers/ShapeEncoder.h +73 -0
- rdkit_headers/include/rdkit/GraphMol/ShapeHelpers/ShapeUtils.h +279 -0
- rdkit_headers/include/rdkit/GraphMol/SmilesParse/SmartsWrite.h +46 -0
- rdkit_headers/include/rdkit/GraphMol/SmilesParse/SmilesParse.h +160 -0
- rdkit_headers/include/rdkit/GraphMol/SmilesParse/SmilesParseOps.h +53 -0
- rdkit_headers/include/rdkit/GraphMol/SmilesParse/SmilesWrite.h +288 -0
- rdkit_headers/include/rdkit/GraphMol/SmilesParse/primes.h +18 -0
- rdkit_headers/include/rdkit/GraphMol/StereoGroup.h +74 -0
- rdkit_headers/include/rdkit/GraphMol/Subgraphs/SubgraphUtils.h +57 -0
- rdkit_headers/include/rdkit/GraphMol/Subgraphs/Subgraphs.h +154 -0
- rdkit_headers/include/rdkit/GraphMol/SubstanceGroup.h +297 -0
- rdkit_headers/include/rdkit/GraphMol/Substruct/SubstructMatch.h +232 -0
- rdkit_headers/include/rdkit/GraphMol/Substruct/SubstructUtils.h +44 -0
- rdkit_headers/include/rdkit/GraphMol/SubstructLibrary/PatternFactory.h +40 -0
- rdkit_headers/include/rdkit/GraphMol/SubstructLibrary/SubstructLibrary.h +951 -0
- rdkit_headers/include/rdkit/GraphMol/SubstructLibrary/SubstructLibrarySerialization.h +231 -0
- rdkit_headers/include/rdkit/GraphMol/TautomerQuery/TautomerQuery.h +104 -0
- rdkit_headers/include/rdkit/GraphMol/Trajectory/Snapshot.h +69 -0
- rdkit_headers/include/rdkit/GraphMol/Trajectory/Trajectory.h +105 -0
- rdkit_headers/include/rdkit/GraphMol/atomic_data.h +76 -0
- rdkit_headers/include/rdkit/GraphMol/details.h +15 -0
- rdkit_headers/include/rdkit/GraphMol/new_canon.h +772 -0
- rdkit_headers/include/rdkit/Numerics/Alignment/AlignPoints.h +49 -0
- rdkit_headers/include/rdkit/Numerics/Conrec.h +203 -0
- rdkit_headers/include/rdkit/Numerics/EigenSolvers/PowerEigenSolver.h +68 -0
- rdkit_headers/include/rdkit/Numerics/Matrix.h +347 -0
- rdkit_headers/include/rdkit/Numerics/Optimizer/BFGSOpt.h +397 -0
- rdkit_headers/include/rdkit/Numerics/SquareMatrix.h +89 -0
- rdkit_headers/include/rdkit/Numerics/SymmMatrix.h +361 -0
- rdkit_headers/include/rdkit/Numerics/Vector.h +327 -0
- rdkit_headers/include/rdkit/Query/AndQuery.h +57 -0
- rdkit_headers/include/rdkit/Query/EqualityQuery.h +88 -0
- rdkit_headers/include/rdkit/Query/GreaterEqualQuery.h +74 -0
- rdkit_headers/include/rdkit/Query/GreaterQuery.h +74 -0
- rdkit_headers/include/rdkit/Query/LessEqualQuery.h +75 -0
- rdkit_headers/include/rdkit/Query/LessQuery.h +74 -0
- rdkit_headers/include/rdkit/Query/NullQueryAlgebra.h +86 -0
- rdkit_headers/include/rdkit/Query/OrQuery.h +58 -0
- rdkit_headers/include/rdkit/Query/Query.h +210 -0
- rdkit_headers/include/rdkit/Query/QueryObjects.h +38 -0
- rdkit_headers/include/rdkit/Query/RangeQuery.h +116 -0
- rdkit_headers/include/rdkit/Query/SetQuery.h +87 -0
- rdkit_headers/include/rdkit/Query/XOrQuery.h +63 -0
- rdkit_headers/include/rdkit/RDGeneral/BadFileException.h +39 -0
- rdkit_headers/include/rdkit/RDGeneral/BoostEndInclude.h +69 -0
- rdkit_headers/include/rdkit/RDGeneral/BoostStartInclude.h +95 -0
- rdkit_headers/include/rdkit/RDGeneral/ConcurrentQueue.h +132 -0
- rdkit_headers/include/rdkit/RDGeneral/Dict.h +350 -0
- rdkit_headers/include/rdkit/RDGeneral/Exceptions.h +73 -0
- rdkit_headers/include/rdkit/RDGeneral/FileParseException.h +36 -0
- rdkit_headers/include/rdkit/RDGeneral/Invariant.h +198 -0
- rdkit_headers/include/rdkit/RDGeneral/LocaleSwitcher.h +54 -0
- rdkit_headers/include/rdkit/RDGeneral/RDAny.h +217 -0
- rdkit_headers/include/rdkit/RDGeneral/RDConfig.h +49 -0
- rdkit_headers/include/rdkit/RDGeneral/RDExportMacros.h +40 -0
- rdkit_headers/include/rdkit/RDGeneral/RDLog.h +142 -0
- rdkit_headers/include/rdkit/RDGeneral/RDProps.h +172 -0
- rdkit_headers/include/rdkit/RDGeneral/RDThreads.h +44 -0
- rdkit_headers/include/rdkit/RDGeneral/RDValue-doublemagic.h +478 -0
- rdkit_headers/include/rdkit/RDGeneral/RDValue-taggedunion.h +518 -0
- rdkit_headers/include/rdkit/RDGeneral/RDValue.h +285 -0
- rdkit_headers/include/rdkit/RDGeneral/Ranking.h +87 -0
- rdkit_headers/include/rdkit/RDGeneral/StreamOps.h +637 -0
- rdkit_headers/include/rdkit/RDGeneral/export.h +559 -0
- rdkit_headers/include/rdkit/RDGeneral/hanoiSort.h +167 -0
- rdkit_headers/include/rdkit/RDGeneral/hash/detail/float_functions.hpp +156 -0
- rdkit_headers/include/rdkit/RDGeneral/hash/detail/hash_float.hpp +179 -0
- rdkit_headers/include/rdkit/RDGeneral/hash/extensions.hpp +152 -0
- rdkit_headers/include/rdkit/RDGeneral/hash/hash.hpp +463 -0
- rdkit_headers/include/rdkit/RDGeneral/hash/hash_fwd.hpp +51 -0
- rdkit_headers/include/rdkit/RDGeneral/test.h +274 -0
- rdkit_headers/include/rdkit/RDGeneral/types.h +401 -0
- rdkit_headers/include/rdkit/RDGeneral/utils.h +106 -0
- rdkit_headers/include/rdkit/RDGeneral/versions.h +27 -0
- rdkit_headers/include/rdkit/RDStreams/streams.h +19 -0
- rdkit_headers/include/rdkit/RingDecomposerLib.h +751 -0
- rdkit_headers/include/rdkit/SimDivPickers/DistPicker.h +92 -0
- rdkit_headers/include/rdkit/SimDivPickers/HierarchicalClusterPicker.h +107 -0
- rdkit_headers/include/rdkit/SimDivPickers/LeaderPicker.h +470 -0
- rdkit_headers/include/rdkit/SimDivPickers/MaxMinPicker.h +303 -0
- rdkit_headers-2022.3.3.dist-info/METADATA +24 -0
- rdkit_headers-2022.3.3.dist-info/RECORD +320 -0
- rdkit_headers-2022.3.3.dist-info/WHEEL +4 -0
- rdkit_headers-2022.3.3.dist-info/entry_points.txt +4 -0
- rdkit_headers-2022.3.3.dist-info/licenses/LICENSE +29 -0
- rdkit_headers-2022.3.3.dist-info/licenses/NOTICE +5 -0
|
@@ -0,0 +1,284 @@
|
|
|
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 (CozChemIx Limited)
|
|
11
|
+
//
|
|
12
|
+
// A load of helper classes used by MolDraw2D.
|
|
13
|
+
|
|
14
|
+
#ifndef RDKIT_MOLDRAW2DHELPERS_H
|
|
15
|
+
#define RDKIT_MOLDRAW2DHELPERS_H
|
|
16
|
+
|
|
17
|
+
#include <Geometry/point.h>
|
|
18
|
+
|
|
19
|
+
using RDGeom::Point2D;
|
|
20
|
+
|
|
21
|
+
namespace RDKit {
|
|
22
|
+
|
|
23
|
+
namespace MolDraw2D_detail {
|
|
24
|
+
// for aligning the drawing of text to the passed in coords.
|
|
25
|
+
enum class OrientType : unsigned char { C = 0, N, E, S, W };
|
|
26
|
+
enum class TextAlignType : unsigned char { MIDDLE = 0, START, END };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
struct DrawColour {
|
|
30
|
+
double r = 0.0, g = 0.0, b = 0.0, a = 1.0;
|
|
31
|
+
DrawColour() = default;
|
|
32
|
+
DrawColour(double r, double g, double b, double a = 1.0)
|
|
33
|
+
: r(r), g(g), b(b), a(a) {}
|
|
34
|
+
bool operator==(const DrawColour &other) const {
|
|
35
|
+
return r == other.r && g == other.g && b == other.b && a == other.a;
|
|
36
|
+
}
|
|
37
|
+
bool feq(const DrawColour &other, double tol = 0.001,
|
|
38
|
+
bool ignoreAlpha = true) const {
|
|
39
|
+
return fabs(r - other.r) <= tol && fabs(g - other.g) <= tol &&
|
|
40
|
+
fabs(b - other.b) <= tol &&
|
|
41
|
+
(ignoreAlpha || fabs(a - other.a) <= tol);
|
|
42
|
+
}
|
|
43
|
+
DrawColour operator+(const DrawColour &other) const {
|
|
44
|
+
return {r + other.r, g + other.g, b + other.b, a + other.a};
|
|
45
|
+
}
|
|
46
|
+
DrawColour operator-(const DrawColour &other) const {
|
|
47
|
+
return {r - other.r, g - other.g, b - other.b, a - other.a};
|
|
48
|
+
}
|
|
49
|
+
DrawColour operator/(double v) const {
|
|
50
|
+
PRECONDITION(v != 0.0, "divide by zero");
|
|
51
|
+
return {r / v, g / v, b / v, a / v};
|
|
52
|
+
}
|
|
53
|
+
DrawColour operator*(double v) const { return {r * v, g * v, b * v, a * v}; }
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
typedef std::map<int, DrawColour> ColourPalette;
|
|
57
|
+
typedef std::vector<double> DashPattern;
|
|
58
|
+
|
|
59
|
+
//! use the RDKit's default palette r
|
|
60
|
+
inline void assignDefaultPalette(ColourPalette &palette) {
|
|
61
|
+
palette.clear();
|
|
62
|
+
palette[-1] = DrawColour(0, 0, 0);
|
|
63
|
+
palette[0] = DrawColour(0.1, 0.1, 0.1);
|
|
64
|
+
palette[1] = palette[6] = DrawColour(0.0, 0.0, 0.0);
|
|
65
|
+
palette[7] = DrawColour(0.0, 0.0, 1.0);
|
|
66
|
+
palette[8] = DrawColour(1.0, 0.0, 0.0);
|
|
67
|
+
palette[9] = DrawColour(0.2, 0.8, 0.8);
|
|
68
|
+
palette[15] = DrawColour(1.0, 0.5, 0.0);
|
|
69
|
+
palette[16] = DrawColour(0.8, 0.8, 0.0);
|
|
70
|
+
palette[17] = DrawColour(0.0, 0.802, 0.0);
|
|
71
|
+
palette[35] = DrawColour(0.5, 0.3, 0.1);
|
|
72
|
+
palette[53] = DrawColour(0.63, 0.12, 0.94);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
//! use the color palette from the Avalon renderer
|
|
76
|
+
inline void assignAvalonPalette(ColourPalette &palette) {
|
|
77
|
+
palette.clear();
|
|
78
|
+
palette[-1] = DrawColour(0, 0, 0);
|
|
79
|
+
palette[0] = DrawColour(0.1, 0.1, 0.1);
|
|
80
|
+
palette[1] = palette[6] = DrawColour(0.0, 0.0, 0.0);
|
|
81
|
+
palette[7] = DrawColour(0.0, 0.0, 1.0);
|
|
82
|
+
palette[8] = DrawColour(1.0, 0.0, 0.0);
|
|
83
|
+
palette[9] = DrawColour(0.0, 0.498, 0.0);
|
|
84
|
+
palette[15] = DrawColour(0.498, 0.0, 0.498);
|
|
85
|
+
palette[16] = DrawColour(0.498, 0.247, 0.0);
|
|
86
|
+
palette[17] = DrawColour(0.0, 0.498, 0.0);
|
|
87
|
+
palette[35] = DrawColour(0.0, 0.498, 0.0);
|
|
88
|
+
palette[53] = DrawColour(0.247, 0.0, 0.498);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
//! use (part of) the CDK color palette
|
|
92
|
+
/*!
|
|
93
|
+
data source:
|
|
94
|
+
https://github.com/cdk/cdk/blob/master/display/render/src/main/java/org/openscience/cdk/renderer/color/CDK2DAtomColors.java
|
|
95
|
+
*/
|
|
96
|
+
inline void assignCDKPalette(ColourPalette &palette) {
|
|
97
|
+
palette.clear();
|
|
98
|
+
palette[-1] = DrawColour(0, 0, 0);
|
|
99
|
+
palette[0] = DrawColour(0.1, 0.1, 0.1);
|
|
100
|
+
palette[1] = palette[6] = DrawColour(0.0, 0.0, 0.0);
|
|
101
|
+
palette[7] = DrawColour(0.188, 0.314, 0.972);
|
|
102
|
+
palette[8] = DrawColour(1.0, 0.051, 0.051);
|
|
103
|
+
palette[9] = DrawColour(0.565, 0.878, 0.314);
|
|
104
|
+
palette[15] = DrawColour(1.0, 0.5, 0.0);
|
|
105
|
+
palette[16] = DrawColour(0.776, 0.776, 0.173);
|
|
106
|
+
palette[17] = DrawColour(0.122, 0.498, 0.122);
|
|
107
|
+
palette[35] = DrawColour(0.651, 0.161, 0.161);
|
|
108
|
+
palette[53] = DrawColour(0.580, 0.0, 0.580);
|
|
109
|
+
palette[5] = DrawColour(1.000, 0.710, 0.710);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
inline void assignDarkModePalette(ColourPalette &palette) {
|
|
113
|
+
palette.clear();
|
|
114
|
+
palette[-1] = DrawColour(0.8, 0.8, 0.8);
|
|
115
|
+
palette[0] = DrawColour(0.9, 0.9, 0.9);
|
|
116
|
+
palette[1] = palette[6] = DrawColour(0.9, 0.9, 0.9);
|
|
117
|
+
palette[7] = DrawColour(0.33, 0.41, 0.92);
|
|
118
|
+
palette[8] = DrawColour(1.0, 0.2, 0.2);
|
|
119
|
+
palette[9] = DrawColour(0.2, 0.8, 0.8);
|
|
120
|
+
palette[15] = DrawColour(1.0, 0.5, 0.0);
|
|
121
|
+
palette[16] = DrawColour(0.8, 0.8, 0.0);
|
|
122
|
+
palette[17] = DrawColour(0.0, 0.802, 0.0);
|
|
123
|
+
palette[35] = DrawColour(0.71, 0.4, 0.07);
|
|
124
|
+
palette[53] = DrawColour(0.89, 0.004, 1);
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
inline void assignBWPalette(ColourPalette &palette) {
|
|
128
|
+
palette.clear();
|
|
129
|
+
palette[-1] = DrawColour(0, 0, 0);
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
struct RDKIT_MOLDRAW2D_EXPORT MolDrawOptions {
|
|
133
|
+
bool atomLabelDeuteriumTritium =
|
|
134
|
+
false; // toggles replacing 2H with D and 3H with T
|
|
135
|
+
bool dummiesAreAttachments = false; // draws "breaks" at dummy atoms
|
|
136
|
+
bool circleAtoms = true; // draws circles under highlighted atoms
|
|
137
|
+
bool splitBonds = false; // split bonds into per atom segments
|
|
138
|
+
// most useful for dynamic manipulation of drawing
|
|
139
|
+
// especially for svg
|
|
140
|
+
DrawColour highlightColour{1, 0.5, 0.5, 1.0}; // default highlight color
|
|
141
|
+
bool continuousHighlight = true; // highlight by drawing an outline
|
|
142
|
+
// *underneath* the molecule
|
|
143
|
+
bool fillHighlights = true; // fill the areas used to highlight atoms and
|
|
144
|
+
// atom regions
|
|
145
|
+
double highlightRadius = 0.3; // default if nothing given for a particular
|
|
146
|
+
// atom. units are "Angstrom"
|
|
147
|
+
int flagCloseContactsDist = 3; // if positive, this will be used as a cutoff
|
|
148
|
+
// (in pixels) for highlighting close contacts
|
|
149
|
+
bool includeAtomTags =
|
|
150
|
+
false; // toggles inclusion of atom tags in the output. does
|
|
151
|
+
// not make sense for all renderers.
|
|
152
|
+
bool clearBackground = true; // toggles clearing the background before
|
|
153
|
+
// drawing a molecule
|
|
154
|
+
DrawColour backgroundColour{
|
|
155
|
+
1, 1, 1, 1}; // color to be used while clearing the background
|
|
156
|
+
int legendFontSize = 16; // font size (in pixels) to be used for the legend
|
|
157
|
+
// (if present)
|
|
158
|
+
double legendFraction =
|
|
159
|
+
0.1; // fraction of the draw panel to be used for the legend if present
|
|
160
|
+
int maxFontSize = 40; // maximum size in pixels for font in drawn molecule.
|
|
161
|
+
// -1 means no max.
|
|
162
|
+
int minFontSize = 6; // likewise for -1.
|
|
163
|
+
int fixedFontSize =
|
|
164
|
+
-1; // font size to use, in pixels. Default -1 means not fixed. If set,
|
|
165
|
+
// always used irrespective of scale, minFontSize and maxFontSize.
|
|
166
|
+
double annotationFontScale = 0.5; // scales font relative to atom labels for
|
|
167
|
+
// atom and bond annotation.
|
|
168
|
+
std::string fontFile = ""; // name of font for freetype rendering. If given,
|
|
169
|
+
// over-rides default
|
|
170
|
+
DrawColour legendColour{0, 0,
|
|
171
|
+
0}; // color to be used for the legend (if present)
|
|
172
|
+
double multipleBondOffset = 0.15; // offset (in Angstrom) for the extra lines
|
|
173
|
+
// in a multiple bond
|
|
174
|
+
double padding =
|
|
175
|
+
0.05; // fraction of empty space to leave around the molecule
|
|
176
|
+
double additionalAtomLabelPadding = 0.0; // additional padding to leave
|
|
177
|
+
// around atom labels. Expressed as
|
|
178
|
+
// a fraction of the font size.
|
|
179
|
+
std::map<int, std::string> atomLabels; // replacement labels for atoms
|
|
180
|
+
bool noAtomLabels =
|
|
181
|
+
false; // disables inclusion of atom labels in the rendering
|
|
182
|
+
std::vector<std::vector<int>> atomRegions; // regions
|
|
183
|
+
DrawColour symbolColour{
|
|
184
|
+
0, 0, 0, 1}; // color to be used for the symbols and arrows in reactions
|
|
185
|
+
DrawColour annotationColour{0, 0, 0, 1}; // color to be used for annotations
|
|
186
|
+
int bondLineWidth = 2; // default line width when drawing bonds
|
|
187
|
+
bool scaleBondWidth = false; // whether to apply scale() to the bond width
|
|
188
|
+
bool scaleHighlightBondWidth = true; // likewise with bond highlights.
|
|
189
|
+
int highlightBondWidthMultiplier = 8; // what to multiply standard bond width
|
|
190
|
+
// by for highlighting.
|
|
191
|
+
bool prepareMolsBeforeDrawing = true; // call prepareMolForDrawing() on each
|
|
192
|
+
// molecule passed to drawMolecules()
|
|
193
|
+
std::vector<DrawColour> highlightColourPalette; // defining 10 default colors
|
|
194
|
+
// for highlighting atoms and bonds
|
|
195
|
+
// or reactants in a reactions
|
|
196
|
+
ColourPalette atomColourPalette; // the palette used to assign
|
|
197
|
+
// colors to atoms based on
|
|
198
|
+
// atomic number.
|
|
199
|
+
double fixedScale =
|
|
200
|
+
-1.0; // fixes scale to this fraction of draw window width, so
|
|
201
|
+
// an average bond is this fraction of the width. If
|
|
202
|
+
// scale comes out smaller than this, reduces scale, but
|
|
203
|
+
// won't make it larger. The default of -1.0 means no fix.
|
|
204
|
+
double fixedBondLength =
|
|
205
|
+
-1.0; // fixes the bond length (and hence the scale) to
|
|
206
|
+
// always be this number of pixels. Assuming a bond
|
|
207
|
+
// length in coordinates is 1, as is normal. If
|
|
208
|
+
// scale comes out smaller than this, reduces scale,
|
|
209
|
+
// but won't make it larger. The default -1.0 means no
|
|
210
|
+
// fix. If both fixedScale and fixedBondLength are >
|
|
211
|
+
// 0.0, fixedScale wins.
|
|
212
|
+
double rotate = 0.0; // angle in degrees to rotate coords by about centre
|
|
213
|
+
// before drawing.
|
|
214
|
+
bool addAtomIndices = false; // adds atom indices to drawings.
|
|
215
|
+
bool addBondIndices = false; // adds bond indices to drawings.
|
|
216
|
+
bool isotopeLabels = true; // adds isotope to non-dummy atoms.
|
|
217
|
+
bool dummyIsotopeLabels = true; // adds isotope labels to dummy atoms.
|
|
218
|
+
|
|
219
|
+
bool addStereoAnnotation = false; // adds E/Z and R/S to drawings.
|
|
220
|
+
bool atomHighlightsAreCircles = false; // forces atom highlights always to be
|
|
221
|
+
// circles. Default (false) is to put
|
|
222
|
+
// ellipses round longer labels.
|
|
223
|
+
bool centreMoleculesBeforeDrawing = false; // moves the centre of the drawn
|
|
224
|
+
// molecule to (0,0)
|
|
225
|
+
bool explicitMethyl = false; // draw terminal methyl and related as CH3
|
|
226
|
+
bool includeRadicals =
|
|
227
|
+
true; // include radicals in the drawing (it can be useful to turn this
|
|
228
|
+
// off for reactions and queries)
|
|
229
|
+
bool includeMetadata =
|
|
230
|
+
true; // when possible include metadata about molecules and reactions in
|
|
231
|
+
// the output to allow them to be reconstructed
|
|
232
|
+
bool comicMode = false; // simulate hand-drawn lines for bonds. When combined
|
|
233
|
+
// with a font like Comic-Sans or Comic-Neue, this
|
|
234
|
+
// gives xkcd-like drawings.
|
|
235
|
+
int variableBondWidthMultiplier = 16; // what to multiply standard bond width
|
|
236
|
+
// by for variable attachment points.
|
|
237
|
+
double variableAtomRadius = 0.4; // radius value to use for atoms involved in
|
|
238
|
+
// variable attachment points.
|
|
239
|
+
DrawColour variableAttachmentColour = {
|
|
240
|
+
0.8, 0.8, 0.8, 1.0}; // colour to use for variable attachment points
|
|
241
|
+
bool includeChiralFlagLabel =
|
|
242
|
+
false; // add a molecule annotation with "ABS" if the chiral flag is set
|
|
243
|
+
bool simplifiedStereoGroupLabel =
|
|
244
|
+
false; // if all specified stereocenters are in a single StereoGroup,
|
|
245
|
+
// show a molecule-level annotation instead of the individual
|
|
246
|
+
// labels
|
|
247
|
+
bool singleColourWedgeBonds =
|
|
248
|
+
false; // if true wedged and dashed bonds are drawn
|
|
249
|
+
// using symbolColour rather than inheriting
|
|
250
|
+
// their colour from the atoms
|
|
251
|
+
double scalingFactor = 20.0; // scaling factor used for pixels->angstrom
|
|
252
|
+
// when auto scaling is being used
|
|
253
|
+
double baseFontSize =
|
|
254
|
+
-1.0; // when > 0 this is used to set the baseFontSize used for text
|
|
255
|
+
// drawing. As a reference point: the default value for
|
|
256
|
+
// DrawText::baseFontSize is 0.6
|
|
257
|
+
bool drawMolsSameScale = true; // when drawing multiple molecules with
|
|
258
|
+
// DrawMolecules, forces them to use the same
|
|
259
|
+
// scale. Default is true.
|
|
260
|
+
|
|
261
|
+
MolDrawOptions() {
|
|
262
|
+
highlightColourPalette.emplace_back(
|
|
263
|
+
DrawColour(1., 1., .67)); // popcorn yellow
|
|
264
|
+
highlightColourPalette.emplace_back(DrawColour(1., .8, .6)); // sand
|
|
265
|
+
highlightColourPalette.emplace_back(
|
|
266
|
+
DrawColour(1., .71, .76)); // light pink
|
|
267
|
+
highlightColourPalette.emplace_back(
|
|
268
|
+
DrawColour(.8, 1., .8)); // offwhitegreen
|
|
269
|
+
highlightColourPalette.emplace_back(DrawColour(.87, .63, .87)); // plum
|
|
270
|
+
highlightColourPalette.emplace_back(
|
|
271
|
+
DrawColour(.76, .94, .96)); // pastel blue
|
|
272
|
+
highlightColourPalette.emplace_back(
|
|
273
|
+
DrawColour(.67, .67, 1.)); // periwinkle
|
|
274
|
+
highlightColourPalette.emplace_back(DrawColour(.64, .76, .34)); // avocado
|
|
275
|
+
highlightColourPalette.emplace_back(
|
|
276
|
+
DrawColour(.56, .93, .56)); // light green
|
|
277
|
+
highlightColourPalette.emplace_back(DrawColour(.20, .63, .79)); // peacock
|
|
278
|
+
assignDefaultPalette(atomColourPalette);
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
} // namespace RDKit
|
|
283
|
+
|
|
284
|
+
#endif // RDKIT_MOLDRAW2DHELPERS_H
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (C) 2020 Greg Landrum and T5 informatics GmbH
|
|
3
|
+
//
|
|
4
|
+
// @@ All Rights Reserved @@
|
|
5
|
+
// This file is part of the RDKit.
|
|
6
|
+
// The contents are covered by the terms of the BSD license
|
|
7
|
+
// which is included in the file license.txt, found at the root
|
|
8
|
+
// of the RDKit source tree.
|
|
9
|
+
//
|
|
10
|
+
// derived from Dave Cosgrove's MolDraw2D
|
|
11
|
+
//
|
|
12
|
+
// This is a concrete class derived from MolDraw2D that uses RDKit to draw using
|
|
13
|
+
// the JS canvas. This requires emscripten and is only intended for the RDKit
|
|
14
|
+
// Javascript builds
|
|
15
|
+
|
|
16
|
+
#include <RDGeneral/export.h>
|
|
17
|
+
#ifndef MOLDRAW2DJS_H
|
|
18
|
+
#define MOLDRAW2DJS_H
|
|
19
|
+
|
|
20
|
+
#include <iostream>
|
|
21
|
+
#include <sstream>
|
|
22
|
+
#include <emscripten.h>
|
|
23
|
+
#include <emscripten/val.h>
|
|
24
|
+
|
|
25
|
+
#include <GraphMol/MolDraw2D/MolDraw2D.h>
|
|
26
|
+
|
|
27
|
+
// ****************************************************************************
|
|
28
|
+
|
|
29
|
+
namespace RDKit {
|
|
30
|
+
|
|
31
|
+
class RDKIT_MOLDRAW2D_EXPORT MolDraw2DJS : public MolDraw2D {
|
|
32
|
+
public:
|
|
33
|
+
// initialize to use a particular ostream
|
|
34
|
+
MolDraw2DJS(int width, int height, emscripten::val &context,
|
|
35
|
+
int panelWidth = -1, int panelHeight = -1,
|
|
36
|
+
bool noFreetype = false)
|
|
37
|
+
: MolDraw2D(width, height, panelWidth, panelHeight), d_context(context) {
|
|
38
|
+
PRECONDITION(width > 0, "bad width");
|
|
39
|
+
PRECONDITION(height > 0, "bad height");
|
|
40
|
+
initTextDrawer(noFreetype);
|
|
41
|
+
}
|
|
42
|
+
MolDraw2DJS(const MolDraw2DJS &) = delete;
|
|
43
|
+
MolDraw2DJS(MolDraw2DJS &&) = delete;
|
|
44
|
+
MolDraw2DJS &operator=(const MolDraw2DJS &) = delete;
|
|
45
|
+
MolDraw2DJS &operator=(MolDraw2DJS &&) = delete;
|
|
46
|
+
|
|
47
|
+
void drawLine(const Point2D &cds1, const Point2D &cds2,
|
|
48
|
+
bool rawCoords = false) override;
|
|
49
|
+
void drawPolygon(const std::vector<Point2D> &cds,
|
|
50
|
+
bool rawCoords = false) override;
|
|
51
|
+
void drawEllipse(const Point2D &cds1, const Point2D &cds2,
|
|
52
|
+
bool rawCoords = false) override;
|
|
53
|
+
void clearDrawing() override;
|
|
54
|
+
|
|
55
|
+
private:
|
|
56
|
+
emscripten::val &d_context;
|
|
57
|
+
void initDrawing() override;
|
|
58
|
+
void initTextDrawer(bool noFreetype) override;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
} // namespace RDKit
|
|
62
|
+
#endif // MOLDRAW2DSVG_H
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (C) 2015-2021 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
|
+
// derived from Dave Cosgrove's MolDraw2D
|
|
11
|
+
//
|
|
12
|
+
// This is a concrete class derived from MolDraw2D that uses RDKit to draw a
|
|
13
|
+
// molecule into an SVG file
|
|
14
|
+
|
|
15
|
+
#include <RDGeneral/export.h>
|
|
16
|
+
#ifndef MOLDRAW2DSVG_H
|
|
17
|
+
#define MOLDRAW2DSVG_H
|
|
18
|
+
|
|
19
|
+
#include <iostream>
|
|
20
|
+
#include <sstream>
|
|
21
|
+
#include <GraphMol/MolDraw2D/MolDraw2D.h>
|
|
22
|
+
|
|
23
|
+
// ****************************************************************************
|
|
24
|
+
|
|
25
|
+
namespace RDKit {
|
|
26
|
+
|
|
27
|
+
class RDKIT_MOLDRAW2D_EXPORT MolDraw2DSVG : public MolDraw2D {
|
|
28
|
+
public:
|
|
29
|
+
// initialize to use a particular ostream
|
|
30
|
+
MolDraw2DSVG(int width, int height, std::ostream &os, int panelWidth = -1,
|
|
31
|
+
int panelHeight = -1, bool noFreetype = false);
|
|
32
|
+
|
|
33
|
+
// initialize to use the internal stringstream
|
|
34
|
+
MolDraw2DSVG(int width, int height, int panelWidth = -1, int panelHeight = -1,
|
|
35
|
+
bool noFreetype = false);
|
|
36
|
+
MolDraw2DSVG(const MolDraw2DSVG &) = delete;
|
|
37
|
+
MolDraw2DSVG(MolDraw2DSVG &&) = delete;
|
|
38
|
+
MolDraw2DSVG &operator=(const MolDraw2DSVG &) = delete;
|
|
39
|
+
MolDraw2DSVG &operator=(MolDraw2DSVG &&) = delete;
|
|
40
|
+
|
|
41
|
+
void setColour(const DrawColour &col) override;
|
|
42
|
+
|
|
43
|
+
// not sure if this goes here or if we should do a dtor since initDrawing() is
|
|
44
|
+
// called in the ctor,
|
|
45
|
+
// but we'll start here
|
|
46
|
+
void finishDrawing();
|
|
47
|
+
|
|
48
|
+
void drawLine(const Point2D &cds1, const Point2D &cds2,
|
|
49
|
+
bool rawCoords = false) override;
|
|
50
|
+
void drawPolygon(const std::vector<Point2D> &cds,
|
|
51
|
+
bool rawCoords = false) override;
|
|
52
|
+
void drawEllipse(const Point2D &cds1, const Point2D &cds2,
|
|
53
|
+
bool rawCoords = false) override;
|
|
54
|
+
void clearDrawing() override;
|
|
55
|
+
|
|
56
|
+
void drawWavyLine(const Point2D &cds1, const Point2D &cds2,
|
|
57
|
+
const DrawColour &col1, const DrawColour &col2,
|
|
58
|
+
unsigned int nSegments = 16, double vertOffset = 0.05,
|
|
59
|
+
bool rawCoords = false) override;
|
|
60
|
+
|
|
61
|
+
// this only makes sense if the object was initialized without a stream
|
|
62
|
+
std::string getDrawingText() const { return d_ss.str(); }
|
|
63
|
+
|
|
64
|
+
// adds additional tags to the atoms and bonds in the SVG. This should be
|
|
65
|
+
// invoked *after* the molecule has been drawn
|
|
66
|
+
using MolDraw2D::tagAtoms; // Avoid overload warning.
|
|
67
|
+
void tagAtoms(const ROMol &mol) override { tagAtoms(mol, 0.2); }
|
|
68
|
+
void tagAtoms(const ROMol &mol, double radius,
|
|
69
|
+
const std::map<std::string, std::string> &events = {});
|
|
70
|
+
|
|
71
|
+
// adds metadata describing the molecule to the SVG. This allows
|
|
72
|
+
// molecules to be re-built from SVG with MolFromSVG
|
|
73
|
+
void addMoleculeMetadata(const ROMol &mol, int confId = -1) const;
|
|
74
|
+
void addMoleculeMetadata(const std::vector<ROMol *> &mols,
|
|
75
|
+
const std::vector<int> confIds = {});
|
|
76
|
+
|
|
77
|
+
private:
|
|
78
|
+
std::ostream &d_os;
|
|
79
|
+
std::stringstream d_ss;
|
|
80
|
+
|
|
81
|
+
void initDrawing() override;
|
|
82
|
+
void initTextDrawer(bool noFreetype) override;
|
|
83
|
+
|
|
84
|
+
void outputClasses();
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
} // namespace RDKit
|
|
88
|
+
#endif // MOLDRAW2DSVG_H
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (C) 2016-2021 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
|
+
|
|
11
|
+
#include <RDGeneral/export.h>
|
|
12
|
+
#ifndef MOLDRAW2DUTILS_H
|
|
13
|
+
#define MOLDRAW2DUTILS_H
|
|
14
|
+
#include <GraphMol/RWMol.h>
|
|
15
|
+
|
|
16
|
+
#include <boost/tuple/tuple.hpp>
|
|
17
|
+
|
|
18
|
+
// ****************************************************************************
|
|
19
|
+
|
|
20
|
+
namespace RDKit {
|
|
21
|
+
class MolDraw2D;
|
|
22
|
+
class MolDraw2DColour;
|
|
23
|
+
|
|
24
|
+
namespace MolDraw2DUtils {
|
|
25
|
+
|
|
26
|
+
//! Does some cleanup operations on the molecule to prepare it to draw nicely
|
|
27
|
+
/*
|
|
28
|
+
The operations include: kekulization, addition of chiral Hs (so that we can draw
|
|
29
|
+
wedges to them), wedging of bonds at chiral centers, and generation of a 2D
|
|
30
|
+
conformation if the molecule does not already have a conformation
|
|
31
|
+
|
|
32
|
+
\param mol: the molecule to be modified
|
|
33
|
+
\param kekulize: toggles kekulization (this can fail, see below)
|
|
34
|
+
\param addChiralHs: adds Hs to the graph on chiral atoms
|
|
35
|
+
\param wedgeBonds: calls WedgeMolBonds()
|
|
36
|
+
\param forceCoords: generates a 2D conformation even if one is present already
|
|
37
|
+
\param wavyBonds: calls addWavyBondsForStereoAny() and clears other markers that
|
|
38
|
+
double bond stereo is unknown
|
|
39
|
+
|
|
40
|
+
NOTE: the kekulization step can fail, throwing a MolSanitizeExecption. If this
|
|
41
|
+
happens the molecule will be in an inconsistent, partially kekulized, state.
|
|
42
|
+
This isn't normally a problem for molecules that have been sanitized, but can be
|
|
43
|
+
problematic if the molecules have been modified post santitization.
|
|
44
|
+
*/
|
|
45
|
+
RDKIT_MOLDRAW2D_EXPORT void prepareMolForDrawing(
|
|
46
|
+
RWMol &mol, bool kekulize = true, bool addChiralHs = true,
|
|
47
|
+
bool wedgeBonds = true, bool forceCoords = false, bool wavyBonds = false);
|
|
48
|
+
|
|
49
|
+
//! prepare a molecule for drawing and draw it
|
|
50
|
+
/*
|
|
51
|
+
\param mol: the molecule to draw
|
|
52
|
+
\param legend: (optional) the legend (to be drawn under the molecule)
|
|
53
|
+
\param highlight_atoms: (optional) vector of atom ids to highlight
|
|
54
|
+
\param highlight_atoms: (optional) vector of bond ids to highlight
|
|
55
|
+
\param highlight_atom_map: (optional) map from atomId -> DrawColour
|
|
56
|
+
providing the highlight colors. If not provided the default
|
|
57
|
+
highlight colour from \c drawOptions() will be used.
|
|
58
|
+
\param highlight_bond_map: (optional) map from bondId -> DrawColour
|
|
59
|
+
providing the highlight colors. If not provided the default
|
|
60
|
+
highlight colour from \c drawOptions() will be used.
|
|
61
|
+
\param highlight_radii: (optional) map from atomId -> radius (in molecule
|
|
62
|
+
coordinates) for the radii of atomic highlights. If not provided
|
|
63
|
+
the default value from \c drawOptions() will be used.
|
|
64
|
+
\param confId: (optional) conformer ID to be used for atomic coordinates
|
|
65
|
+
|
|
66
|
+
*/
|
|
67
|
+
RDKIT_MOLDRAW2D_EXPORT void prepareAndDrawMolecule(
|
|
68
|
+
MolDraw2D &drawer, const ROMol &mol, const std::string &legend = "",
|
|
69
|
+
const std::vector<int> *highlight_atoms = nullptr,
|
|
70
|
+
const std::vector<int> *highlight_bonds = nullptr,
|
|
71
|
+
const std::map<int, DrawColour> *highlight_atom_map = nullptr,
|
|
72
|
+
const std::map<int, DrawColour> *highlight_bond_map = nullptr,
|
|
73
|
+
const std::map<int, double> *highlight_radii = nullptr, int confId = -1,
|
|
74
|
+
bool kekulize = true);
|
|
75
|
+
|
|
76
|
+
RDKIT_MOLDRAW2D_EXPORT void updateDrawerParamsFromJSON(MolDraw2D &drawer,
|
|
77
|
+
const char *json);
|
|
78
|
+
RDKIT_MOLDRAW2D_EXPORT void updateDrawerParamsFromJSON(MolDraw2D &drawer,
|
|
79
|
+
const std::string &json);
|
|
80
|
+
|
|
81
|
+
struct ContourParams {
|
|
82
|
+
bool setScale = true; // assumes the grid is drawn first
|
|
83
|
+
bool dashNegative = true; // use dashed lines for negative contours
|
|
84
|
+
bool fillGrid = false; // shade the grid
|
|
85
|
+
double gridResolution = 0.15; // spacing between elements of the grid
|
|
86
|
+
double contourWidth = 1.0; // linewidth for drawing contours
|
|
87
|
+
double extraGridPadding = 0.0; // extra padding (in molecule coordinates)
|
|
88
|
+
DrawColour contourColour = {0.5, 0.5, 0.5,
|
|
89
|
+
0.5}; // color for drawing contours
|
|
90
|
+
std::vector<DrawColour> colourMap = {
|
|
91
|
+
{0.557, 0.004, 0.322, 0.5},
|
|
92
|
+
{1, 1, 1, 0.5},
|
|
93
|
+
{0.153, 0.392, 0.098, 0.5}}; // similarity map color scheme
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
//! Generates and draws contours for data on a grid
|
|
97
|
+
/*
|
|
98
|
+
\param drawer: the MolDraw2D object to use
|
|
99
|
+
\param grid: the data to be contoured
|
|
100
|
+
\param xcoords: x positions of the grid points
|
|
101
|
+
\param ycoords: y positions of the grid points
|
|
102
|
+
\param nContours: the number of contours to draw
|
|
103
|
+
\param levels: the contours to use
|
|
104
|
+
\param ps: additional parameters controlling the contouring.
|
|
105
|
+
\param mol: molecule to be used to adjust the scale of the drawing.
|
|
106
|
+
If the \c levels argument is empty, the contour levels will be determined
|
|
107
|
+
automatically from the max and min values on the grid and \c levels will
|
|
108
|
+
be updated to include the contour levels.
|
|
109
|
+
|
|
110
|
+
If \c ps.fillGrid is set, the data on the grid will also be drawn using
|
|
111
|
+
the color scheme in \c ps.colourMap
|
|
112
|
+
|
|
113
|
+
if the \c mol argument is given, it will be used to adjust the scale of
|
|
114
|
+
drawing. This is because a common use is to draw the molecule onto
|
|
115
|
+
the contour, and it makes sense if it fits.
|
|
116
|
+
|
|
117
|
+
*/
|
|
118
|
+
RDKIT_MOLDRAW2D_EXPORT void contourAndDrawGrid(
|
|
119
|
+
MolDraw2D &drawer, const double *grid, const std::vector<double> &xcoords,
|
|
120
|
+
const std::vector<double> &ycoords, size_t nContours,
|
|
121
|
+
std::vector<double> &levels, const ContourParams &ps = ContourParams(),
|
|
122
|
+
const ROMol *mol = nullptr);
|
|
123
|
+
//! \overload
|
|
124
|
+
RDKIT_MOLDRAW2D_EXPORT inline void contourAndDrawGrid(
|
|
125
|
+
MolDraw2D &drawer, const double *grid, const std::vector<double> &xcoords,
|
|
126
|
+
const std::vector<double> &ycoords, size_t nContours = 10,
|
|
127
|
+
const ContourParams &ps = ContourParams(), const ROMol *mol = nullptr) {
|
|
128
|
+
std::vector<double> levels;
|
|
129
|
+
contourAndDrawGrid(drawer, grid, xcoords, ycoords, nContours, levels, ps,
|
|
130
|
+
mol);
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
//! Generates and draws contours for a set of gaussians
|
|
134
|
+
/*
|
|
135
|
+
\param drawer: the MolDraw2D object to use
|
|
136
|
+
\param locs: locations of the gaussians
|
|
137
|
+
\param heights: the heights (or weights) of the gaussians
|
|
138
|
+
\param widths: the standard deviations of the gaussians
|
|
139
|
+
\param nContours: the number of contours to draw
|
|
140
|
+
\param levels: the contours to use
|
|
141
|
+
\param ps: additional parameters controlling the contouring.
|
|
142
|
+
\param mol: molecule to be used to adjust the scale of the drawing.
|
|
143
|
+
|
|
144
|
+
The values are calculated on a grid with spacing \c ps.gridResolution.
|
|
145
|
+
If \c ps.setScale is set, the grid size will be calculated based on the
|
|
146
|
+
locations of the gaussians and \c ps.extraGridPadding. Otherwise the current
|
|
147
|
+
size of the viewport will be used.
|
|
148
|
+
|
|
149
|
+
If the \c levels argument is empty, the contour levels will be determined
|
|
150
|
+
automatically from the max and min values on the grid and \c levels will
|
|
151
|
+
be updated to include the contour levels.
|
|
152
|
+
|
|
153
|
+
If \c ps.fillGrid is set, the data on the grid will also be drawn using
|
|
154
|
+
the color scheme in \c ps.colourMap
|
|
155
|
+
|
|
156
|
+
if the \c mol argument is given, it will be used to adjust the scale of
|
|
157
|
+
drawing. This is because a common use is to draw the molecule onto
|
|
158
|
+
the contour, and it makes sense if it fits.
|
|
159
|
+
|
|
160
|
+
*/
|
|
161
|
+
RDKIT_MOLDRAW2D_EXPORT void contourAndDrawGaussians(
|
|
162
|
+
MolDraw2D &drawer, const std::vector<Point2D> &locs,
|
|
163
|
+
const std::vector<double> &heights, const std::vector<double> &widths,
|
|
164
|
+
size_t nContours, std::vector<double> &levels,
|
|
165
|
+
const ContourParams &ps = ContourParams(), const ROMol *mol = nullptr);
|
|
166
|
+
//! \overload
|
|
167
|
+
RDKIT_MOLDRAW2D_EXPORT inline void contourAndDrawGaussians(
|
|
168
|
+
MolDraw2D &drawer, const std::vector<Point2D> &locs,
|
|
169
|
+
const std::vector<double> &heights, const std::vector<double> &widths,
|
|
170
|
+
size_t nContours = 10, const ContourParams &ps = ContourParams(),
|
|
171
|
+
const ROMol *mol = nullptr) {
|
|
172
|
+
std::vector<double> levels;
|
|
173
|
+
contourAndDrawGaussians(drawer, locs, heights, widths, nContours, levels, ps,
|
|
174
|
+
mol);
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
} // namespace MolDraw2DUtils
|
|
178
|
+
} // namespace RDKit
|
|
179
|
+
#endif // MOLDRAW2DUTILS_H
|