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,97 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (C) 2004-2008 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 __FREECHEMICALFEATURE_H_13012005_1023__
|
|
12
|
+
#define __FREECHEMICALFEATURE_H_13012005_1023__
|
|
13
|
+
|
|
14
|
+
#include <utility>
|
|
15
|
+
|
|
16
|
+
#include <Geometry/point.h>
|
|
17
|
+
#include <ChemicalFeatures/ChemicalFeature.h>
|
|
18
|
+
|
|
19
|
+
namespace ChemicalFeatures {
|
|
20
|
+
|
|
21
|
+
//------------------------------------------------------
|
|
22
|
+
//! Class for chemical features that do not originate from molecules
|
|
23
|
+
/// e.g. pharmacophores, site-maps etc.
|
|
24
|
+
class RDKIT_CHEMICALFEATURES_EXPORT FreeChemicalFeature
|
|
25
|
+
: public ChemicalFeature {
|
|
26
|
+
public:
|
|
27
|
+
//! start with everything specified
|
|
28
|
+
FreeChemicalFeature(std::string family, std::string type,
|
|
29
|
+
const RDGeom::Point3D &loc, int id = -1)
|
|
30
|
+
: d_id(id),
|
|
31
|
+
d_family(std::move(family)),
|
|
32
|
+
d_type(std::move(type)),
|
|
33
|
+
d_position(loc) {}
|
|
34
|
+
|
|
35
|
+
//! start with family and location specified, leave the type blank
|
|
36
|
+
FreeChemicalFeature(std::string family, const RDGeom::Point3D &loc)
|
|
37
|
+
: d_id(-1), d_family(std::move(family)), d_type(""), d_position(loc) {}
|
|
38
|
+
|
|
39
|
+
//! start with everything blank
|
|
40
|
+
FreeChemicalFeature()
|
|
41
|
+
: d_family(""), d_type(""), d_position(RDGeom::Point3D(0.0, 0.0, 0.0)) {}
|
|
42
|
+
|
|
43
|
+
explicit FreeChemicalFeature(const std::string &pickle) {
|
|
44
|
+
this->initFromString(pickle);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
FreeChemicalFeature(const FreeChemicalFeature &other)
|
|
48
|
+
: d_id(other.getId()),
|
|
49
|
+
d_family(other.getFamily()),
|
|
50
|
+
d_type(other.getType()),
|
|
51
|
+
d_position(other.getPos()) {}
|
|
52
|
+
|
|
53
|
+
~FreeChemicalFeature() override = default;
|
|
54
|
+
|
|
55
|
+
//! return our id
|
|
56
|
+
int getId() const override { return d_id; }
|
|
57
|
+
|
|
58
|
+
//! return our family
|
|
59
|
+
const std::string &getFamily() const override { return d_family; }
|
|
60
|
+
|
|
61
|
+
//! return our type
|
|
62
|
+
const std::string &getType() const override { return d_type; }
|
|
63
|
+
|
|
64
|
+
//! return our position
|
|
65
|
+
RDGeom::Point3D getPos() const override { return d_position; }
|
|
66
|
+
|
|
67
|
+
//! set our id
|
|
68
|
+
void setId(const int id) { d_id = id; }
|
|
69
|
+
|
|
70
|
+
//! set our family
|
|
71
|
+
void setFamily(const std::string &family) { d_family = family; }
|
|
72
|
+
|
|
73
|
+
//! set our type
|
|
74
|
+
void setType(const std::string &type) { d_type = type; }
|
|
75
|
+
|
|
76
|
+
//! set our position
|
|
77
|
+
void setPos(const RDGeom::Point3D &loc) {
|
|
78
|
+
// std::cout << loc.x << " " << loc.y << " " << loc.z << "\n";
|
|
79
|
+
d_position = loc;
|
|
80
|
+
// std::cout << d_position.x << " " << d_position.y << " " << d_position.z
|
|
81
|
+
// << "\n";
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
//! returns a serialized form of the feature (a pickle)
|
|
85
|
+
std::string toString() const;
|
|
86
|
+
//! initialize from a pickle string
|
|
87
|
+
void initFromString(const std::string &pickle);
|
|
88
|
+
|
|
89
|
+
private:
|
|
90
|
+
int d_id{-1};
|
|
91
|
+
std::string d_family;
|
|
92
|
+
std::string d_type;
|
|
93
|
+
RDGeom::Point3D d_position;
|
|
94
|
+
};
|
|
95
|
+
} // namespace ChemicalFeatures
|
|
96
|
+
|
|
97
|
+
#endif
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (C) 2003-2007 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_METRICFUNCS_H__
|
|
12
|
+
#define __RD_METRICFUNCS_H__
|
|
13
|
+
#include <cmath>
|
|
14
|
+
#include <DataStructs/BitOps.h>
|
|
15
|
+
#include <RDGeneral/Invariant.h>
|
|
16
|
+
|
|
17
|
+
namespace RDDataManip {
|
|
18
|
+
//! return the Euclidean distance between two vectors
|
|
19
|
+
template <typename T1, typename T2>
|
|
20
|
+
double EuclideanDistanceMetric(const T1 &v1, const T2 &v2, unsigned int dim) {
|
|
21
|
+
double dist = 0.0;
|
|
22
|
+
for (unsigned int i = 0; i < dim; i++) {
|
|
23
|
+
double diff = static_cast<double>(v1[i]) - static_cast<double>(v2[i]);
|
|
24
|
+
dist += (diff * diff);
|
|
25
|
+
}
|
|
26
|
+
return sqrt(dist);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// FIX: there's no reason to have this tied to TanimotoSimilarity... could
|
|
30
|
+
// include
|
|
31
|
+
// a different sim function as a template param
|
|
32
|
+
//! return the Tanimoto distance (1-TanimotoSimilarity) between two bit vectors
|
|
33
|
+
template <typename T1, typename T2>
|
|
34
|
+
double TanimotoDistanceMetric(const T1 &bv1, const T2 &bv2, unsigned int dim) {
|
|
35
|
+
// the dim parameter is actually irrelevant here but we have to include it to
|
|
36
|
+
// deal with
|
|
37
|
+
// template version of setMetricFunc in MetricMatricCalc
|
|
38
|
+
RDUNUSED_PARAM(dim);
|
|
39
|
+
return (1.0 - SimilarityWrapper(
|
|
40
|
+
bv1, bv2,
|
|
41
|
+
(double (*)(const T1 &, const T2 &))TanimotoSimilarity));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
//! return the Tanimoto similarity between two bit vectors
|
|
45
|
+
template <typename T1, typename T2>
|
|
46
|
+
double TanimotoSimilarityMetric(const T1 &bv1, const T2 &bv2,
|
|
47
|
+
unsigned int dim) {
|
|
48
|
+
RDUNUSED_PARAM(dim);
|
|
49
|
+
return SimilarityWrapper(
|
|
50
|
+
bv1, bv2, (double (*)(const T1 &, const T2 &))TanimotoSimilarity);
|
|
51
|
+
};
|
|
52
|
+
} // namespace RDDataManip
|
|
53
|
+
|
|
54
|
+
#endif
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// $Id$
|
|
2
|
+
//
|
|
3
|
+
// Copyright (C) 2003-2006 Rational Discovery LLC
|
|
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
|
+
#include <RDGeneral/export.h>
|
|
12
|
+
#ifndef __RD_METRICMATRIXCAL_H__
|
|
13
|
+
#define __RD_METRICMATRIXCAL_H__
|
|
14
|
+
|
|
15
|
+
#include "MetricFuncs.h"
|
|
16
|
+
#include <RDGeneral/Invariant.h>
|
|
17
|
+
|
|
18
|
+
namespace RDDataManip {
|
|
19
|
+
|
|
20
|
+
/*! \brief A generic metric matrix calculator (e.g similarity matrix or
|
|
21
|
+
* distance matrix)
|
|
22
|
+
*
|
|
23
|
+
* This templated class needs some explanation
|
|
24
|
+
* vectType is a container that can support [] operator
|
|
25
|
+
* entryType is the type of entry that is returned by the [] operator
|
|
26
|
+
* Examples of the container include PySequenceHolder which is wrapper around
|
|
27
|
+
* a python sequence objects like lists and tuples.
|
|
28
|
+
* Examples of the entryType include a sequence of double, floats, and
|
|
29
|
+
*ExplicitBitVects
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
template <class vectType, class entryType>
|
|
33
|
+
class MetricMatrixCalc {
|
|
34
|
+
public:
|
|
35
|
+
/*! \brief Default Constructor
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
MetricMatrixCalc() {}
|
|
39
|
+
|
|
40
|
+
/*! \brief Set the metric function
|
|
41
|
+
*
|
|
42
|
+
* Set the pointer to the mertic funvtion to be used by the metric calculator
|
|
43
|
+
*
|
|
44
|
+
* ARGUMENTS:
|
|
45
|
+
*
|
|
46
|
+
* mFunc - pointer to the metric function
|
|
47
|
+
*/
|
|
48
|
+
void setMetricFunc(double (*mFunc)(const entryType &, const entryType &,
|
|
49
|
+
unsigned int)) {
|
|
50
|
+
dp_metricFunc = mFunc;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/*! \brief The calculator function
|
|
54
|
+
*
|
|
55
|
+
* ARGUMENTS:
|
|
56
|
+
*
|
|
57
|
+
* descrips - vectType container with a entryType for each item
|
|
58
|
+
* nItems - the number of item in the descripts.
|
|
59
|
+
* In several cases this argument is irrelvant since vectType
|
|
60
|
+
*probably supports
|
|
61
|
+
* a size() member function, But we would like this interface to
|
|
62
|
+
*take for example
|
|
63
|
+
* a double** and correctly parse the row and columns.
|
|
64
|
+
* dim - the dimension of the sequences
|
|
65
|
+
* distMat - pointer to an array to write the distance matrix to
|
|
66
|
+
* it is assumed that the right sized array has already be
|
|
67
|
+
*allocated.
|
|
68
|
+
*
|
|
69
|
+
* FIX: we can probably make this function create the correct sized distMat
|
|
70
|
+
*and return
|
|
71
|
+
* it to the caller, but when pushing he result out to a python array not sure
|
|
72
|
+
*how to
|
|
73
|
+
* avoid copy the entire distance matrix in that case
|
|
74
|
+
*
|
|
75
|
+
* RETURNS:
|
|
76
|
+
*
|
|
77
|
+
* pointer to a 1D array of doubles. Only the lower triangle elements are
|
|
78
|
+
* included in the array
|
|
79
|
+
*/
|
|
80
|
+
void calcMetricMatrix(const vectType &descripts, unsigned int nItems,
|
|
81
|
+
unsigned int dim, double *distMat) {
|
|
82
|
+
CHECK_INVARIANT(distMat, "invalid pointer to a distance matix");
|
|
83
|
+
|
|
84
|
+
for (unsigned int i = 1; i < nItems; i++) {
|
|
85
|
+
unsigned int itab = i * (i - 1) / 2;
|
|
86
|
+
for (unsigned int j = 0; j < i; j++) {
|
|
87
|
+
distMat[itab + j] = dp_metricFunc(descripts[i], descripts[j], dim);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
private:
|
|
93
|
+
// pointer to the metric function
|
|
94
|
+
/*! \brief pointer to the metric function
|
|
95
|
+
*
|
|
96
|
+
* In several cases the last argument 'dim' should be irrelevant,
|
|
97
|
+
* For example when entryType is a bit vector the size is of the vector
|
|
98
|
+
* or the dimension can be obtained by asking the bit vector itself. However
|
|
99
|
+
* we woul like this interface to support other containers lines double*
|
|
100
|
+
* in which case the 'dim' value is useful in cumputing the metric.
|
|
101
|
+
*/
|
|
102
|
+
double (*dp_metricFunc)(const entryType &, const entryType &, unsigned int);
|
|
103
|
+
};
|
|
104
|
+
}; // namespace RDDataManip
|
|
105
|
+
|
|
106
|
+
#endif
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (C) 2003-2012 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_BITOPS_H__
|
|
12
|
+
#define __RD_BITOPS_H__
|
|
13
|
+
/*! \file BitOps.h
|
|
14
|
+
|
|
15
|
+
\brief Contains general bit-comparison and similarity operations.
|
|
16
|
+
|
|
17
|
+
The notation used to document the similarity metrics is:
|
|
18
|
+
- \c V1_n: number of bits in vector 1
|
|
19
|
+
- \c V1_o: number of on bits in vector 1
|
|
20
|
+
- <tt>(V1&V2)_o</tt>: number of on bits in the intersection of vectors 1 and
|
|
21
|
+
2
|
|
22
|
+
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
#include "BitVects.h"
|
|
26
|
+
#include <string>
|
|
27
|
+
|
|
28
|
+
//! general purpose wrapper for calculating the similarity between two bvs
|
|
29
|
+
//! that may be of unequal size (will automatically fold as appropriate)
|
|
30
|
+
template <typename T>
|
|
31
|
+
double SimilarityWrapper(const T& bv1, const T& bv2,
|
|
32
|
+
double (*metric)(const T&, const T&),
|
|
33
|
+
bool returnDistance = false) {
|
|
34
|
+
double res = 0.0;
|
|
35
|
+
if (bv1.getNumBits() > bv2.getNumBits()) {
|
|
36
|
+
T* bv1tmp = FoldFingerprint(bv1, bv1.getNumBits() / bv2.getNumBits());
|
|
37
|
+
res = metric(*bv1tmp, bv2);
|
|
38
|
+
delete bv1tmp;
|
|
39
|
+
} else if (bv2.getNumBits() > bv1.getNumBits()) {
|
|
40
|
+
T* bv2tmp = FoldFingerprint(bv2, bv2.getNumBits() / bv1.getNumBits());
|
|
41
|
+
res = metric(bv1, *bv2tmp);
|
|
42
|
+
delete bv2tmp;
|
|
43
|
+
} else {
|
|
44
|
+
res = metric(bv1, bv2);
|
|
45
|
+
}
|
|
46
|
+
if (returnDistance) {
|
|
47
|
+
res = 1.0 - res;
|
|
48
|
+
}
|
|
49
|
+
return res;
|
|
50
|
+
}
|
|
51
|
+
//! \overload
|
|
52
|
+
template <typename T>
|
|
53
|
+
double SimilarityWrapper(const T& bv1, const T& bv2, double a, double b,
|
|
54
|
+
double (*metric)(const T&, const T&, double, double),
|
|
55
|
+
bool returnDistance = false) {
|
|
56
|
+
double res = 0.0;
|
|
57
|
+
if (bv1.getNumBits() > bv2.getNumBits()) {
|
|
58
|
+
T* bv1tmp = FoldFingerprint(bv1, bv1.getNumBits() / bv2.getNumBits());
|
|
59
|
+
res = metric(*bv1tmp, bv2, a, b);
|
|
60
|
+
delete bv1tmp;
|
|
61
|
+
} else if (bv2.getNumBits() > bv1.getNumBits()) {
|
|
62
|
+
T* bv2tmp = FoldFingerprint(bv2, bv2.getNumBits() / bv1.getNumBits());
|
|
63
|
+
res = metric(bv1, *bv2tmp, a, b);
|
|
64
|
+
delete bv2tmp;
|
|
65
|
+
} else {
|
|
66
|
+
res = metric(bv1, bv2, a, b);
|
|
67
|
+
}
|
|
68
|
+
if (returnDistance) {
|
|
69
|
+
res = 1.0 - res;
|
|
70
|
+
}
|
|
71
|
+
return res;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
RDKIT_DATASTRUCTS_EXPORT bool AllProbeBitsMatch(const char* probe,
|
|
75
|
+
const char* ref);
|
|
76
|
+
RDKIT_DATASTRUCTS_EXPORT bool AllProbeBitsMatch(const std::string& probe,
|
|
77
|
+
const std::string& ref);
|
|
78
|
+
RDKIT_DATASTRUCTS_EXPORT bool AllProbeBitsMatch(const ExplicitBitVect& probe,
|
|
79
|
+
const ExplicitBitVect& ref);
|
|
80
|
+
|
|
81
|
+
template <typename T1>
|
|
82
|
+
RDKIT_DATASTRUCTS_EXPORT bool AllProbeBitsMatch(const T1& probe,
|
|
83
|
+
const std::string& pkl);
|
|
84
|
+
|
|
85
|
+
template <typename T1>
|
|
86
|
+
RDKIT_DATASTRUCTS_EXPORT bool AllProbeBitsMatch(const T1& probe, const T1& ref);
|
|
87
|
+
|
|
88
|
+
//! returns the number of on bits in common between two bit vectors
|
|
89
|
+
/*!
|
|
90
|
+
\return (bv1&bv2)_o
|
|
91
|
+
*/
|
|
92
|
+
template <typename T1, typename T2>
|
|
93
|
+
RDKIT_DATASTRUCTS_EXPORT int NumOnBitsInCommon(const T1& bv1, const T2& bv2);
|
|
94
|
+
|
|
95
|
+
RDKIT_DATASTRUCTS_EXPORT int NumOnBitsInCommon(const ExplicitBitVect& bv1,
|
|
96
|
+
const ExplicitBitVect& bv2);
|
|
97
|
+
|
|
98
|
+
//! returns the Tanimoto similarity between two bit vects
|
|
99
|
+
/*!
|
|
100
|
+
\return <tt>(bv1&bv2)_o / [bv1_o + bv2_o - (bv1&bv2)_o]</tt>
|
|
101
|
+
*/
|
|
102
|
+
template <typename T1, typename T2>
|
|
103
|
+
RDKIT_DATASTRUCTS_EXPORT double TanimotoSimilarity(const T1& bv1,
|
|
104
|
+
const T2& bv2);
|
|
105
|
+
|
|
106
|
+
//! returns the Cosine similarity between two bit vects
|
|
107
|
+
/*!
|
|
108
|
+
\return <tt>(bv1&bv2)_o / sqrt(bv1_o + bv2_o)</tt>
|
|
109
|
+
*/
|
|
110
|
+
template <typename T1, typename T2>
|
|
111
|
+
RDKIT_DATASTRUCTS_EXPORT double CosineSimilarity(const T1& bv1, const T2& bv2);
|
|
112
|
+
|
|
113
|
+
//! returns the Kulczynski similarity between two bit vects
|
|
114
|
+
/*!
|
|
115
|
+
\return <tt>(bv1&bv2)_o * [bv1_o + bv2_o] / [2 * bv1_o * bv2_o]</tt>
|
|
116
|
+
*/
|
|
117
|
+
template <typename T1, typename T2>
|
|
118
|
+
RDKIT_DATASTRUCTS_EXPORT double KulczynskiSimilarity(const T1& bv1,
|
|
119
|
+
const T2& bv2);
|
|
120
|
+
|
|
121
|
+
//! returns the Dice similarity between two bit vects
|
|
122
|
+
/*!
|
|
123
|
+
\return <tt>2*(bv1&bv2)_o / [bv1_o + bv2_o]</tt>
|
|
124
|
+
*/
|
|
125
|
+
template <typename T1, typename T2>
|
|
126
|
+
RDKIT_DATASTRUCTS_EXPORT double DiceSimilarity(const T1& bv1, const T2& bv2);
|
|
127
|
+
|
|
128
|
+
//! returns the Tversky similarity between two bit vects
|
|
129
|
+
/*!
|
|
130
|
+
\return <tt>(bv1&bv2)_o / [a*bv1_o + b*bv2_o + (1 - a - b)*(bv1&bv2)_o]</tt>
|
|
131
|
+
|
|
132
|
+
Notes:
|
|
133
|
+
# 0 <= a,b <= 1
|
|
134
|
+
# Tversky(a=1,b=1) = Tanimoto
|
|
135
|
+
# Tversky(a=1/2,b=1/2) = Dice
|
|
136
|
+
|
|
137
|
+
*/
|
|
138
|
+
template <typename T1, typename T2>
|
|
139
|
+
RDKIT_DATASTRUCTS_EXPORT double TverskySimilarity(const T1& bv1, const T2& bv2,
|
|
140
|
+
double a, double b);
|
|
141
|
+
|
|
142
|
+
//! returns the Sokal similarity between two bit vects
|
|
143
|
+
/*!
|
|
144
|
+
\return <tt>(bv1&bv2)_o / [2*bv1_o + 2*bv2_o - 3*(bv1&bv2)_o]</tt>
|
|
145
|
+
*/
|
|
146
|
+
template <typename T1, typename T2>
|
|
147
|
+
RDKIT_DATASTRUCTS_EXPORT double SokalSimilarity(const T1& bv1, const T2& bv2);
|
|
148
|
+
|
|
149
|
+
//! returns the McConnaughey similarity between two bit vects
|
|
150
|
+
/*!
|
|
151
|
+
\return <tt>[(bv1&bv2)_o * (bv1_o + bv2_o) - (bv1_o * bv2_o)] / (bv1_o *
|
|
152
|
+
bv2_o)</tt>
|
|
153
|
+
*/
|
|
154
|
+
template <typename T1, typename T2>
|
|
155
|
+
RDKIT_DATASTRUCTS_EXPORT double McConnaugheySimilarity(const T1& bv1,
|
|
156
|
+
const T2& bv2);
|
|
157
|
+
|
|
158
|
+
//! returns the Asymmetric similarity between two bit vects
|
|
159
|
+
/*!
|
|
160
|
+
\return <tt>(bv1&bv2)_o / min(bv1_o,bv2_o)</tt>
|
|
161
|
+
*/
|
|
162
|
+
template <typename T1, typename T2>
|
|
163
|
+
RDKIT_DATASTRUCTS_EXPORT double AsymmetricSimilarity(const T1& bv1,
|
|
164
|
+
const T2& bv2);
|
|
165
|
+
|
|
166
|
+
//! returns the Braun-Blanquet similarity between two bit vects
|
|
167
|
+
/*!
|
|
168
|
+
\return <tt>(bv1&bv2)_o / max(bv1_o,bv2_o)</tt>
|
|
169
|
+
*/
|
|
170
|
+
template <typename T1, typename T2>
|
|
171
|
+
RDKIT_DATASTRUCTS_EXPORT double BraunBlanquetSimilarity(const T1& bv1,
|
|
172
|
+
const T2& bv2);
|
|
173
|
+
|
|
174
|
+
//! returns the Russel similarity between two bit vects
|
|
175
|
+
/*!
|
|
176
|
+
\return <tt>(bv1&bv2)_o / bv1_o</tt>
|
|
177
|
+
|
|
178
|
+
<b>Note:</b> that this operation is non-commutative:
|
|
179
|
+
RusselSimilarity(bv1,bv2) != RusselSimilarity(bv2,bv1)
|
|
180
|
+
|
|
181
|
+
*/
|
|
182
|
+
template <typename T1, typename T2>
|
|
183
|
+
RDKIT_DATASTRUCTS_EXPORT double RusselSimilarity(const T1& bv1, const T2& bv2);
|
|
184
|
+
|
|
185
|
+
//! returns the Rogot-Goldberg similarity between two bit vects
|
|
186
|
+
/*!
|
|
187
|
+
\return <tt>(bv1&bv2)_o / (bv1_o + bv2_o)
|
|
188
|
+
+ (bv1_n - bv1_o - bv2_o + (bv1&bv2)_o) / (2*bv1_n - bv1_o - bv2_o) </tt>
|
|
189
|
+
*/
|
|
190
|
+
template <typename T1, typename T2>
|
|
191
|
+
RDKIT_DATASTRUCTS_EXPORT double RogotGoldbergSimilarity(const T1& bv1,
|
|
192
|
+
const T2& bv2);
|
|
193
|
+
|
|
194
|
+
//! returns the on bit similarity between two bit vects
|
|
195
|
+
/*!
|
|
196
|
+
\return <tt>(bv1&bv2)_o / (bv1|bv2)_o </tt>
|
|
197
|
+
*/
|
|
198
|
+
template <typename T1, typename T2>
|
|
199
|
+
RDKIT_DATASTRUCTS_EXPORT double OnBitSimilarity(const T1& bv1, const T2& bv2);
|
|
200
|
+
|
|
201
|
+
//! returns the number of common bits (on and off) between two bit vects
|
|
202
|
+
/*!
|
|
203
|
+
\return <tt>bv1_n - (bv1^bv2)_o</tt>
|
|
204
|
+
*/
|
|
205
|
+
template <typename T1, typename T2>
|
|
206
|
+
RDKIT_DATASTRUCTS_EXPORT int NumBitsInCommon(const T1& bv1, const T2& bv2);
|
|
207
|
+
|
|
208
|
+
RDKIT_DATASTRUCTS_EXPORT int NumBitsInCommon(const ExplicitBitVect& bv1,
|
|
209
|
+
const ExplicitBitVect& bv2);
|
|
210
|
+
|
|
211
|
+
//! returns the common-bit similarity (on and off) between two bit vects
|
|
212
|
+
//! This is also called Manhattan similarity.
|
|
213
|
+
/*!
|
|
214
|
+
\return <tt>[bv1_n - (bv1^bv2)_o] / bv1_n</tt>
|
|
215
|
+
*/
|
|
216
|
+
template <typename T1, typename T2>
|
|
217
|
+
RDKIT_DATASTRUCTS_EXPORT double AllBitSimilarity(const T1& bv1, const T2& bv2);
|
|
218
|
+
|
|
219
|
+
//! returns an IntVect with indices of all on bits in common between two bit
|
|
220
|
+
/// vects
|
|
221
|
+
template <typename T1, typename T2>
|
|
222
|
+
RDKIT_DATASTRUCTS_EXPORT IntVect OnBitsInCommon(const T1& bv1, const T2& bv2);
|
|
223
|
+
|
|
224
|
+
//! returns an IntVect with indices of all off bits in common between two bit
|
|
225
|
+
/// vects
|
|
226
|
+
template <typename T1, typename T2>
|
|
227
|
+
RDKIT_DATASTRUCTS_EXPORT IntVect OffBitsInCommon(const T1& bv1, const T2& bv2);
|
|
228
|
+
|
|
229
|
+
//! returns the on-bit projected similarities between two bit vects
|
|
230
|
+
/*!
|
|
231
|
+
\return two values, as a DoubleVect:
|
|
232
|
+
- <tt>(bv1&bv2)_o / bv1_o</tt>
|
|
233
|
+
- <tt>(bv1&bv2)_o / bv2_o</tt>
|
|
234
|
+
*/
|
|
235
|
+
template <typename T1, typename T2>
|
|
236
|
+
RDKIT_DATASTRUCTS_EXPORT DoubleVect OnBitProjSimilarity(const T1& bv1,
|
|
237
|
+
const T2& bv2);
|
|
238
|
+
|
|
239
|
+
//! returns the on-bit projected similarities between two bit vects
|
|
240
|
+
/*!
|
|
241
|
+
\return two values, as a DoubleVect:
|
|
242
|
+
- <tt>[bv1_n - (bv1|bv2)_o] / [bv1_n - bv1_o]</tt>
|
|
243
|
+
- <tt>[bv2_n - (bv1|bv2)_o] / [bv2_n - bv2_o]</tt>
|
|
244
|
+
|
|
245
|
+
<b>Note:</b> <tt>bv1_n = bv2_n</tt>
|
|
246
|
+
|
|
247
|
+
*/
|
|
248
|
+
template <typename T1, typename T2>
|
|
249
|
+
RDKIT_DATASTRUCTS_EXPORT DoubleVect OffBitProjSimilarity(const T1& bv1,
|
|
250
|
+
const T2& bv2);
|
|
251
|
+
|
|
252
|
+
//! folds a bit vector \c factor times and returns the result
|
|
253
|
+
/*!
|
|
254
|
+
\param bv1 the vector to be folded
|
|
255
|
+
\param factor (optional) the number of times to fold it
|
|
256
|
+
|
|
257
|
+
\return a pointer to the folded fingerprint, which is
|
|
258
|
+
<tt>bv1_n/factor</tt> long.
|
|
259
|
+
|
|
260
|
+
<b>Note:</b> The caller is responsible for <tt>delete</tt>ing the result.
|
|
261
|
+
*/
|
|
262
|
+
template <typename T1>
|
|
263
|
+
RDKIT_DATASTRUCTS_EXPORT T1* FoldFingerprint(const T1& bv1,
|
|
264
|
+
unsigned int factor = 2);
|
|
265
|
+
|
|
266
|
+
//! returns a text representation of a bit vector (a string of 0s and 1s)
|
|
267
|
+
/*!
|
|
268
|
+
\param bv1 the vector to use
|
|
269
|
+
|
|
270
|
+
\return an std::string
|
|
271
|
+
|
|
272
|
+
*/
|
|
273
|
+
template <typename T1>
|
|
274
|
+
RDKIT_DATASTRUCTS_EXPORT std::string BitVectToText(const T1& bv1);
|
|
275
|
+
|
|
276
|
+
//! returns a hex representation of a bit vector compatible with Andrew Dalke's
|
|
277
|
+
/// FPS format
|
|
278
|
+
/*!
|
|
279
|
+
\param bv1 the vector to use
|
|
280
|
+
|
|
281
|
+
\return an std::string
|
|
282
|
+
|
|
283
|
+
*/
|
|
284
|
+
template <typename T1>
|
|
285
|
+
RDKIT_DATASTRUCTS_EXPORT std::string BitVectToFPSText(const T1& bv1);
|
|
286
|
+
|
|
287
|
+
//! returns a binary string representation of a bit vector (an array of bytes)
|
|
288
|
+
/*!
|
|
289
|
+
\param bv1 the vector to use
|
|
290
|
+
|
|
291
|
+
\return an std::string
|
|
292
|
+
|
|
293
|
+
*/
|
|
294
|
+
template <typename T1>
|
|
295
|
+
RDKIT_DATASTRUCTS_EXPORT std::string BitVectToBinaryText(const T1& bv1);
|
|
296
|
+
|
|
297
|
+
//! updates a bit vector from Andrew Dalke's FPS format
|
|
298
|
+
/*!
|
|
299
|
+
\param bv1 the vector to use
|
|
300
|
+
\param fps the FPS hex string
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
*/
|
|
304
|
+
template <typename T1>
|
|
305
|
+
RDKIT_DATASTRUCTS_EXPORT void UpdateBitVectFromFPSText(T1& bv1,
|
|
306
|
+
const std::string& fps);
|
|
307
|
+
|
|
308
|
+
//! updates a bit vector from a binary string representation of a bit vector (an
|
|
309
|
+
/// array of bytes)
|
|
310
|
+
/*!
|
|
311
|
+
\param bv1 the vector to use
|
|
312
|
+
\param fps the binary string
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
*/
|
|
316
|
+
template <typename T1>
|
|
317
|
+
RDKIT_DATASTRUCTS_EXPORT void UpdateBitVectFromBinaryText(
|
|
318
|
+
T1& bv1, const std::string& fps);
|
|
319
|
+
|
|
320
|
+
// FIX: docs and tests please
|
|
321
|
+
|
|
322
|
+
RDKIT_DATASTRUCTS_EXPORT unsigned int CalcBitmapPopcount(
|
|
323
|
+
const unsigned char* bv1, unsigned int nBytes);
|
|
324
|
+
|
|
325
|
+
RDKIT_DATASTRUCTS_EXPORT double CalcBitmapTanimoto(const unsigned char* bv1,
|
|
326
|
+
const unsigned char* bv2,
|
|
327
|
+
unsigned int nBytes);
|
|
328
|
+
RDKIT_DATASTRUCTS_EXPORT double CalcBitmapDice(const unsigned char* bv1,
|
|
329
|
+
const unsigned char* bv2,
|
|
330
|
+
unsigned int nBytes);
|
|
331
|
+
RDKIT_DATASTRUCTS_EXPORT double CalcBitmapTversky(const unsigned char* bv1,
|
|
332
|
+
const unsigned char* bv2,
|
|
333
|
+
unsigned int nBytes,
|
|
334
|
+
double ca, double cb);
|
|
335
|
+
RDKIT_DATASTRUCTS_EXPORT bool CalcBitmapAllProbeBitsMatch(
|
|
336
|
+
const unsigned char* probe, const unsigned char* ref, unsigned int nBytes);
|
|
337
|
+
#endif
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (c) 2003-2008 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_BITVECT_H__
|
|
12
|
+
#define __RD_BITVECT_H__
|
|
13
|
+
|
|
14
|
+
#include <vector>
|
|
15
|
+
#include <string>
|
|
16
|
+
|
|
17
|
+
typedef std::vector<int> IntVect;
|
|
18
|
+
typedef IntVect::iterator IntVectIter;
|
|
19
|
+
typedef std::vector<double> DoubleVect;
|
|
20
|
+
typedef DoubleVect::iterator DoubleVectIter;
|
|
21
|
+
const int ci_BITVECT_VERSION = 0x0020; //!< version number to use in pickles
|
|
22
|
+
|
|
23
|
+
//! Abstract base class for storing BitVectors
|
|
24
|
+
class RDKIT_DATASTRUCTS_EXPORT BitVect {
|
|
25
|
+
public:
|
|
26
|
+
virtual ~BitVect() = 0;
|
|
27
|
+
//! sets a particular bit and returns its original value
|
|
28
|
+
virtual bool setBit(const unsigned int which) = 0;
|
|
29
|
+
//! unsets a particular bit and returns its original value
|
|
30
|
+
virtual bool unsetBit(const unsigned int which) = 0;
|
|
31
|
+
//! returns the value of a particular bit
|
|
32
|
+
virtual bool getBit(const unsigned int which) const = 0;
|
|
33
|
+
//! returns the number of bits (the length of the BitVect)
|
|
34
|
+
virtual unsigned int getNumBits() const = 0;
|
|
35
|
+
//! returns the number of on bits
|
|
36
|
+
virtual unsigned int getNumOnBits() const = 0;
|
|
37
|
+
//! returns the number of off bits
|
|
38
|
+
virtual unsigned int getNumOffBits() const = 0;
|
|
39
|
+
//! replaces the contents of \c v with indices of our on bits
|
|
40
|
+
virtual void getOnBits(IntVect& v) const = 0;
|
|
41
|
+
//! clears (sets to off) all of our bits
|
|
42
|
+
virtual void clearBits() = 0;
|
|
43
|
+
|
|
44
|
+
//! initializes this BitVect from a pickle
|
|
45
|
+
/*!
|
|
46
|
+
\param data the raw pickle data
|
|
47
|
+
\param dataLen the length of \c data
|
|
48
|
+
\param isBase64 (optional) if this is set, \c data is assumed to
|
|
49
|
+
be base64 encoded.
|
|
50
|
+
\param allowOldFormat (optional) allows a very old form of the BitVect
|
|
51
|
+
representation to be recognized. This argument disables a large
|
|
52
|
+
amount of error checking and it is strongly suggested that it not
|
|
53
|
+
be used in client code.
|
|
54
|
+
*/
|
|
55
|
+
void initFromText(const char* data, const unsigned int dataLen,
|
|
56
|
+
bool isBase64 = false, bool allowOldFormat = false);
|
|
57
|
+
|
|
58
|
+
//! returns a serialized (pickled) version of this BitVect
|
|
59
|
+
virtual std::string toString() const = 0;
|
|
60
|
+
|
|
61
|
+
virtual bool operator[](const unsigned int which) const = 0;
|
|
62
|
+
unsigned int size() const { return getNumBits(); }
|
|
63
|
+
|
|
64
|
+
private:
|
|
65
|
+
virtual void _initForSize(const unsigned int size) = 0;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
#endif
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (c) 2002-2006 greg Landrum, Rational Discovery LLC
|
|
3
|
+
//
|
|
4
|
+
// @@ All Rights Reserved @@
|
|
5
|
+
// This file is part of the RDKit.
|
|
6
|
+
// The contents are covered by the terms of the BSD license
|
|
7
|
+
// which is included in the file license.txt, found at the root
|
|
8
|
+
// of the RDKit source tree.
|
|
9
|
+
//
|
|
10
|
+
#include <RDGeneral/export.h>
|
|
11
|
+
#ifndef __RD_BITVECTS_UTILS_H__
|
|
12
|
+
#define __RD_BITVECTS_UTILS_H__
|
|
13
|
+
|
|
14
|
+
#include "BitVects.h"
|
|
15
|
+
#include <string>
|
|
16
|
+
|
|
17
|
+
//! \brief Construct a BitVect from the ASCII representation of a
|
|
18
|
+
//! Daylight fingerprint string
|
|
19
|
+
template <typename T>
|
|
20
|
+
RDKIT_DATASTRUCTS_EXPORT void FromDaylightString(T &sbv, const std::string &s);
|
|
21
|
+
|
|
22
|
+
//! \brief Construct a BitVect from the ASCII representation of a
|
|
23
|
+
//! bit string (i.e. a bunch of zeros and ones)
|
|
24
|
+
template <typename T>
|
|
25
|
+
RDKIT_DATASTRUCTS_EXPORT void FromBitString(T &sbv, const std::string &s);
|
|
26
|
+
|
|
27
|
+
//! Convert a SparseBitVector to an ExplicitBitVector
|
|
28
|
+
/*!
|
|
29
|
+
\return a pointer to an ExplicitBitVector
|
|
30
|
+
<b>Note:</b> the caller is responsible for <tt>delete</tt>ing this.
|
|
31
|
+
|
|
32
|
+
*/
|
|
33
|
+
RDKIT_DATASTRUCTS_EXPORT ExplicitBitVect *convertToExplicit(
|
|
34
|
+
const SparseBitVect *sbv);
|
|
35
|
+
#endif
|