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,297 @@
|
|
|
1
|
+
//
|
|
2
|
+
//
|
|
3
|
+
// Copyright (C) 2018-2020 Greg Landrum and T5 Informatics GmbH
|
|
4
|
+
//
|
|
5
|
+
// @@ All Rights Reserved @@
|
|
6
|
+
// This file is part of the RDKit.
|
|
7
|
+
// The contents are covered by the terms of the BSD license
|
|
8
|
+
// which is included in the file license.txt, found at the root
|
|
9
|
+
// of the RDKit source tree.
|
|
10
|
+
//
|
|
11
|
+
/*! \file SubstanceGroup.h
|
|
12
|
+
|
|
13
|
+
\brief Defines the SubstanceGroup class
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
#include <RDGeneral/export.h>
|
|
17
|
+
#ifndef _RD_SGROUP_H
|
|
18
|
+
#define _RD_SGROUP_H
|
|
19
|
+
|
|
20
|
+
#include <utility>
|
|
21
|
+
#include <unordered_map>
|
|
22
|
+
|
|
23
|
+
#include <Geometry/point.h>
|
|
24
|
+
#include <RDGeneral/types.h>
|
|
25
|
+
#include <RDGeneral/RDProps.h>
|
|
26
|
+
#include <boost/smart_ptr.hpp>
|
|
27
|
+
|
|
28
|
+
namespace RDKit {
|
|
29
|
+
class ROMol;
|
|
30
|
+
class RWMol;
|
|
31
|
+
class Bond;
|
|
32
|
+
class Atom;
|
|
33
|
+
|
|
34
|
+
//! used to indicate errors from incorrect sgroup access
|
|
35
|
+
class RDKIT_GRAPHMOL_EXPORT SubstanceGroupException
|
|
36
|
+
: public std::runtime_error {
|
|
37
|
+
public:
|
|
38
|
+
//! construct with an error message
|
|
39
|
+
SubstanceGroupException(const char *msg) : std::runtime_error(msg) {}
|
|
40
|
+
//! construct with an error message
|
|
41
|
+
SubstanceGroupException(const std::string &msg) : std::runtime_error(msg) {}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
//! The class for representing SubstanceGroups
|
|
45
|
+
/*!
|
|
46
|
+
<b>Notes:</b>
|
|
47
|
+
- These are inspired by the SGroups in the MDL formats
|
|
48
|
+
- Implementation is based on 2010 MDL SD specification:
|
|
49
|
+
http://infochim.u-strasbg.fr/recherche/Download/Fragmentor/MDL_SDF.pdf
|
|
50
|
+
- See SGroups.md for further, more comprehensive notes.
|
|
51
|
+
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
class RDKIT_GRAPHMOL_EXPORT SubstanceGroup : public RDProps {
|
|
55
|
+
public:
|
|
56
|
+
//! Bond type (see V3000 spec)
|
|
57
|
+
enum class BondType {
|
|
58
|
+
XBOND, // External/Crossing bond
|
|
59
|
+
CBOND, // Internal/Contained bond
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
typedef std::array<RDGeom::Point3D, 3> Bracket;
|
|
63
|
+
|
|
64
|
+
//! Data structure for SAP lines (see V3000 spec)
|
|
65
|
+
//! lvIdx may not be set; this signaled with value -1
|
|
66
|
+
struct AttachPoint {
|
|
67
|
+
unsigned int aIdx;
|
|
68
|
+
int lvIdx;
|
|
69
|
+
std::string id;
|
|
70
|
+
bool operator==(const AttachPoint &other) const {
|
|
71
|
+
return aIdx == other.aIdx && lvIdx == other.lvIdx && id == other.id;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
//! See specification for V3000 CSTATE
|
|
76
|
+
//! vector may or not be considered, depending on TYPE
|
|
77
|
+
struct CState {
|
|
78
|
+
unsigned int bondIdx;
|
|
79
|
+
RDGeom::Point3D vector;
|
|
80
|
+
bool operator==(const CState &other) const {
|
|
81
|
+
// note that we ignore coordinates for this
|
|
82
|
+
return bondIdx == other.bondIdx;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
//! No default constructor
|
|
87
|
+
#ifndef SWIG
|
|
88
|
+
// Unfortunately, SWIG generated wrapper code uses temporary variables that
|
|
89
|
+
// require a default ctor not be deleted.
|
|
90
|
+
SubstanceGroup() = delete;
|
|
91
|
+
#endif // !SWIG
|
|
92
|
+
|
|
93
|
+
//! Main Constructor. Ownership is only set on this side of the relationship:
|
|
94
|
+
//! mol->addSubstanceGroup(sgroup) still needs to be called to get ownership
|
|
95
|
+
//! on the other side.
|
|
96
|
+
SubstanceGroup(ROMol *owning_mol, const std::string &type);
|
|
97
|
+
|
|
98
|
+
SubstanceGroup(const SubstanceGroup &other) = default;
|
|
99
|
+
SubstanceGroup &operator=(const SubstanceGroup &other) = default;
|
|
100
|
+
|
|
101
|
+
SubstanceGroup(SubstanceGroup &&other) noexcept : RDProps(std::move(other)) {
|
|
102
|
+
dp_mol = std::exchange(other.dp_mol, nullptr);
|
|
103
|
+
d_atoms = std::move(other.d_atoms);
|
|
104
|
+
d_patoms = std::move(other.d_patoms);
|
|
105
|
+
d_bonds = std::move(other.d_bonds);
|
|
106
|
+
d_brackets = std::move(other.d_brackets);
|
|
107
|
+
d_cstates = std::move(other.d_cstates);
|
|
108
|
+
d_saps = std::move(other.d_saps);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
SubstanceGroup &operator=(SubstanceGroup &&other) noexcept {
|
|
112
|
+
if (this == &other) {
|
|
113
|
+
return *this;
|
|
114
|
+
}
|
|
115
|
+
RDProps::operator=(std::move(other));
|
|
116
|
+
dp_mol = std::exchange(other.dp_mol, nullptr);
|
|
117
|
+
d_atoms = std::move(other.d_atoms);
|
|
118
|
+
d_patoms = std::move(other.d_patoms);
|
|
119
|
+
d_bonds = std::move(other.d_bonds);
|
|
120
|
+
d_brackets = std::move(other.d_brackets);
|
|
121
|
+
d_cstates = std::move(other.d_cstates);
|
|
122
|
+
d_saps = std::move(other.d_saps);
|
|
123
|
+
return *this;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
//! Destructor
|
|
127
|
+
~SubstanceGroup() = default;
|
|
128
|
+
|
|
129
|
+
//! returns whether or not this belongs to a molecule
|
|
130
|
+
bool hasOwningMol() const { return dp_mol != nullptr; }
|
|
131
|
+
|
|
132
|
+
//! Get the molecule that owns this instance
|
|
133
|
+
ROMol &getOwningMol() const {
|
|
134
|
+
PRECONDITION(dp_mol, "no owner");
|
|
135
|
+
return *dp_mol;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
//! returns whether or not this group is valid; invalid groups must be
|
|
139
|
+
//! ignored.
|
|
140
|
+
bool getIsValid() const { return d_isValid; }
|
|
141
|
+
|
|
142
|
+
//! set whether or not this group is valid; invalid groups must be ignored.
|
|
143
|
+
void setIsValid(bool isValid) { d_isValid = isValid; }
|
|
144
|
+
|
|
145
|
+
//! get the index of this sgroup in dp_mol's sgroups vector
|
|
146
|
+
//! (do not mistake this by the ID!)
|
|
147
|
+
unsigned int getIndexInMol() const;
|
|
148
|
+
|
|
149
|
+
/* Atom and Bond methods */
|
|
150
|
+
void addAtomWithIdx(unsigned int idx);
|
|
151
|
+
void addParentAtomWithIdx(unsigned int idx);
|
|
152
|
+
void addBondWithIdx(unsigned int idx);
|
|
153
|
+
void addAtomWithBookmark(int mark);
|
|
154
|
+
void addParentAtomWithBookmark(int mark);
|
|
155
|
+
void addBondWithBookmark(int mark);
|
|
156
|
+
|
|
157
|
+
void addBracket(const Bracket &bracket);
|
|
158
|
+
void addCState(unsigned int bondIdx, const RDGeom::Point3D &vector);
|
|
159
|
+
void addAttachPoint(unsigned int aIdx, int lvIdx, const std::string &idStr);
|
|
160
|
+
|
|
161
|
+
BondType getBondType(unsigned int bondIdx) const;
|
|
162
|
+
|
|
163
|
+
const std::vector<unsigned int> &getAtoms() const { return d_atoms; }
|
|
164
|
+
const std::vector<unsigned int> &getParentAtoms() const { return d_patoms; }
|
|
165
|
+
const std::vector<unsigned int> &getBonds() const { return d_bonds; }
|
|
166
|
+
|
|
167
|
+
void setAtoms(std::vector<unsigned int> atoms) { d_atoms = std::move(atoms); }
|
|
168
|
+
void setParentAtoms(std::vector<unsigned int> patoms) {
|
|
169
|
+
d_patoms = std::move(patoms);
|
|
170
|
+
}
|
|
171
|
+
void setBonds(std::vector<unsigned int> bonds) { d_bonds = std::move(bonds); }
|
|
172
|
+
|
|
173
|
+
const std::vector<Bracket> &getBrackets() const { return d_brackets; }
|
|
174
|
+
const std::vector<CState> &getCStates() const { return d_cstates; }
|
|
175
|
+
const std::vector<AttachPoint> &getAttachPoints() const { return d_saps; }
|
|
176
|
+
|
|
177
|
+
std::vector<Bracket> &getBrackets() { return d_brackets; }
|
|
178
|
+
std::vector<CState> &getCStates() { return d_cstates; }
|
|
179
|
+
std::vector<AttachPoint> &getAttachPoints() { return d_saps; }
|
|
180
|
+
|
|
181
|
+
void clearBrackets() { d_brackets.clear(); }
|
|
182
|
+
void clearCStates() { d_cstates.clear(); }
|
|
183
|
+
void clearAttachPoints() { d_saps.clear(); }
|
|
184
|
+
|
|
185
|
+
//! adjusts our atom IDs to reflect that an atom has been removed from the
|
|
186
|
+
//! parent molecule
|
|
187
|
+
//! decrements all atom IDs that are higher than \c atomIdx
|
|
188
|
+
//! raises a \c SubstanceGroupException if \c atomIdx is actually part of
|
|
189
|
+
//! this substance group
|
|
190
|
+
//! \returns whether or not anything was changed
|
|
191
|
+
bool adjustToRemovedAtom(unsigned int atomIdx);
|
|
192
|
+
|
|
193
|
+
//! \returns whether or not anything the specified atom is part of the
|
|
194
|
+
//! definition of this substance group
|
|
195
|
+
bool includesAtom(unsigned int atomIdx) const;
|
|
196
|
+
|
|
197
|
+
//! adjusts our bond IDs to reflect that a bond has been removed from the
|
|
198
|
+
//! parent molecule
|
|
199
|
+
//! decrements all bond IDs that are higher than \c bondIdx
|
|
200
|
+
//! raises a \c SubstanceGroupException if \c bondIdx is actually part of
|
|
201
|
+
//! this substance group
|
|
202
|
+
//! \returns whether or not anything was changed
|
|
203
|
+
bool adjustToRemovedBond(unsigned int bondIdx);
|
|
204
|
+
|
|
205
|
+
//! \returns whether or not anything the specified bond is part of the
|
|
206
|
+
//! definition of this substance group
|
|
207
|
+
bool includesBond(unsigned int bondIdx) const;
|
|
208
|
+
|
|
209
|
+
//! Set owning molecule
|
|
210
|
+
//! This only updates atoms and bonds; parent sgroup has to be updated
|
|
211
|
+
//! independently, since parent might not exist at the time this is
|
|
212
|
+
//! called.
|
|
213
|
+
void setOwningMol(ROMol *mol);
|
|
214
|
+
|
|
215
|
+
bool operator==(const SubstanceGroup &other) const {
|
|
216
|
+
// we ignore brackets and cstates, which involve coordinates
|
|
217
|
+
return dp_mol == other.dp_mol && d_atoms == other.d_atoms &&
|
|
218
|
+
d_patoms == other.d_patoms && d_bonds == other.d_bonds &&
|
|
219
|
+
d_saps == other.d_saps;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
private:
|
|
223
|
+
ROMol *dp_mol = nullptr; // owning molecule
|
|
224
|
+
|
|
225
|
+
bool d_isValid = true;
|
|
226
|
+
|
|
227
|
+
std::vector<unsigned int> d_atoms;
|
|
228
|
+
std::vector<unsigned int> d_patoms;
|
|
229
|
+
std::vector<unsigned int> d_bonds;
|
|
230
|
+
|
|
231
|
+
std::vector<Bracket> d_brackets;
|
|
232
|
+
std::vector<CState> d_cstates;
|
|
233
|
+
std::vector<AttachPoint> d_saps;
|
|
234
|
+
}; // namespace RDKit
|
|
235
|
+
|
|
236
|
+
namespace SubstanceGroupChecks {
|
|
237
|
+
|
|
238
|
+
const std::vector<std::string> sGroupTypes = {
|
|
239
|
+
// polymer sgroups:
|
|
240
|
+
"SRU", "MON", "COP", "CRO", "GRA", "MOD", "MER", "ANY",
|
|
241
|
+
// formulations/mixtures:
|
|
242
|
+
"COM", "MIX", "FOR",
|
|
243
|
+
// other
|
|
244
|
+
"SUP", "MUL", "DAT", "GEN"};
|
|
245
|
+
|
|
246
|
+
const std::vector<std::string> sGroupSubtypes = {"ALT", "RAN", "BLO"};
|
|
247
|
+
const std::vector<std::string> sGroupConnectTypes = {"HH", "HT", "EU"};
|
|
248
|
+
|
|
249
|
+
RDKIT_GRAPHMOL_EXPORT bool isValidType(const std::string &type);
|
|
250
|
+
|
|
251
|
+
RDKIT_GRAPHMOL_EXPORT bool isValidSubType(const std::string &type);
|
|
252
|
+
|
|
253
|
+
RDKIT_GRAPHMOL_EXPORT bool isValidConnectType(const std::string &type);
|
|
254
|
+
|
|
255
|
+
RDKIT_GRAPHMOL_EXPORT bool isSubstanceGroupIdFree(const ROMol &mol,
|
|
256
|
+
unsigned int id);
|
|
257
|
+
|
|
258
|
+
} // namespace SubstanceGroupChecks
|
|
259
|
+
|
|
260
|
+
//! \name SubstanceGroups and molecules
|
|
261
|
+
//@{
|
|
262
|
+
|
|
263
|
+
RDKIT_GRAPHMOL_EXPORT std::vector<SubstanceGroup> &getSubstanceGroups(
|
|
264
|
+
ROMol &mol);
|
|
265
|
+
RDKIT_GRAPHMOL_EXPORT const std::vector<SubstanceGroup> &getSubstanceGroups(
|
|
266
|
+
const ROMol &mol);
|
|
267
|
+
|
|
268
|
+
//! Add a new SubstanceGroup. A copy is added, so we can be sure that no other
|
|
269
|
+
//! references to the SubstanceGroup exist.
|
|
270
|
+
/*!
|
|
271
|
+
\param sgroup - SubstanceGroup to be added to the molecule.
|
|
272
|
+
*/
|
|
273
|
+
RDKIT_GRAPHMOL_EXPORT unsigned int addSubstanceGroup(ROMol &mol,
|
|
274
|
+
SubstanceGroup sgroup);
|
|
275
|
+
|
|
276
|
+
//! Removes SubstanceGroups which reference a particular atom index
|
|
277
|
+
/*!
|
|
278
|
+
\param mol - molecule to be edited.
|
|
279
|
+
\param idx - atom index
|
|
280
|
+
*/
|
|
281
|
+
RDKIT_GRAPHMOL_EXPORT void removeSubstanceGroupsReferencingAtom(
|
|
282
|
+
RWMol &mol, unsigned int idx);
|
|
283
|
+
//! Removes SubstanceGroups which reference a particular bond index
|
|
284
|
+
/*!
|
|
285
|
+
\param mol - molecule to be edited.
|
|
286
|
+
\param idx - bond index
|
|
287
|
+
*/
|
|
288
|
+
RDKIT_GRAPHMOL_EXPORT void removeSubstanceGroupsReferencingBond(
|
|
289
|
+
RWMol &mol, unsigned int idx);
|
|
290
|
+
//@}
|
|
291
|
+
|
|
292
|
+
} // namespace RDKit
|
|
293
|
+
|
|
294
|
+
//! allows SubstanceGroup objects to be dumped to streams
|
|
295
|
+
RDKIT_GRAPHMOL_EXPORT std::ostream &operator<<(std::ostream &target,
|
|
296
|
+
const RDKit::SubstanceGroup &sg);
|
|
297
|
+
#endif
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (C) 2001-2020 Greg Landrum and Rational Discovery LLC
|
|
3
|
+
//
|
|
4
|
+
// @@ All Rights Reserved @@
|
|
5
|
+
// This file is part of the RDKit.
|
|
6
|
+
// The contents are covered by the terms of the BSD license
|
|
7
|
+
// which is included in the file license.txt, found at the root
|
|
8
|
+
// of the RDKit source tree.
|
|
9
|
+
//
|
|
10
|
+
#include <RDGeneral/export.h>
|
|
11
|
+
#ifndef RD_SUBSTRUCTMATCH_H
|
|
12
|
+
#define RD_SUBSTRUCTMATCH_H
|
|
13
|
+
|
|
14
|
+
// std bits
|
|
15
|
+
#include <vector>
|
|
16
|
+
#include <functional>
|
|
17
|
+
#include <unordered_map>
|
|
18
|
+
#include <cstdint>
|
|
19
|
+
#include "GraphMol/StereoGroup.h"
|
|
20
|
+
#include <string>
|
|
21
|
+
|
|
22
|
+
namespace RDKit {
|
|
23
|
+
class ROMol;
|
|
24
|
+
class Atom;
|
|
25
|
+
class Bond;
|
|
26
|
+
class ResonanceMolSupplier;
|
|
27
|
+
class MolBundle;
|
|
28
|
+
|
|
29
|
+
//! \brief used to return matches from substructure searching,
|
|
30
|
+
//! The format is (queryAtomIdx, molAtomIdx)
|
|
31
|
+
typedef std::vector<std::pair<int, int>> MatchVectType;
|
|
32
|
+
|
|
33
|
+
struct RDKIT_SUBSTRUCTMATCH_EXPORT SubstructMatchParameters {
|
|
34
|
+
bool useChirality = false; //!< Use chirality in determining whether or not
|
|
35
|
+
//!< atoms/bonds match
|
|
36
|
+
bool useEnhancedStereo = false; //!< Use enhanced stereochemistry in
|
|
37
|
+
//!< determining whether atoms/bonds match
|
|
38
|
+
bool aromaticMatchesConjugated = false; //!< Aromatic and conjugated bonds
|
|
39
|
+
//!< match each other
|
|
40
|
+
bool useQueryQueryMatches = false; //!< Consider query-query matches, not
|
|
41
|
+
//!< just simple matches
|
|
42
|
+
bool useGenericMatchers = false; //!< Looks for generic atoms in the query
|
|
43
|
+
//!< and uses them as part of the matching
|
|
44
|
+
bool recursionPossible = true; //!< Allow recursive queries
|
|
45
|
+
bool uniquify = true; //!< uniquify (by atom index) match results
|
|
46
|
+
unsigned int maxMatches = 1000; //!< maximum number of matches to return
|
|
47
|
+
int numThreads = 1; //!< number of threads to use when multi-threading
|
|
48
|
+
//!< is possible. 0 selects the number of
|
|
49
|
+
//!< concurrent threads supported by the hardware
|
|
50
|
+
//!< negative values are added to the number of
|
|
51
|
+
//!< concurrent threads supported by the hardware
|
|
52
|
+
std::function<bool(const ROMol &mol,
|
|
53
|
+
const std::vector<unsigned int> &match)>
|
|
54
|
+
extraFinalCheck; //!< a function to be called at the end to validate a
|
|
55
|
+
//!< match
|
|
56
|
+
|
|
57
|
+
SubstructMatchParameters() {}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
RDKIT_SUBSTRUCTMATCH_EXPORT void updateSubstructMatchParamsFromJSON(
|
|
61
|
+
SubstructMatchParameters ¶ms, const std::string &json);
|
|
62
|
+
|
|
63
|
+
//! Find a substructure match for a query in a molecule
|
|
64
|
+
/*!
|
|
65
|
+
\param mol The ROMol to be searched
|
|
66
|
+
\param query The query ROMol
|
|
67
|
+
\param matchParams Parameters controlling the matching
|
|
68
|
+
|
|
69
|
+
\return The matches, if any
|
|
70
|
+
|
|
71
|
+
*/
|
|
72
|
+
RDKIT_SUBSTRUCTMATCH_EXPORT std::vector<MatchVectType> SubstructMatch(
|
|
73
|
+
const ROMol &mol, const ROMol &query,
|
|
74
|
+
const SubstructMatchParameters ¶ms = SubstructMatchParameters());
|
|
75
|
+
|
|
76
|
+
//! Find all substructure matches for a query in a ResonanceMolSupplier object
|
|
77
|
+
/*!
|
|
78
|
+
\param resMolSuppl The ResonanceMolSupplier object to be searched
|
|
79
|
+
\param query The query ROMol
|
|
80
|
+
\param matchParams Parameters controlling the matching
|
|
81
|
+
|
|
82
|
+
\return The matches, if any
|
|
83
|
+
|
|
84
|
+
*/
|
|
85
|
+
RDKIT_SUBSTRUCTMATCH_EXPORT std::vector<MatchVectType> SubstructMatch(
|
|
86
|
+
ResonanceMolSupplier &resMolSuppl, const ROMol &query,
|
|
87
|
+
const SubstructMatchParameters ¶ms = SubstructMatchParameters());
|
|
88
|
+
|
|
89
|
+
RDKIT_SUBSTRUCTMATCH_EXPORT std::vector<MatchVectType> SubstructMatch(
|
|
90
|
+
const MolBundle &bundle, const ROMol &query,
|
|
91
|
+
const SubstructMatchParameters ¶ms = SubstructMatchParameters());
|
|
92
|
+
RDKIT_SUBSTRUCTMATCH_EXPORT std::vector<MatchVectType> SubstructMatch(
|
|
93
|
+
const ROMol &mol, const MolBundle &query,
|
|
94
|
+
const SubstructMatchParameters ¶ms = SubstructMatchParameters());
|
|
95
|
+
RDKIT_SUBSTRUCTMATCH_EXPORT std::vector<MatchVectType> SubstructMatch(
|
|
96
|
+
const MolBundle &bundle, const MolBundle &query,
|
|
97
|
+
const SubstructMatchParameters ¶ms = SubstructMatchParameters());
|
|
98
|
+
|
|
99
|
+
//! Find a substructure match for a query
|
|
100
|
+
/*!
|
|
101
|
+
\param mol The object to be searched
|
|
102
|
+
\param query The query
|
|
103
|
+
\param matchVect Used to return the match
|
|
104
|
+
(pre-existing contents will be deleted)
|
|
105
|
+
\param recursionPossible flags whether or not recursive matches are allowed
|
|
106
|
+
\param useChirality use atomic CIP codes as part of the comparison
|
|
107
|
+
\param useQueryQueryMatches if set, the contents of atom and bond queries
|
|
108
|
+
will be used as part of the matching
|
|
109
|
+
|
|
110
|
+
\return whether or not a match was found
|
|
111
|
+
|
|
112
|
+
*/
|
|
113
|
+
template <typename T1, typename T2>
|
|
114
|
+
bool SubstructMatch(T1 &mol, const T2 &query, MatchVectType &matchVect,
|
|
115
|
+
bool recursionPossible = true, bool useChirality = false,
|
|
116
|
+
bool useQueryQueryMatches = false) {
|
|
117
|
+
SubstructMatchParameters params;
|
|
118
|
+
params.recursionPossible = recursionPossible;
|
|
119
|
+
params.useChirality = useChirality;
|
|
120
|
+
params.useQueryQueryMatches = useQueryQueryMatches;
|
|
121
|
+
params.maxMatches = 1;
|
|
122
|
+
std::vector<MatchVectType> matchVects = SubstructMatch(mol, query, params);
|
|
123
|
+
if (matchVects.size()) {
|
|
124
|
+
matchVect = matchVects.front();
|
|
125
|
+
} else {
|
|
126
|
+
matchVect.clear();
|
|
127
|
+
}
|
|
128
|
+
return matchVect.size() != 0;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
//! Find all substructure matches for a query
|
|
132
|
+
/*!
|
|
133
|
+
\param mol The object to be searched
|
|
134
|
+
\param query The query
|
|
135
|
+
\param matchVect Used to return the matches
|
|
136
|
+
(pre-existing contents will be deleted)
|
|
137
|
+
\param uniquify Toggles uniquification (by atom index) of the results
|
|
138
|
+
\param recursionPossible flags whether or not recursive matches are allowed
|
|
139
|
+
\param useChirality use atomic CIP codes as part of the comparison
|
|
140
|
+
\param useQueryQueryMatches if set, the contents of atom and bond queries
|
|
141
|
+
will be used as part of the matching
|
|
142
|
+
\param maxMatches The maximum number of matches that will be returned.
|
|
143
|
+
In high-symmetry cases with medium-sized molecules, it is
|
|
144
|
+
very
|
|
145
|
+
easy to end up with a combinatorial explosion in the
|
|
146
|
+
number of
|
|
147
|
+
possible matches. This argument prevents that from having
|
|
148
|
+
unintended consequences
|
|
149
|
+
|
|
150
|
+
\return the number of matches found
|
|
151
|
+
|
|
152
|
+
*/
|
|
153
|
+
template <typename T1, typename T2>
|
|
154
|
+
unsigned int SubstructMatch(T1 &mol, const T2 &query,
|
|
155
|
+
std::vector<MatchVectType> &matchVect,
|
|
156
|
+
bool uniquify = true, bool recursionPossible = true,
|
|
157
|
+
bool useChirality = false,
|
|
158
|
+
bool useQueryQueryMatches = false,
|
|
159
|
+
unsigned int maxMatches = 1000,
|
|
160
|
+
int numThreads = 1) {
|
|
161
|
+
SubstructMatchParameters params;
|
|
162
|
+
params.uniquify = uniquify;
|
|
163
|
+
params.recursionPossible = recursionPossible;
|
|
164
|
+
params.useChirality = useChirality;
|
|
165
|
+
params.useQueryQueryMatches = useQueryQueryMatches;
|
|
166
|
+
params.maxMatches = maxMatches;
|
|
167
|
+
params.numThreads = numThreads;
|
|
168
|
+
matchVect = SubstructMatch(mol, query, params);
|
|
169
|
+
return static_cast<unsigned int>(matchVect.size());
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
// ----------------------------------------------
|
|
173
|
+
//
|
|
174
|
+
// find one match in ResonanceMolSupplier object
|
|
175
|
+
//
|
|
176
|
+
template <>
|
|
177
|
+
inline bool SubstructMatch(ResonanceMolSupplier &resMolSupplier,
|
|
178
|
+
const ROMol &query, MatchVectType &matchVect,
|
|
179
|
+
bool recursionPossible, bool useChirality,
|
|
180
|
+
bool useQueryQueryMatches) {
|
|
181
|
+
SubstructMatchParameters params;
|
|
182
|
+
params.recursionPossible = recursionPossible;
|
|
183
|
+
params.useChirality = useChirality;
|
|
184
|
+
params.useQueryQueryMatches = useQueryQueryMatches;
|
|
185
|
+
params.maxMatches = 1;
|
|
186
|
+
std::vector<MatchVectType> matchVects =
|
|
187
|
+
SubstructMatch(resMolSupplier, query, params);
|
|
188
|
+
if (matchVects.size()) {
|
|
189
|
+
matchVect = matchVects.front();
|
|
190
|
+
} else {
|
|
191
|
+
matchVect.clear();
|
|
192
|
+
}
|
|
193
|
+
return matchVect.size() != 0;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
template <>
|
|
197
|
+
inline unsigned int SubstructMatch(ResonanceMolSupplier &resMolSupplier,
|
|
198
|
+
const ROMol &query,
|
|
199
|
+
std::vector<MatchVectType> &matchVect,
|
|
200
|
+
bool uniquify, bool recursionPossible,
|
|
201
|
+
bool useChirality, bool useQueryQueryMatches,
|
|
202
|
+
unsigned int maxMatches, int numThreads) {
|
|
203
|
+
SubstructMatchParameters params;
|
|
204
|
+
params.uniquify = uniquify;
|
|
205
|
+
params.recursionPossible = recursionPossible;
|
|
206
|
+
params.useChirality = useChirality;
|
|
207
|
+
params.useQueryQueryMatches = useQueryQueryMatches;
|
|
208
|
+
params.maxMatches = maxMatches;
|
|
209
|
+
params.numThreads = numThreads;
|
|
210
|
+
matchVect = SubstructMatch(resMolSupplier, query, params);
|
|
211
|
+
return static_cast<unsigned int>(matchVect.size());
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
//! Class used as a final step to confirm whether or not a given atom->atom
|
|
215
|
+
//! mapping is a valid substructure match.
|
|
216
|
+
class RDKIT_SUBSTRUCTMATCH_EXPORT MolMatchFinalCheckFunctor {
|
|
217
|
+
public:
|
|
218
|
+
MolMatchFinalCheckFunctor(const ROMol &query, const ROMol &mol,
|
|
219
|
+
const SubstructMatchParameters &ps);
|
|
220
|
+
|
|
221
|
+
bool operator()(const std::uint32_t q_c[], const std::uint32_t m_c[]) const;
|
|
222
|
+
|
|
223
|
+
private:
|
|
224
|
+
const ROMol &d_query;
|
|
225
|
+
const ROMol &d_mol;
|
|
226
|
+
const SubstructMatchParameters &d_params;
|
|
227
|
+
std::unordered_map<unsigned int, StereoGroup const *> d_molStereoGroups;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
} // namespace RDKit
|
|
231
|
+
|
|
232
|
+
#endif
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (C) 2003-2019 Greg Landrum and Rational Discovery LLC
|
|
3
|
+
//
|
|
4
|
+
// @@ All Rights Reserved @@
|
|
5
|
+
// This file is part of the RDKit.
|
|
6
|
+
// The contents are covered by the terms of the BSD license
|
|
7
|
+
// which is included in the file license.txt, found at the root
|
|
8
|
+
// of the RDKit source tree.
|
|
9
|
+
//
|
|
10
|
+
#include <RDGeneral/export.h>
|
|
11
|
+
#ifndef RD_SUBSTRUCT_UTILS_H
|
|
12
|
+
#define RD_SUBSTRUCT_UTILS_H
|
|
13
|
+
|
|
14
|
+
#include "SubstructMatch.h"
|
|
15
|
+
|
|
16
|
+
namespace RDKit {
|
|
17
|
+
class ROMol;
|
|
18
|
+
class Atom;
|
|
19
|
+
class Bond;
|
|
20
|
+
|
|
21
|
+
RDKIT_SUBSTRUCTMATCH_EXPORT double toPrime(const MatchVectType& v);
|
|
22
|
+
RDKIT_SUBSTRUCTMATCH_EXPORT void removeDuplicates(std::vector<MatchVectType>& v,
|
|
23
|
+
unsigned int nAtoms);
|
|
24
|
+
RDKIT_SUBSTRUCTMATCH_EXPORT bool atomCompat(const Atom* a1, const Atom* a2,
|
|
25
|
+
const SubstructMatchParameters& ps);
|
|
26
|
+
RDKIT_SUBSTRUCTMATCH_EXPORT bool chiralAtomCompat(const Atom* a1,
|
|
27
|
+
const Atom* a2);
|
|
28
|
+
RDKIT_SUBSTRUCTMATCH_EXPORT bool bondCompat(const Bond* b1, const Bond* b2,
|
|
29
|
+
const SubstructMatchParameters& ps);
|
|
30
|
+
//! This postprocesses the passed substruct matches and returns
|
|
31
|
+
//! the match that has the largest number of non-hydrogen atoms
|
|
32
|
+
//! in correspondence of terminal dummy atoms
|
|
33
|
+
RDKIT_SUBSTRUCTMATCH_EXPORT const MatchVectType& getMostSubstitutedCoreMatch(
|
|
34
|
+
const ROMol& mol, const ROMol& core,
|
|
35
|
+
const std::vector<MatchVectType>& matches);
|
|
36
|
+
//! This returns a copy of the passed substruct matches sorted by decreasing
|
|
37
|
+
//! number of non-hydrogen atoms in correspondence of terminal dummy atoms
|
|
38
|
+
RDKIT_SUBSTRUCTMATCH_EXPORT std::vector<MatchVectType>
|
|
39
|
+
sortMatchesByDegreeOfCoreSubstitution(
|
|
40
|
+
const ROMol& mol, const ROMol& core,
|
|
41
|
+
const std::vector<MatchVectType>& matches);
|
|
42
|
+
} // namespace RDKit
|
|
43
|
+
|
|
44
|
+
#endif
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (C) 2020 Brian P. Kelley
|
|
3
|
+
//
|
|
4
|
+
// @@ All Rights Reserved @@
|
|
5
|
+
// This file is part of the RDKit.
|
|
6
|
+
// The contents are covered by the terms of the BSD license
|
|
7
|
+
// which is included in the file license.txt, found at the root
|
|
8
|
+
// of the RDKit source tree.
|
|
9
|
+
//
|
|
10
|
+
#ifndef RDK_SSSFACTORY
|
|
11
|
+
#define RDK_SSSFACTORY
|
|
12
|
+
#include <RDGeneral/export.h>
|
|
13
|
+
#include "SubstructLibrary.h"
|
|
14
|
+
#include <GraphMol/FileParsers/MolSupplier.h>
|
|
15
|
+
|
|
16
|
+
namespace RDKit {
|
|
17
|
+
//! Create pattern fingerprints for the given substructure library
|
|
18
|
+
//! The substructure library must not already have fingerprints
|
|
19
|
+
/*
|
|
20
|
+
\param sslib The substructure library (without pattern fingerprints)
|
|
21
|
+
\param patterns if supplied, use this pattern holder and take ownership
|
|
22
|
+
\param numThreads the number of threads to use, -1 for all threads
|
|
23
|
+
[default 1]
|
|
24
|
+
*/
|
|
25
|
+
RDKIT_SUBSTRUCTLIBRARY_EXPORT void addPatterns(
|
|
26
|
+
SubstructLibrary &sslib, boost::shared_ptr<FPHolderBase> patterns,
|
|
27
|
+
int numThreads = 1);
|
|
28
|
+
|
|
29
|
+
//! Create default pattern fingerprints for the given substructure library
|
|
30
|
+
//! The substructure library must not already have fingerprints
|
|
31
|
+
/*
|
|
32
|
+
\param sslib The substructure library (without pattern fingerprints)
|
|
33
|
+
\param numThreads the number of threads to use, -1 for all threads
|
|
34
|
+
[default 1]
|
|
35
|
+
*/
|
|
36
|
+
RDKIT_SUBSTRUCTLIBRARY_EXPORT void addPatterns(SubstructLibrary &sslib,
|
|
37
|
+
int numThreads = 1);
|
|
38
|
+
} // namespace RDKit
|
|
39
|
+
|
|
40
|
+
#endif
|