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,210 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (c) 2003-2020 Greg Landrum and Rational Discovery LLC
|
|
3
|
+
//
|
|
4
|
+
// @@ All Rights Reserved @@
|
|
5
|
+
// This file is part of the RDKit.
|
|
6
|
+
// The contents are covered by the terms of the BSD license
|
|
7
|
+
// which is included in the file license.txt, found at the root
|
|
8
|
+
// of the RDKit source tree.
|
|
9
|
+
//
|
|
10
|
+
#include <RDGeneral/export.h>
|
|
11
|
+
#ifndef RD_QUERY_H
|
|
12
|
+
#define RD_QUERY_H
|
|
13
|
+
|
|
14
|
+
#ifdef _MSC_VER
|
|
15
|
+
#pragma warning(disable : 4800) // warning: converting things to bool
|
|
16
|
+
#endif
|
|
17
|
+
|
|
18
|
+
#include <vector>
|
|
19
|
+
#include <string>
|
|
20
|
+
#include <RDGeneral/Invariant.h>
|
|
21
|
+
|
|
22
|
+
namespace Queries {
|
|
23
|
+
|
|
24
|
+
//! class to allow integer values to pick templates
|
|
25
|
+
template <int v>
|
|
26
|
+
class Int2Type {
|
|
27
|
+
enum { value = v };
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//! Base class for all queries
|
|
31
|
+
/*!
|
|
32
|
+
Query objects have one or two functions associated with them:
|
|
33
|
+
- <tt>bool matchFunc(MatchFuncArgType other)</tt> returns true or false
|
|
34
|
+
to indicate whether this query matches \c other.
|
|
35
|
+
This is mandatory.
|
|
36
|
+
|
|
37
|
+
- <tt>MatchFuncArgType dataFunc(DataFuncArgType other)</tt> converts
|
|
38
|
+
the argument \c other from \c DataFuncArgType to \c MatchFuncArgType.
|
|
39
|
+
This is optional if \c DataFuncArgType is the same as (or implicitly
|
|
40
|
+
convertible to) \c MatchFuncArgType.
|
|
41
|
+
|
|
42
|
+
*/
|
|
43
|
+
template <class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType,
|
|
44
|
+
bool needsConversion = false>
|
|
45
|
+
class RDKIT_QUERY_EXPORT Query {
|
|
46
|
+
public:
|
|
47
|
+
using CHILD_TYPE = std::shared_ptr<
|
|
48
|
+
Query<MatchFuncArgType, DataFuncArgType, needsConversion>>;
|
|
49
|
+
using CHILD_VECT = std::vector<CHILD_TYPE>;
|
|
50
|
+
using CHILD_VECT_I = typename CHILD_VECT::iterator;
|
|
51
|
+
using CHILD_VECT_CI = typename CHILD_VECT::const_iterator;
|
|
52
|
+
using MATCH_FUNC_ARG_TYPE = MatchFuncArgType;
|
|
53
|
+
using DATA_FUNC_ARG_TYPE = DataFuncArgType;
|
|
54
|
+
|
|
55
|
+
Query() : d_matchFunc(nullptr), d_dataFunc(nullptr) {}
|
|
56
|
+
virtual ~Query() { this->d_children.clear(); }
|
|
57
|
+
|
|
58
|
+
//! sets whether or not we are negated
|
|
59
|
+
void setNegation(bool what) { this->df_negate = what; }
|
|
60
|
+
//! returns whether or not we are negated
|
|
61
|
+
bool getNegation() const { return this->df_negate; }
|
|
62
|
+
|
|
63
|
+
//! sets our text description
|
|
64
|
+
void setDescription(const std::string &descr) { this->d_description = descr; }
|
|
65
|
+
//! \overload
|
|
66
|
+
void setDescription(const char *descr) {
|
|
67
|
+
this->d_description = std::string(descr);
|
|
68
|
+
}
|
|
69
|
+
//! returns our text description
|
|
70
|
+
const std::string &getDescription() const { return this->d_description; }
|
|
71
|
+
//! returns a fuller text description
|
|
72
|
+
virtual std::string getFullDescription() const {
|
|
73
|
+
if (!getNegation()) {
|
|
74
|
+
return getDescription();
|
|
75
|
+
} else {
|
|
76
|
+
return "not " + getDescription();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
//! sets our type label
|
|
81
|
+
void setTypeLabel(const std::string &typ) { this->d_queryType = typ; }
|
|
82
|
+
//! \overload
|
|
83
|
+
void setTypeLabel(const char *typ) { this->d_queryType = std::string(typ); }
|
|
84
|
+
//! returns our text label.
|
|
85
|
+
const std::string &getTypeLabel() const { return this->d_queryType; }
|
|
86
|
+
|
|
87
|
+
//! sets our match function
|
|
88
|
+
void setMatchFunc(bool (*what)(MatchFuncArgType)) {
|
|
89
|
+
this->d_matchFunc = what;
|
|
90
|
+
}
|
|
91
|
+
//! returns our match function:
|
|
92
|
+
bool (*getMatchFunc() const)(MatchFuncArgType) { return this->d_matchFunc; }
|
|
93
|
+
//! sets our data function
|
|
94
|
+
void setDataFunc(MatchFuncArgType (*what)(DataFuncArgType)) {
|
|
95
|
+
this->d_dataFunc = what;
|
|
96
|
+
}
|
|
97
|
+
//! returns our data function:
|
|
98
|
+
MatchFuncArgType (*getDataFunc() const)(DataFuncArgType) {
|
|
99
|
+
return this->d_dataFunc;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
//! adds a child to our list of children
|
|
103
|
+
void addChild(CHILD_TYPE child) { this->d_children.push_back(child); }
|
|
104
|
+
//! returns an iterator for the beginning of our child vector
|
|
105
|
+
CHILD_VECT_CI beginChildren() const { return this->d_children.begin(); }
|
|
106
|
+
//! returns an iterator for the end of our child vector
|
|
107
|
+
CHILD_VECT_CI endChildren() const { return this->d_children.end(); }
|
|
108
|
+
|
|
109
|
+
//! returns whether or not we match the argument
|
|
110
|
+
virtual bool Match(const DataFuncArgType arg) const {
|
|
111
|
+
MatchFuncArgType mfArg = TypeConvert(arg, Int2Type<needsConversion>());
|
|
112
|
+
bool tRes;
|
|
113
|
+
if (this->d_matchFunc) {
|
|
114
|
+
tRes = this->d_matchFunc(mfArg);
|
|
115
|
+
} else {
|
|
116
|
+
tRes = static_cast<bool>(mfArg);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (this->getNegation()) {
|
|
120
|
+
return !tRes;
|
|
121
|
+
} else {
|
|
122
|
+
return tRes;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
//! returns a copy of this Query
|
|
127
|
+
/*!
|
|
128
|
+
<b>Notes:</b>
|
|
129
|
+
- the caller is responsible for <tt>delete</tt>ing the result
|
|
130
|
+
*/
|
|
131
|
+
virtual Query<MatchFuncArgType, DataFuncArgType, needsConversion> *copy()
|
|
132
|
+
const {
|
|
133
|
+
Query<MatchFuncArgType, DataFuncArgType, needsConversion> *res =
|
|
134
|
+
new Query<MatchFuncArgType, DataFuncArgType, needsConversion>();
|
|
135
|
+
for (auto iter = this->beginChildren(); iter != this->endChildren();
|
|
136
|
+
++iter) {
|
|
137
|
+
res->addChild(CHILD_TYPE(iter->get()->copy()));
|
|
138
|
+
}
|
|
139
|
+
res->d_val = this->d_val;
|
|
140
|
+
res->d_tol = this->d_tol;
|
|
141
|
+
res->df_negate = this->df_negate;
|
|
142
|
+
res->d_matchFunc = this->d_matchFunc;
|
|
143
|
+
res->d_dataFunc = this->d_dataFunc;
|
|
144
|
+
res->d_description = this->d_description;
|
|
145
|
+
res->d_queryType = this->d_queryType;
|
|
146
|
+
return res;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
protected:
|
|
150
|
+
MatchFuncArgType d_val = 0;
|
|
151
|
+
MatchFuncArgType d_tol = 0;
|
|
152
|
+
std::string d_description = "";
|
|
153
|
+
std::string d_queryType = "";
|
|
154
|
+
CHILD_VECT d_children;
|
|
155
|
+
bool df_negate{false};
|
|
156
|
+
bool (*d_matchFunc)(MatchFuncArgType);
|
|
157
|
+
|
|
158
|
+
// MSVC complains at compile time when TypeConvert(MatchFuncArgType what,
|
|
159
|
+
// Int2Type<false>) attempts to pass what (which is of type MatchFuncArgType)
|
|
160
|
+
// as parameter of d_dataFunc() (which should be of type DataFuncArgType). The
|
|
161
|
+
// union is but a trick to avoid silly casts and keep MSVC happy when building
|
|
162
|
+
// DLLs
|
|
163
|
+
union {
|
|
164
|
+
MatchFuncArgType (*d_dataFunc)(DataFuncArgType);
|
|
165
|
+
MatchFuncArgType (*d_dataFuncSameType)(MatchFuncArgType);
|
|
166
|
+
};
|
|
167
|
+
//! \brief calls our \c dataFunc (if it's set) on \c what and returns
|
|
168
|
+
//! the result, otherwise returns \c what
|
|
169
|
+
MatchFuncArgType TypeConvert(MatchFuncArgType what,
|
|
170
|
+
Int2Type<false> /*d*/) const {
|
|
171
|
+
MatchFuncArgType mfArg;
|
|
172
|
+
if (this->d_dataFuncSameType != nullptr &&
|
|
173
|
+
std::is_same<MatchFuncArgType, DataFuncArgType>::value) {
|
|
174
|
+
mfArg = this->d_dataFuncSameType(what);
|
|
175
|
+
} else {
|
|
176
|
+
mfArg = what;
|
|
177
|
+
}
|
|
178
|
+
return mfArg;
|
|
179
|
+
}
|
|
180
|
+
//! calls our \c dataFunc (which must be set) on \c what and returns the
|
|
181
|
+
/// result
|
|
182
|
+
MatchFuncArgType TypeConvert(DataFuncArgType what,
|
|
183
|
+
Int2Type<true> /*d*/) const {
|
|
184
|
+
PRECONDITION(this->d_dataFunc, "no data function");
|
|
185
|
+
MatchFuncArgType mfArg;
|
|
186
|
+
mfArg = this->d_dataFunc(what);
|
|
187
|
+
return mfArg;
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
//----------------------------
|
|
192
|
+
//
|
|
193
|
+
// Used within query functions to compare values
|
|
194
|
+
//
|
|
195
|
+
//----------------------------
|
|
196
|
+
template <class T1, class T2>
|
|
197
|
+
int queryCmp(const T1 v1, const T2 v2, const T1 tol) {
|
|
198
|
+
T1 diff = v1 - v2;
|
|
199
|
+
if (diff <= tol) {
|
|
200
|
+
if (diff >= -tol) {
|
|
201
|
+
return 0;
|
|
202
|
+
} else {
|
|
203
|
+
return -1;
|
|
204
|
+
}
|
|
205
|
+
} else {
|
|
206
|
+
return 1;
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
} // namespace Queries
|
|
210
|
+
#endif
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (c) 2003-2006 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
|
+
/*!
|
|
11
|
+
\file QueryObjects.h
|
|
12
|
+
|
|
13
|
+
\brief Pulls in all the query types.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
#include <RDGeneral/export.h>
|
|
17
|
+
#ifndef __RD_QUERYOBJECTS_H__
|
|
18
|
+
#define __RD_QUERYOBJECTS_H__
|
|
19
|
+
|
|
20
|
+
#include "Query.h"
|
|
21
|
+
|
|
22
|
+
#include "EqualityQuery.h"
|
|
23
|
+
#include "LessQuery.h"
|
|
24
|
+
#include "LessEqualQuery.h"
|
|
25
|
+
#include "GreaterQuery.h"
|
|
26
|
+
#include "GreaterEqualQuery.h"
|
|
27
|
+
|
|
28
|
+
#include "RangeQuery.h"
|
|
29
|
+
#include "SetQuery.h"
|
|
30
|
+
|
|
31
|
+
#include "AndQuery.h"
|
|
32
|
+
#include "OrQuery.h"
|
|
33
|
+
#include "XOrQuery.h"
|
|
34
|
+
|
|
35
|
+
namespace Queries {
|
|
36
|
+
typedef enum { COMPOSITE_AND, COMPOSITE_OR, COMPOSITE_XOR } CompositeQueryType;
|
|
37
|
+
}
|
|
38
|
+
#endif
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (c) 2003-2020 Greg Landrum and Rational Discovery LLC
|
|
3
|
+
//
|
|
4
|
+
// @@ All Rights Reserved @@
|
|
5
|
+
// This file is part of the RDKit.
|
|
6
|
+
// The contents are covered by the terms of the BSD license
|
|
7
|
+
// which is included in the file license.txt, found at the root
|
|
8
|
+
// of the RDKit source tree.
|
|
9
|
+
//
|
|
10
|
+
#include <RDGeneral/export.h>
|
|
11
|
+
#ifndef RD_RANGEQUERY_H
|
|
12
|
+
#define RD_RANGEQUERY_H
|
|
13
|
+
#include "Query.h"
|
|
14
|
+
#include <utility>
|
|
15
|
+
|
|
16
|
+
namespace Queries {
|
|
17
|
+
|
|
18
|
+
//! \brief a Query implementing a range: arguments must
|
|
19
|
+
//! fall in a particular range of values.
|
|
20
|
+
//!
|
|
21
|
+
//! The ends of the range default to be open, but they can
|
|
22
|
+
//! individually set to be closed.
|
|
23
|
+
//!
|
|
24
|
+
//! There is also an optional tolerance to be used in comparisons
|
|
25
|
+
template <class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType,
|
|
26
|
+
bool needsConversion = false>
|
|
27
|
+
class RDKIT_QUERY_EXPORT RangeQuery
|
|
28
|
+
: public Query<MatchFuncArgType, DataFuncArgType, needsConversion> {
|
|
29
|
+
public:
|
|
30
|
+
RangeQuery() : d_upper(0), d_lower(0) { this->df_negate = false; }
|
|
31
|
+
//! construct and set the lower and upper bounds
|
|
32
|
+
RangeQuery(MatchFuncArgType lower, MatchFuncArgType upper)
|
|
33
|
+
: d_upper(upper), d_lower(lower), df_upperOpen(true), df_lowerOpen(true) {
|
|
34
|
+
this->df_negate = false;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//! sets our upper bound
|
|
38
|
+
void setUpper(MatchFuncArgType what) { this->d_upper = what; }
|
|
39
|
+
//! returns our upper bound
|
|
40
|
+
const MatchFuncArgType getUpper() const { return this->d_upper; }
|
|
41
|
+
//! sets our lower bound
|
|
42
|
+
void setLower(MatchFuncArgType what) { this->d_lower = what; }
|
|
43
|
+
//! returns our lower bound
|
|
44
|
+
const MatchFuncArgType getLower() const { return this->d_lower; }
|
|
45
|
+
|
|
46
|
+
//! sets whether or not the ends of the range are open
|
|
47
|
+
void setEndsOpen(bool lower, bool upper) {
|
|
48
|
+
this->df_lowerOpen = lower;
|
|
49
|
+
this->df_upperOpen = upper;
|
|
50
|
+
}
|
|
51
|
+
//! returns the state of our ends (open or not)
|
|
52
|
+
std::pair<bool, bool> getEndsOpen() const {
|
|
53
|
+
return std::make_pair(this->df_lowerOpen, this->df_upperOpen);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
//! sets our tolerance
|
|
57
|
+
void setTol(MatchFuncArgType what) { this->d_tol = what; }
|
|
58
|
+
//! returns our tolerance
|
|
59
|
+
const MatchFuncArgType getTol() const { return this->d_tol; }
|
|
60
|
+
|
|
61
|
+
bool Match(const DataFuncArgType what) const override {
|
|
62
|
+
MatchFuncArgType mfArg =
|
|
63
|
+
this->TypeConvert(what, Int2Type<needsConversion>());
|
|
64
|
+
int lCmp = queryCmp(this->d_lower, mfArg, this->d_tol);
|
|
65
|
+
int uCmp = queryCmp(this->d_upper, mfArg, this->d_tol);
|
|
66
|
+
bool lowerRes, upperRes;
|
|
67
|
+
if (this->df_lowerOpen) {
|
|
68
|
+
lowerRes = lCmp < 0;
|
|
69
|
+
} else {
|
|
70
|
+
lowerRes = lCmp <= 0;
|
|
71
|
+
}
|
|
72
|
+
if (this->df_upperOpen) {
|
|
73
|
+
upperRes = uCmp > 0;
|
|
74
|
+
} else {
|
|
75
|
+
upperRes = uCmp >= 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
bool tempR = !(lowerRes && upperRes);
|
|
79
|
+
if (this->getNegation()) {
|
|
80
|
+
return tempR;
|
|
81
|
+
} else {
|
|
82
|
+
return !tempR;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
Query<MatchFuncArgType, DataFuncArgType, needsConversion> *copy()
|
|
87
|
+
const override {
|
|
88
|
+
RangeQuery<MatchFuncArgType, DataFuncArgType, needsConversion> *res =
|
|
89
|
+
new RangeQuery<MatchFuncArgType, DataFuncArgType, needsConversion>();
|
|
90
|
+
res->setUpper(this->d_upper);
|
|
91
|
+
res->setLower(this->d_lower);
|
|
92
|
+
res->setTol(this->d_tol);
|
|
93
|
+
res->setNegation(this->getNegation());
|
|
94
|
+
res->setEndsOpen(this->df_lowerOpen, this->df_upperOpen);
|
|
95
|
+
res->setDataFunc(this->d_dataFunc);
|
|
96
|
+
res->d_description = this->d_description;
|
|
97
|
+
res->d_queryType = this->d_queryType;
|
|
98
|
+
return res;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
std::string getFullDescription() const override {
|
|
102
|
+
std::ostringstream res;
|
|
103
|
+
res << this->getDescription();
|
|
104
|
+
if (this->getNegation()) {
|
|
105
|
+
res << " ! ";
|
|
106
|
+
}
|
|
107
|
+
res << " " << this->d_lower << " val " << this->d_upper;
|
|
108
|
+
return res.str();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
protected:
|
|
112
|
+
MatchFuncArgType d_upper, d_lower;
|
|
113
|
+
bool df_upperOpen{true}, df_lowerOpen{true};
|
|
114
|
+
};
|
|
115
|
+
} // namespace Queries
|
|
116
|
+
#endif
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (c) 2003-2020 Greg Landrum and Rational Discovery LLC
|
|
3
|
+
//
|
|
4
|
+
// @@ All Rights Reserved @@
|
|
5
|
+
// This file is part of the RDKit.
|
|
6
|
+
// The contents are covered by the terms of the BSD license
|
|
7
|
+
// which is included in the file license.txt, found at the root
|
|
8
|
+
// of the RDKit source tree.
|
|
9
|
+
//
|
|
10
|
+
#include <RDGeneral/export.h>
|
|
11
|
+
#ifndef RD_SETQUERY_H
|
|
12
|
+
#define RD_SETQUERY_H
|
|
13
|
+
#include <set>
|
|
14
|
+
#include "Query.h"
|
|
15
|
+
#include <sstream>
|
|
16
|
+
#include <algorithm>
|
|
17
|
+
#include <iterator>
|
|
18
|
+
|
|
19
|
+
namespace Queries {
|
|
20
|
+
//! \brief a Query implementing a set: arguments must
|
|
21
|
+
//! one of a set of values
|
|
22
|
+
//!
|
|
23
|
+
template <class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType,
|
|
24
|
+
bool needsConversion = false>
|
|
25
|
+
class RDKIT_QUERY_EXPORT SetQuery
|
|
26
|
+
: public Query<MatchFuncArgType, DataFuncArgType, needsConversion> {
|
|
27
|
+
public:
|
|
28
|
+
typedef std::set<MatchFuncArgType> CONTAINER_TYPE;
|
|
29
|
+
|
|
30
|
+
SetQuery() : Query<MatchFuncArgType, DataFuncArgType, needsConversion>() {}
|
|
31
|
+
|
|
32
|
+
//! insert an entry into our \c set
|
|
33
|
+
void insert(const MatchFuncArgType what) {
|
|
34
|
+
if (d_set.find(what) == this->d_set.end()) {
|
|
35
|
+
this->d_set.insert(what);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//! clears our \c set
|
|
40
|
+
void clear() { this->d_set.clear(); }
|
|
41
|
+
|
|
42
|
+
bool Match(const DataFuncArgType what) const override {
|
|
43
|
+
MatchFuncArgType mfArg =
|
|
44
|
+
this->TypeConvert(what, Int2Type<needsConversion>());
|
|
45
|
+
return (this->d_set.find(mfArg) != this->d_set.end()) ^ this->getNegation();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
Query<MatchFuncArgType, DataFuncArgType, needsConversion> *copy()
|
|
49
|
+
const override {
|
|
50
|
+
SetQuery<MatchFuncArgType, DataFuncArgType, needsConversion> *res =
|
|
51
|
+
new SetQuery<MatchFuncArgType, DataFuncArgType, needsConversion>();
|
|
52
|
+
res->setDataFunc(this->d_dataFunc);
|
|
53
|
+
typename std::set<MatchFuncArgType>::const_iterator i;
|
|
54
|
+
for (i = this->d_set.begin(); i != this->d_set.end(); ++i) {
|
|
55
|
+
res->insert(*i);
|
|
56
|
+
}
|
|
57
|
+
res->setNegation(this->getNegation());
|
|
58
|
+
res->d_description = this->d_description;
|
|
59
|
+
res->d_queryType = this->d_queryType;
|
|
60
|
+
return res;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
typename CONTAINER_TYPE::const_iterator beginSet() const {
|
|
64
|
+
return d_set.begin();
|
|
65
|
+
}
|
|
66
|
+
typename CONTAINER_TYPE::const_iterator endSet() const { return d_set.end(); }
|
|
67
|
+
unsigned int size() const { return rdcast<unsigned int>(d_set.size()); }
|
|
68
|
+
|
|
69
|
+
std::string getFullDescription() const override {
|
|
70
|
+
std::ostringstream res;
|
|
71
|
+
res << this->getDescription() << " val";
|
|
72
|
+
if (this->getNegation()) {
|
|
73
|
+
res << " not in ";
|
|
74
|
+
} else {
|
|
75
|
+
res << " in (";
|
|
76
|
+
}
|
|
77
|
+
std::copy(d_set.begin(), d_set.end(),
|
|
78
|
+
std::ostream_iterator<MatchFuncArgType>(res, ", "));
|
|
79
|
+
res << ")";
|
|
80
|
+
return res.str();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
protected:
|
|
84
|
+
CONTAINER_TYPE d_set;
|
|
85
|
+
};
|
|
86
|
+
} // namespace Queries
|
|
87
|
+
#endif
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (c) 2003-2020 Greg Landrum and Rational Discovery LLC
|
|
3
|
+
//
|
|
4
|
+
// @@ All Rights Reserved @@
|
|
5
|
+
// This file is part of the RDKit.
|
|
6
|
+
// The contents are covered by the terms of the BSD license
|
|
7
|
+
// which is included in the file license.txt, found at the root
|
|
8
|
+
// of the RDKit source tree.
|
|
9
|
+
//
|
|
10
|
+
#include <RDGeneral/export.h>
|
|
11
|
+
#ifndef RD_XORQUERY_H
|
|
12
|
+
#define RD_XORQUERY_H
|
|
13
|
+
|
|
14
|
+
#include "Query.h"
|
|
15
|
+
|
|
16
|
+
namespace Queries {
|
|
17
|
+
|
|
18
|
+
//! a Query implementing XOR: requires exactly one child to be \c true
|
|
19
|
+
template <class MatchFuncArgType, class DataFuncArgType = MatchFuncArgType,
|
|
20
|
+
bool needsConversion = false>
|
|
21
|
+
class RDKIT_QUERY_EXPORT XOrQuery
|
|
22
|
+
: public Query<MatchFuncArgType, DataFuncArgType, needsConversion> {
|
|
23
|
+
public:
|
|
24
|
+
typedef Query<MatchFuncArgType, DataFuncArgType, needsConversion> BASE;
|
|
25
|
+
XOrQuery() { this->df_negate = false; }
|
|
26
|
+
|
|
27
|
+
bool Match(const DataFuncArgType what) const override {
|
|
28
|
+
bool res = false;
|
|
29
|
+
typename BASE::CHILD_VECT_CI it1;
|
|
30
|
+
for (it1 = this->beginChildren(); it1 != this->endChildren(); ++it1) {
|
|
31
|
+
bool tmp = (*it1)->Match(what);
|
|
32
|
+
if (tmp) {
|
|
33
|
+
if (res) {
|
|
34
|
+
res = false;
|
|
35
|
+
break;
|
|
36
|
+
} else {
|
|
37
|
+
res = true;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (this->getNegation()) {
|
|
42
|
+
res = !res;
|
|
43
|
+
}
|
|
44
|
+
return res;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
Query<MatchFuncArgType, DataFuncArgType, needsConversion> *copy()
|
|
48
|
+
const override {
|
|
49
|
+
XOrQuery<MatchFuncArgType, DataFuncArgType, needsConversion> *res =
|
|
50
|
+
new XOrQuery<MatchFuncArgType, DataFuncArgType, needsConversion>();
|
|
51
|
+
|
|
52
|
+
typename BASE::CHILD_VECT_CI i;
|
|
53
|
+
for (i = this->beginChildren(); i != this->endChildren(); ++i) {
|
|
54
|
+
res->addChild(typename BASE::CHILD_TYPE(i->get()->copy()));
|
|
55
|
+
}
|
|
56
|
+
res->setNegation(this->getNegation());
|
|
57
|
+
res->d_description = this->d_description;
|
|
58
|
+
res->d_queryType = this->d_queryType;
|
|
59
|
+
return res;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
} // namespace Queries
|
|
63
|
+
#endif
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2003-2006 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_BADFILEEXCEPTION_H
|
|
12
|
+
#define _RD_BADFILEEXCEPTION_H
|
|
13
|
+
|
|
14
|
+
#include <string>
|
|
15
|
+
#include <utility>
|
|
16
|
+
#include <vector>
|
|
17
|
+
#include <stdexcept>
|
|
18
|
+
|
|
19
|
+
namespace RDKit {
|
|
20
|
+
|
|
21
|
+
//! used by various file parsing classes to indicate a bad file
|
|
22
|
+
class RDKIT_RDGENERAL_EXPORT BadFileException : public std::runtime_error {
|
|
23
|
+
public:
|
|
24
|
+
//! construct with an error message
|
|
25
|
+
explicit BadFileException(const char *msg)
|
|
26
|
+
: std::runtime_error("BadFileException"), _msg(msg) {}
|
|
27
|
+
//! construct with an error message
|
|
28
|
+
explicit BadFileException(std::string msg)
|
|
29
|
+
: std::runtime_error("BadFileException"), _msg(std::move(msg)) {}
|
|
30
|
+
//! get the error message
|
|
31
|
+
const char *what() const noexcept override { return _msg.c_str(); }
|
|
32
|
+
~BadFileException() noexcept override = default;
|
|
33
|
+
|
|
34
|
+
private:
|
|
35
|
+
std::string _msg;
|
|
36
|
+
};
|
|
37
|
+
} // namespace RDKit
|
|
38
|
+
|
|
39
|
+
#endif
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
// -- silences warnings when compiling with boost
|
|
32
|
+
// #include <RDGeneral/BoostStartInclude.h>
|
|
33
|
+
// # include boost stuff
|
|
34
|
+
// #include <RDGeneral/BoostEndInclude.h>
|
|
35
|
+
#include <RDGeneral/export.h>
|
|
36
|
+
#if defined(__clang__)
|
|
37
|
+
/* Clang/LLVM. ---------------------------------------------- */
|
|
38
|
+
#pragma GCC diagnostic pop
|
|
39
|
+
|
|
40
|
+
#elif defined(__ICC) || defined(__INTEL_COMPILER)
|
|
41
|
+
/* Intel ICC/ICPC. ------------------------------------------ */
|
|
42
|
+
|
|
43
|
+
#elif (defined(__GNUC__) || defined(__GNUG__)) && \
|
|
44
|
+
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5))
|
|
45
|
+
/* GNU GCC/G++. these pragmas only work with >v4.1
|
|
46
|
+
* --------------------------------------------- */
|
|
47
|
+
#pragma GCC diagnostic pop
|
|
48
|
+
|
|
49
|
+
#elif defined(__HP_cc) || defined(__HP_aCC)
|
|
50
|
+
/* Hewlett-Packard C/aC++. ---------------------------------- */
|
|
51
|
+
|
|
52
|
+
#elif defined(__IBMC__) || defined(__IBMCPP__)
|
|
53
|
+
/* IBM XL C/C++. -------------------------------------------- */
|
|
54
|
+
|
|
55
|
+
#elif defined(_MSC_VER)
|
|
56
|
+
/* Microsoft Visual Studio. --------------------------------- */
|
|
57
|
+
#pragma warning(pop)
|
|
58
|
+
#elif defined(__PGI)
|
|
59
|
+
/* Portland Group PGCC/PGCPP. ------------------------------- */
|
|
60
|
+
|
|
61
|
+
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
|
62
|
+
/* Oracle Solaris Studio. ----------------------------------- */
|
|
63
|
+
|
|
64
|
+
#endif
|
|
65
|
+
|
|
66
|
+
#ifdef RDK_ALLOW_BOOST_DEPRECATED_HEADERS
|
|
67
|
+
#undef RDK_ALLOW_BOOST_DEPRECATED_HEADERS
|
|
68
|
+
#undef BOOST_ALLOW_DEPRECATED_HEADERS
|
|
69
|
+
#endif
|