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,276 @@
|
|
|
1
|
+
// Copyright (c) 2015, Novartis Institutes for BioMedical Research Inc.
|
|
2
|
+
// All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// Redistribution and use in source and binary forms, with or without
|
|
5
|
+
// modification, are permitted provided that the following conditions are
|
|
6
|
+
// met:
|
|
7
|
+
//
|
|
8
|
+
// * Redistributions of source code must retain the above copyright
|
|
9
|
+
// notice, this list of conditions and the following disclaimer.
|
|
10
|
+
// * Redistributions in binary form must reproduce the above
|
|
11
|
+
// copyright notice, this list of conditions and the following
|
|
12
|
+
// disclaimer in the documentation and/or other materials provided
|
|
13
|
+
// with the distribution.
|
|
14
|
+
// * Neither the name of Novartis Institutes for BioMedical Research Inc.
|
|
15
|
+
// nor the names of its contributors may be used to endorse or promote
|
|
16
|
+
// products derived from this software without specific prior written
|
|
17
|
+
// permission.
|
|
18
|
+
//
|
|
19
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
+
//
|
|
31
|
+
|
|
32
|
+
#include <RDGeneral/export.h>
|
|
33
|
+
#ifndef __RD_FILTER_CATALOG_H__
|
|
34
|
+
#define __RD_FILTER_CATALOG_H__
|
|
35
|
+
#include <utility>
|
|
36
|
+
|
|
37
|
+
#include <RDGeneral/types.h> // For Dict
|
|
38
|
+
#include <GraphMol/RDKitBase.h>
|
|
39
|
+
#include <GraphMol/Substruct/SubstructMatch.h>
|
|
40
|
+
#include <Catalogs/CatalogEntry.h>
|
|
41
|
+
|
|
42
|
+
#ifdef RDK_USE_BOOST_SERIALIZATION
|
|
43
|
+
#include <RDGeneral/BoostStartInclude.h>
|
|
44
|
+
#include <boost/archive/text_oarchive.hpp>
|
|
45
|
+
#include <boost/archive/text_iarchive.hpp>
|
|
46
|
+
#include <boost/serialization/vector.hpp>
|
|
47
|
+
#include <boost/serialization/shared_ptr.hpp>
|
|
48
|
+
#include <RDGeneral/BoostEndInclude.h>
|
|
49
|
+
#endif
|
|
50
|
+
|
|
51
|
+
#include "FilterMatchers.h"
|
|
52
|
+
|
|
53
|
+
namespace RDKit {
|
|
54
|
+
typedef std::map<std::string, std::string> STRING_PROPS;
|
|
55
|
+
|
|
56
|
+
class RDKIT_FILTERCATALOG_EXPORT FilterCatalogEntry
|
|
57
|
+
: public RDCatalog::CatalogEntry {
|
|
58
|
+
private:
|
|
59
|
+
boost::shared_ptr<FilterMatcherBase> d_matcher;
|
|
60
|
+
Dict d_props;
|
|
61
|
+
|
|
62
|
+
public:
|
|
63
|
+
FilterCatalogEntry() : d_matcher(), d_props() {}
|
|
64
|
+
|
|
65
|
+
FilterCatalogEntry(const std::string &name, const FilterMatcherBase &matcher)
|
|
66
|
+
: RDCatalog::CatalogEntry(), d_matcher(matcher.copy()) {
|
|
67
|
+
setDescription(name);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
FilterCatalogEntry(const std::string &name,
|
|
71
|
+
boost::shared_ptr<FilterMatcherBase> matcher)
|
|
72
|
+
: RDCatalog::CatalogEntry(), d_matcher(std::move(matcher)) {
|
|
73
|
+
setDescription(name);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
FilterCatalogEntry(const FilterCatalogEntry &rhs)
|
|
77
|
+
: RDCatalog::CatalogEntry(rhs),
|
|
78
|
+
d_matcher(rhs.d_matcher),
|
|
79
|
+
d_props(rhs.d_props) {}
|
|
80
|
+
|
|
81
|
+
~FilterCatalogEntry() override {}
|
|
82
|
+
|
|
83
|
+
//------------------------------------
|
|
84
|
+
//! Returns true if the Filters stored in this catalog entry are valid
|
|
85
|
+
|
|
86
|
+
bool isValid() const { return d_matcher.get() && d_matcher->isValid(); }
|
|
87
|
+
|
|
88
|
+
//------------------------------------
|
|
89
|
+
//! Returns the description of the catalog entry
|
|
90
|
+
std::string getDescription() const override;
|
|
91
|
+
|
|
92
|
+
//------------------------------------
|
|
93
|
+
//! Sets the description of the catalog entry
|
|
94
|
+
/*
|
|
95
|
+
\param const std::string & description
|
|
96
|
+
*/
|
|
97
|
+
void setDescription(const std::string &description);
|
|
98
|
+
|
|
99
|
+
//! \name Properties
|
|
100
|
+
//@{
|
|
101
|
+
|
|
102
|
+
//! returns a list with the names of our \c properties
|
|
103
|
+
STR_VECT getPropList() const { return d_props.keys(); }
|
|
104
|
+
|
|
105
|
+
//! sets a \c property value
|
|
106
|
+
/*!
|
|
107
|
+
\param key the name under which the \c property should be stored.
|
|
108
|
+
If a \c property is already stored under this name, it will be
|
|
109
|
+
replaced.
|
|
110
|
+
\param val the value to be stored
|
|
111
|
+
*/
|
|
112
|
+
template <typename T>
|
|
113
|
+
void setProp(const char *key, T val) {
|
|
114
|
+
std::string what(key);
|
|
115
|
+
setProp(what, val);
|
|
116
|
+
}
|
|
117
|
+
//! \overload
|
|
118
|
+
template <typename T>
|
|
119
|
+
void setProp(const std::string &key, T val) {
|
|
120
|
+
d_props.setVal(key, val);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
//! allows retrieval of a particular property value
|
|
124
|
+
/*!
|
|
125
|
+
|
|
126
|
+
\param key the name under which the \c property should be stored.
|
|
127
|
+
If a \c property is already stored under this name, it will be
|
|
128
|
+
replaced.
|
|
129
|
+
\param res a reference to the storage location for the value.
|
|
130
|
+
|
|
131
|
+
<b>Notes:</b>
|
|
132
|
+
- if no \c property with name \c key exists, a KeyErrorException will be
|
|
133
|
+
thrown.
|
|
134
|
+
- the \c boost::lexical_cast machinery is used to attempt type
|
|
135
|
+
conversions.
|
|
136
|
+
If this fails, a \c boost::bad_lexical_cast exception will be thrown.
|
|
137
|
+
|
|
138
|
+
*/
|
|
139
|
+
template <typename T>
|
|
140
|
+
void getProp(const char *key, T &res) const {
|
|
141
|
+
d_props.getVal(key, res);
|
|
142
|
+
}
|
|
143
|
+
//! \overload
|
|
144
|
+
template <typename T>
|
|
145
|
+
void getProp(const std::string &key, T &res) const {
|
|
146
|
+
d_props.getVal(key, res);
|
|
147
|
+
}
|
|
148
|
+
//! \overload
|
|
149
|
+
template <typename T>
|
|
150
|
+
T getProp(const char *key) const {
|
|
151
|
+
return d_props.getVal<T>(key);
|
|
152
|
+
}
|
|
153
|
+
//! \overload
|
|
154
|
+
template <typename T>
|
|
155
|
+
T getProp(const std::string &key) const {
|
|
156
|
+
return d_props.getVal<T>(key);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
//! returns whether or not we have a \c property with name \c key
|
|
160
|
+
//! and assigns the value if we do
|
|
161
|
+
template <typename T>
|
|
162
|
+
bool getPropIfPresent(const char *key, T &res) const {
|
|
163
|
+
return d_props.getValIfPresent(key, res);
|
|
164
|
+
}
|
|
165
|
+
//! \overload
|
|
166
|
+
template <typename T>
|
|
167
|
+
bool getPropIfPresent(const std::string &key, T &res) const {
|
|
168
|
+
return d_props.getValIfPresent(key, res);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
//! returns whether or not we have a \c property with name \c key
|
|
172
|
+
bool hasProp(const char *key) const { return d_props.hasVal(key); }
|
|
173
|
+
//! \overload
|
|
174
|
+
bool hasProp(const std::string &key) const {
|
|
175
|
+
return d_props.hasVal(key);
|
|
176
|
+
// return hasProp(key.c_str());
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
//! clears the value of a \c property
|
|
180
|
+
void clearProp(const char *key) {
|
|
181
|
+
std::string what(key);
|
|
182
|
+
clearProp(what);
|
|
183
|
+
}
|
|
184
|
+
//! \overload
|
|
185
|
+
void clearProp(const std::string &key) { d_props.clearVal(key); }
|
|
186
|
+
|
|
187
|
+
// -------------------------------------------
|
|
188
|
+
//! Properties usually contain the reference and source
|
|
189
|
+
//! for the catalog entry.
|
|
190
|
+
|
|
191
|
+
Dict &getProps() { return d_props; }
|
|
192
|
+
const Dict &getProps() const { return d_props; }
|
|
193
|
+
void setProps(const Dict &props) { d_props = props; }
|
|
194
|
+
|
|
195
|
+
//------------------------------------
|
|
196
|
+
//! Returns the matching filters for this catalog entry
|
|
197
|
+
/*
|
|
198
|
+
\param mol The molecule to match against
|
|
199
|
+
\param std::vector<FilterMatch> the resulting FilterMatches
|
|
200
|
+
*/
|
|
201
|
+
bool getFilterMatches(const ROMol &mol,
|
|
202
|
+
std::vector<FilterMatch> &matchVect) const {
|
|
203
|
+
return this->isValid() && d_matcher->getMatches(mol, matchVect);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
//------------------------------------
|
|
207
|
+
//! Returns true if the filters in this catalog entry match the molecule
|
|
208
|
+
/*
|
|
209
|
+
\param mol The molecule to match against
|
|
210
|
+
*/
|
|
211
|
+
|
|
212
|
+
bool hasFilterMatch(const ROMol &mol) const {
|
|
213
|
+
return this->isValid() && d_matcher->hasMatch(mol);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
//! serializes (pickles) to a stream
|
|
217
|
+
void toStream(std::ostream &ss) const override;
|
|
218
|
+
//! returns a string with a serialized (pickled) representation
|
|
219
|
+
std::string Serialize() const override;
|
|
220
|
+
//! initializes from a stream pickle
|
|
221
|
+
void initFromStream(std::istream &ss) override;
|
|
222
|
+
//! initializes from a string pickle
|
|
223
|
+
void initFromString(const std::string &text) override;
|
|
224
|
+
|
|
225
|
+
private:
|
|
226
|
+
#ifdef RDK_USE_BOOST_SERIALIZATION
|
|
227
|
+
friend class boost::serialization::access;
|
|
228
|
+
template <class Archive>
|
|
229
|
+
void save(Archive &ar, const unsigned int version) const {
|
|
230
|
+
RDUNUSED_PARAM(version);
|
|
231
|
+
registerFilterMatcherTypes(ar);
|
|
232
|
+
|
|
233
|
+
ar &d_matcher;
|
|
234
|
+
// we only save string based props here...
|
|
235
|
+
STR_VECT keys = d_props.keys();
|
|
236
|
+
std::vector<std::string> string_props;
|
|
237
|
+
for (size_t i = 0; i < keys.size(); ++i) {
|
|
238
|
+
std::string val;
|
|
239
|
+
try {
|
|
240
|
+
if (d_props.getValIfPresent<std::string>(keys[i], val)) {
|
|
241
|
+
string_props.push_back(keys[i]);
|
|
242
|
+
string_props.push_back(val);
|
|
243
|
+
}
|
|
244
|
+
} catch (const boost::bad_any_cast &) {
|
|
245
|
+
// pass, can't serialize
|
|
246
|
+
// warning, this changes properties types, see Dict.cpp
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
ar &string_props;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
template <class Archive>
|
|
253
|
+
void load(Archive &ar, const unsigned int version) {
|
|
254
|
+
RDUNUSED_PARAM(version);
|
|
255
|
+
registerFilterMatcherTypes(ar);
|
|
256
|
+
|
|
257
|
+
ar &d_matcher;
|
|
258
|
+
std::vector<std::string> string_props;
|
|
259
|
+
ar &string_props;
|
|
260
|
+
d_props.reset();
|
|
261
|
+
|
|
262
|
+
for (size_t i = 0; i < string_props.size() / 2; ++i) {
|
|
263
|
+
d_props.setVal(string_props[i * 2], string_props[i * 2 + 1]);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
BOOST_SERIALIZATION_SPLIT_MEMBER();
|
|
268
|
+
#endif
|
|
269
|
+
};
|
|
270
|
+
} // namespace RDKit
|
|
271
|
+
|
|
272
|
+
#ifdef RDK_USE_BOOST_SERIALIZATION
|
|
273
|
+
BOOST_CLASS_VERSION(RDKit::FilterCatalogEntry, 1);
|
|
274
|
+
#endif
|
|
275
|
+
|
|
276
|
+
#endif //__RD_FILTER_CATALOG_H__
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
// Copyright (c) 2015, Novartis Institutes for BioMedical Research Inc.
|
|
2
|
+
// All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// Redistribution and use in source and binary forms, with or without
|
|
5
|
+
// modification, are permitted provided that the following conditions are
|
|
6
|
+
// met:
|
|
7
|
+
//
|
|
8
|
+
// * Redistributions of source code must retain the above copyright
|
|
9
|
+
// notice, this list of conditions and the following disclaimer.
|
|
10
|
+
// * Redistributions in binary form must reproduce the above
|
|
11
|
+
// copyright notice, this list of conditions and the following
|
|
12
|
+
// disclaimer in the documentation and/or other materials provided
|
|
13
|
+
// with the distribution.
|
|
14
|
+
// * Neither the name of Novartis Institutes for BioMedical Research Inc.
|
|
15
|
+
// nor the names of its contributors may be used to endorse or promote
|
|
16
|
+
// products derived from this software without specific prior written
|
|
17
|
+
// permission.
|
|
18
|
+
//
|
|
19
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
+
//
|
|
31
|
+
|
|
32
|
+
#include <RDGeneral/export.h>
|
|
33
|
+
#ifndef __RD_FILTER_MATCHER_BASE_H__
|
|
34
|
+
#define __RD_FILTER_MATCHER_BASE_H__
|
|
35
|
+
#include <utility>
|
|
36
|
+
|
|
37
|
+
#include <GraphMol/RDKitBase.h>
|
|
38
|
+
#include <GraphMol/Substruct/SubstructMatch.h>
|
|
39
|
+
|
|
40
|
+
#ifdef RDK_USE_BOOST_SERIALIZATION
|
|
41
|
+
#include <RDGeneral/BoostStartInclude.h>
|
|
42
|
+
#include <boost/archive/text_oarchive.hpp>
|
|
43
|
+
#include <boost/archive/text_iarchive.hpp>
|
|
44
|
+
#include <boost/serialization/assume_abstract.hpp>
|
|
45
|
+
#include <boost/enable_shared_from_this.hpp>
|
|
46
|
+
#include <RDGeneral/BoostEndInclude.h>
|
|
47
|
+
#endif // RDK_USE_BOOST_SERIALIZATION
|
|
48
|
+
|
|
49
|
+
namespace RDKit {
|
|
50
|
+
|
|
51
|
+
class FilterMatcherBase; // Forward declaration
|
|
52
|
+
|
|
53
|
+
//! Holds the atomPairs matched by the underlying matcher
|
|
54
|
+
struct RDKIT_FILTERCATALOG_EXPORT FilterMatch {
|
|
55
|
+
boost::shared_ptr<FilterMatcherBase> filterMatch;
|
|
56
|
+
MatchVectType atomPairs;
|
|
57
|
+
|
|
58
|
+
FilterMatch() : filterMatch(), atomPairs() {}
|
|
59
|
+
FilterMatch(boost::shared_ptr<FilterMatcherBase> filter,
|
|
60
|
+
MatchVectType atomPairs)
|
|
61
|
+
: filterMatch(std::move(filter)), atomPairs(std::move(atomPairs)) {}
|
|
62
|
+
|
|
63
|
+
FilterMatch(const FilterMatch &rhs)
|
|
64
|
+
: filterMatch(rhs.filterMatch), atomPairs(rhs.atomPairs) {}
|
|
65
|
+
|
|
66
|
+
bool operator==(const FilterMatch &rhs) const {
|
|
67
|
+
return (filterMatch.get() == rhs.filterMatch.get() &&
|
|
68
|
+
atomPairs == rhs.atomPairs);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
bool operator!=(const FilterMatch &rhs) const {
|
|
72
|
+
return !(filterMatch.get() == rhs.filterMatch.get() &&
|
|
73
|
+
atomPairs == rhs.atomPairs);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
RDKIT_FILTERCATALOG_EXPORT extern const char *DEFAULT_FILTERMATCHERBASE_NAME;
|
|
78
|
+
class RDKIT_FILTERCATALOG_EXPORT FilterMatcherBase
|
|
79
|
+
: public boost::enable_shared_from_this<FilterMatcherBase> {
|
|
80
|
+
//------------------------------------
|
|
81
|
+
//! Virtual API for filter matching
|
|
82
|
+
std::string d_filterName;
|
|
83
|
+
|
|
84
|
+
public:
|
|
85
|
+
FilterMatcherBase(std::string name = DEFAULT_FILTERMATCHERBASE_NAME)
|
|
86
|
+
: boost::enable_shared_from_this<FilterMatcherBase>(),
|
|
87
|
+
d_filterName(std::move(name)) {}
|
|
88
|
+
|
|
89
|
+
FilterMatcherBase(const FilterMatcherBase &rhs)
|
|
90
|
+
: boost::enable_shared_from_this<FilterMatcherBase>(),
|
|
91
|
+
d_filterName(rhs.d_filterName) {}
|
|
92
|
+
|
|
93
|
+
virtual ~FilterMatcherBase() {}
|
|
94
|
+
|
|
95
|
+
virtual bool isValid() const = 0;
|
|
96
|
+
|
|
97
|
+
virtual std::string getName() const { return d_filterName; }
|
|
98
|
+
//------------------------------------
|
|
99
|
+
//! getMatches
|
|
100
|
+
/*!
|
|
101
|
+
Match the filter against a molecule
|
|
102
|
+
|
|
103
|
+
\param mol readonly const molecule being searched
|
|
104
|
+
\param matches output vector of atom index matches found in the molecule
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
virtual bool getMatches(const ROMol &mol,
|
|
108
|
+
std::vector<FilterMatch> &matchVect) const = 0;
|
|
109
|
+
|
|
110
|
+
//------------------------------------
|
|
111
|
+
//! hasMatches
|
|
112
|
+
/*!
|
|
113
|
+
Does the given molecule contain this filter pattern
|
|
114
|
+
|
|
115
|
+
\param mol readonly const molecule being searched
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
virtual bool hasMatch(const ROMol &mol) const = 0;
|
|
119
|
+
|
|
120
|
+
//------------------------------------
|
|
121
|
+
//! Clone - deprecated
|
|
122
|
+
/// Clones the current FilterMatcherBase into one that
|
|
123
|
+
/// can be passed around safely.
|
|
124
|
+
virtual boost::shared_ptr<FilterMatcherBase> Clone() const {
|
|
125
|
+
BOOST_LOG(rdWarningLog)
|
|
126
|
+
<< "FilterMatcherBase::Clone is deprecated, use copy instead"
|
|
127
|
+
<< std::endl;
|
|
128
|
+
return copy();
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
//------------------------------------
|
|
132
|
+
//! copy
|
|
133
|
+
/// copies the current FilterMatcherBase into one that
|
|
134
|
+
/// can be passed around safely.
|
|
135
|
+
virtual boost::shared_ptr<FilterMatcherBase> copy() const = 0;
|
|
136
|
+
|
|
137
|
+
private:
|
|
138
|
+
#ifdef RDK_USE_BOOST_SERIALIZATION
|
|
139
|
+
friend class boost::serialization::access;
|
|
140
|
+
template <class Archive>
|
|
141
|
+
void serialize(Archive &ar, const unsigned int version) {
|
|
142
|
+
RDUNUSED_PARAM(version);
|
|
143
|
+
ar &d_filterName;
|
|
144
|
+
}
|
|
145
|
+
#endif
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
#ifdef RDK_USE_BOOST_SERIALIZATION
|
|
149
|
+
BOOST_SERIALIZATION_ASSUME_ABSTRACT(FilterMatcherBase)
|
|
150
|
+
#endif
|
|
151
|
+
} // namespace RDKit
|
|
152
|
+
#endif
|