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,518 @@
|
|
|
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
|
+
#include <RDGeneral/export.h>
|
|
32
|
+
#ifndef RDKIT_RDVALUE_TAGGED_UNION_H
|
|
33
|
+
#define RDKIT_RDVALUE_TAGGED_UNION_H
|
|
34
|
+
|
|
35
|
+
#include <cassert>
|
|
36
|
+
#include "Invariant.h"
|
|
37
|
+
#include <iostream>
|
|
38
|
+
#include <iomanip>
|
|
39
|
+
#include <sstream>
|
|
40
|
+
#include <vector>
|
|
41
|
+
#include <cstdint>
|
|
42
|
+
#include <RDGeneral/BoostStartInclude.h>
|
|
43
|
+
#include <cstdint>
|
|
44
|
+
#include <boost/any.hpp>
|
|
45
|
+
#include <boost/utility.hpp>
|
|
46
|
+
#include <boost/lexical_cast.hpp>
|
|
47
|
+
#include <boost/type_traits/is_floating_point.hpp>
|
|
48
|
+
#include <RDGeneral/BoostEndInclude.h>
|
|
49
|
+
#include "LocaleSwitcher.h"
|
|
50
|
+
|
|
51
|
+
#define RDVALUE_HASBOOL
|
|
52
|
+
|
|
53
|
+
namespace RDKit {
|
|
54
|
+
|
|
55
|
+
// RDValue does not dynamically create POD types (kind of like
|
|
56
|
+
// cdiggins::any) However, it doesn't use RTTI type info
|
|
57
|
+
// directly, it uses a companion short valued type
|
|
58
|
+
// to determine what to do.
|
|
59
|
+
// For unregistered types, it falls back to boost::any.
|
|
60
|
+
// The Size of an RDAny is (sizeof(double) + sizeof(short) == 10 bytes
|
|
61
|
+
// (aligned to actually 16 so hard to pass as value type)
|
|
62
|
+
//
|
|
63
|
+
// For the sake of compatibility, errors throw boost::bad_any_cast
|
|
64
|
+
//
|
|
65
|
+
// Examples:
|
|
66
|
+
//
|
|
67
|
+
// RDAny v(2.);
|
|
68
|
+
// v = 1;
|
|
69
|
+
// std::vector<double> d;
|
|
70
|
+
// v == d;
|
|
71
|
+
// v.asDoubleVect().push_back(4.)
|
|
72
|
+
// rdany_cast<std::vector<double>(v).push_back(4.)
|
|
73
|
+
//
|
|
74
|
+
// Falls back to boost::any for non registered types
|
|
75
|
+
// v = boost::shared_ptr<ROMol>(new ROMol(m));
|
|
76
|
+
//
|
|
77
|
+
|
|
78
|
+
// RDValue does not manange memory of non-pod data
|
|
79
|
+
// this must be done externally (string, Any, vector...)
|
|
80
|
+
// Tagged union
|
|
81
|
+
|
|
82
|
+
namespace RDTypeTag {
|
|
83
|
+
const short EmptyTag = 0;
|
|
84
|
+
const short IntTag = 1;
|
|
85
|
+
const short DoubleTag = 2;
|
|
86
|
+
const short StringTag = 3;
|
|
87
|
+
const short FloatTag = 4;
|
|
88
|
+
const short BoolTag = 5;
|
|
89
|
+
const short UnsignedIntTag = 6;
|
|
90
|
+
const short AnyTag = 7;
|
|
91
|
+
const short VecDoubleTag = 8;
|
|
92
|
+
const short VecFloatTag = 9;
|
|
93
|
+
const short VecIntTag = 10;
|
|
94
|
+
const short VecUnsignedIntTag = 11;
|
|
95
|
+
const short VecStringTag = 12;
|
|
96
|
+
template <class T>
|
|
97
|
+
inline short GetTag() {
|
|
98
|
+
return AnyTag;
|
|
99
|
+
}
|
|
100
|
+
template <>
|
|
101
|
+
inline short GetTag<double>() {
|
|
102
|
+
return DoubleTag;
|
|
103
|
+
}
|
|
104
|
+
template <>
|
|
105
|
+
inline short GetTag<float>() {
|
|
106
|
+
return FloatTag;
|
|
107
|
+
}
|
|
108
|
+
template <>
|
|
109
|
+
inline short GetTag<int>() {
|
|
110
|
+
return IntTag;
|
|
111
|
+
}
|
|
112
|
+
template <>
|
|
113
|
+
inline short GetTag<unsigned int>() {
|
|
114
|
+
return UnsignedIntTag;
|
|
115
|
+
}
|
|
116
|
+
template <>
|
|
117
|
+
inline short GetTag<bool>() {
|
|
118
|
+
return BoolTag;
|
|
119
|
+
}
|
|
120
|
+
template <>
|
|
121
|
+
inline short GetTag<std::string>() {
|
|
122
|
+
return StringTag;
|
|
123
|
+
}
|
|
124
|
+
template <>
|
|
125
|
+
inline short GetTag<std::vector<double>>() {
|
|
126
|
+
return VecDoubleTag;
|
|
127
|
+
}
|
|
128
|
+
template <>
|
|
129
|
+
inline short GetTag<std::vector<float>>() {
|
|
130
|
+
return VecFloatTag;
|
|
131
|
+
}
|
|
132
|
+
template <>
|
|
133
|
+
inline short GetTag<std::vector<int>>() {
|
|
134
|
+
return VecIntTag;
|
|
135
|
+
}
|
|
136
|
+
template <>
|
|
137
|
+
inline short GetTag<std::vector<unsigned int>>() {
|
|
138
|
+
return VecUnsignedIntTag;
|
|
139
|
+
}
|
|
140
|
+
template <>
|
|
141
|
+
inline short GetTag<std::vector<std::string>>() {
|
|
142
|
+
return VecStringTag;
|
|
143
|
+
}
|
|
144
|
+
template <>
|
|
145
|
+
inline short GetTag<boost::any>() {
|
|
146
|
+
return AnyTag;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
namespace detail {
|
|
150
|
+
union Value {
|
|
151
|
+
double d;
|
|
152
|
+
float f;
|
|
153
|
+
int i;
|
|
154
|
+
unsigned u;
|
|
155
|
+
bool b;
|
|
156
|
+
std::string *s;
|
|
157
|
+
boost::any *a;
|
|
158
|
+
std::vector<double> *vd;
|
|
159
|
+
std::vector<float> *vf;
|
|
160
|
+
std::vector<int> *vi;
|
|
161
|
+
std::vector<unsigned int> *vu;
|
|
162
|
+
std::vector<std::string> *vs;
|
|
163
|
+
|
|
164
|
+
inline Value() {}
|
|
165
|
+
inline Value(double v) : d(v) {}
|
|
166
|
+
inline Value(float v) : f(v) {}
|
|
167
|
+
inline Value(int v) : i(v) {}
|
|
168
|
+
inline Value(unsigned int v) : u(v) {}
|
|
169
|
+
inline Value(bool v) : b(v) {}
|
|
170
|
+
inline Value(std::string *v) : s(v) {}
|
|
171
|
+
inline Value(boost::any *v) : a(v) {}
|
|
172
|
+
inline Value(std::vector<double> *v) : vd(v) {}
|
|
173
|
+
inline Value(std::vector<float> *v) : vf(v) {}
|
|
174
|
+
inline Value(std::vector<int> *v) : vi(v) {}
|
|
175
|
+
inline Value(std::vector<unsigned int> *v) : vu(v) {}
|
|
176
|
+
inline Value(std::vector<std::string> *v) : vs(v) {}
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
template <class T>
|
|
180
|
+
inline T *valuePtrCast(Value value) {
|
|
181
|
+
return boost::any_cast<T *>(*value.a);
|
|
182
|
+
}
|
|
183
|
+
template <>
|
|
184
|
+
inline boost::any *valuePtrCast<boost::any>(Value value) {
|
|
185
|
+
return value.a;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
template <>
|
|
189
|
+
inline std::string *valuePtrCast<std::string>(Value value) {
|
|
190
|
+
return value.s;
|
|
191
|
+
}
|
|
192
|
+
template <>
|
|
193
|
+
inline std::vector<double> *valuePtrCast<std::vector<double>>(Value value) {
|
|
194
|
+
return value.vd;
|
|
195
|
+
}
|
|
196
|
+
template <>
|
|
197
|
+
inline std::vector<float> *valuePtrCast<std::vector<float>>(Value value) {
|
|
198
|
+
return value.vf;
|
|
199
|
+
}
|
|
200
|
+
template <>
|
|
201
|
+
inline std::vector<int> *valuePtrCast<std::vector<int>>(Value value) {
|
|
202
|
+
return value.vi;
|
|
203
|
+
}
|
|
204
|
+
template <>
|
|
205
|
+
inline std::vector<unsigned int> *valuePtrCast<std::vector<unsigned int>>(
|
|
206
|
+
Value value) {
|
|
207
|
+
return value.vu;
|
|
208
|
+
}
|
|
209
|
+
template <>
|
|
210
|
+
inline std::vector<std::string> *valuePtrCast<std::vector<std::string>>(
|
|
211
|
+
Value value) {
|
|
212
|
+
return value.vs;
|
|
213
|
+
}
|
|
214
|
+
} // namespace detail
|
|
215
|
+
} // namespace RDTypeTag
|
|
216
|
+
|
|
217
|
+
struct RDValue {
|
|
218
|
+
RDTypeTag::detail::Value value;
|
|
219
|
+
short type;
|
|
220
|
+
short reserved_tag = 0; // 16 bit alignment
|
|
221
|
+
|
|
222
|
+
inline RDValue() : value(0.0), type(RDTypeTag::EmptyTag) {}
|
|
223
|
+
// Pod Style (Direct storage)
|
|
224
|
+
inline RDValue(double v) : value(v), type(RDTypeTag::DoubleTag) {}
|
|
225
|
+
inline RDValue(float v) : value(v), type(RDTypeTag::FloatTag) {}
|
|
226
|
+
inline RDValue(int v) : value(v), type(RDTypeTag::IntTag) {}
|
|
227
|
+
inline RDValue(unsigned v) : value(v), type(RDTypeTag::UnsignedIntTag) {}
|
|
228
|
+
inline RDValue(bool v) : value(v), type(RDTypeTag::BoolTag) {}
|
|
229
|
+
|
|
230
|
+
inline RDValue(boost::any *v) : value(v), type(RDTypeTag::AnyTag) {}
|
|
231
|
+
|
|
232
|
+
// Copies passed in pointers
|
|
233
|
+
inline RDValue(const boost::any &v)
|
|
234
|
+
: value(new boost::any(v)), type(RDTypeTag::AnyTag) {}
|
|
235
|
+
inline RDValue(const std::string &v)
|
|
236
|
+
: value(new std::string(v)), type(RDTypeTag::StringTag) {}
|
|
237
|
+
template <class T>
|
|
238
|
+
inline RDValue(const T &v)
|
|
239
|
+
: value(new boost::any(v)), type(RDTypeTag::AnyTag) {}
|
|
240
|
+
|
|
241
|
+
inline RDValue(const std::vector<double> &v)
|
|
242
|
+
: value(new std::vector<double>(v)), type(RDTypeTag::VecDoubleTag) {}
|
|
243
|
+
inline RDValue(const std::vector<float> &v)
|
|
244
|
+
: value(new std::vector<float>(v)), type(RDTypeTag::VecFloatTag) {}
|
|
245
|
+
inline RDValue(const std::vector<int> &v)
|
|
246
|
+
: value(new std::vector<int>(v)), type(RDTypeTag::VecIntTag) {}
|
|
247
|
+
inline RDValue(const std::vector<unsigned int> &v)
|
|
248
|
+
: value(new std::vector<unsigned int>(v)),
|
|
249
|
+
type(RDTypeTag::VecUnsignedIntTag) {}
|
|
250
|
+
inline RDValue(const std::vector<std::string> &v)
|
|
251
|
+
: value(new std::vector<std::string>(v)), type(RDTypeTag::VecStringTag) {}
|
|
252
|
+
|
|
253
|
+
short getTag() const { return type; }
|
|
254
|
+
|
|
255
|
+
// ptrCast - unsafe, use rdvalue_cast instead.
|
|
256
|
+
template <class T>
|
|
257
|
+
inline T *ptrCast() const {
|
|
258
|
+
return RDTypeTag::detail::valuePtrCast<T>(value);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// RDValue doesn't have an explicit destructor, it must
|
|
262
|
+
// be wrapped in a container.
|
|
263
|
+
// The idea is that POD types don't need to be destroyed
|
|
264
|
+
// and this allows the container optimization possibilities.
|
|
265
|
+
void destroy() {
|
|
266
|
+
switch (type) {
|
|
267
|
+
case RDTypeTag::StringTag:
|
|
268
|
+
delete value.s;
|
|
269
|
+
break;
|
|
270
|
+
case RDTypeTag::AnyTag:
|
|
271
|
+
delete value.a;
|
|
272
|
+
break;
|
|
273
|
+
case RDTypeTag::VecDoubleTag:
|
|
274
|
+
delete value.vd;
|
|
275
|
+
break;
|
|
276
|
+
case RDTypeTag::VecFloatTag:
|
|
277
|
+
delete value.vf;
|
|
278
|
+
break;
|
|
279
|
+
case RDTypeTag::VecIntTag:
|
|
280
|
+
delete value.vi;
|
|
281
|
+
break;
|
|
282
|
+
case RDTypeTag::VecUnsignedIntTag:
|
|
283
|
+
delete value.vu;
|
|
284
|
+
break;
|
|
285
|
+
case RDTypeTag::VecStringTag:
|
|
286
|
+
delete value.vs;
|
|
287
|
+
break;
|
|
288
|
+
default:
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
type = RDTypeTag::EmptyTag;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
static // Given a type and an RDAnyValue - delete the appropriate structure
|
|
295
|
+
inline void
|
|
296
|
+
cleanup_rdvalue(RDValue &rdvalue) {
|
|
297
|
+
rdvalue.destroy();
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
/////////////////////////////////////////////////////////////////////////////////////
|
|
302
|
+
// Given two RDValue::Values - copy the appropriate structure
|
|
303
|
+
// RDValue doesn't have a copy constructor, the default
|
|
304
|
+
// copy act's like a move for better value semantics.
|
|
305
|
+
// Containers may need to copy though.
|
|
306
|
+
inline void copy_rdvalue(RDValue &dest, const RDValue &src) {
|
|
307
|
+
if (&dest == &src) { // don't copy over yourself
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
dest.destroy();
|
|
311
|
+
dest.type = src.type;
|
|
312
|
+
switch (src.type) {
|
|
313
|
+
case RDTypeTag::StringTag:
|
|
314
|
+
dest.value.s = new std::string(*src.value.s);
|
|
315
|
+
break;
|
|
316
|
+
case RDTypeTag::AnyTag:
|
|
317
|
+
dest.value.a = new boost::any(*src.value.a);
|
|
318
|
+
break;
|
|
319
|
+
case RDTypeTag::VecDoubleTag:
|
|
320
|
+
dest.value.vd = new std::vector<double>(*src.value.vd);
|
|
321
|
+
break;
|
|
322
|
+
case RDTypeTag::VecFloatTag:
|
|
323
|
+
dest.value.vf = new std::vector<float>(*src.value.vf);
|
|
324
|
+
break;
|
|
325
|
+
case RDTypeTag::VecIntTag:
|
|
326
|
+
dest.value.vi = new std::vector<int>(*src.value.vi);
|
|
327
|
+
break;
|
|
328
|
+
case RDTypeTag::VecUnsignedIntTag:
|
|
329
|
+
dest.value.vu = new std::vector<unsigned int>(*src.value.vu);
|
|
330
|
+
break;
|
|
331
|
+
case RDTypeTag::VecStringTag:
|
|
332
|
+
dest.value.vs = new std::vector<std::string>(*src.value.vs);
|
|
333
|
+
break;
|
|
334
|
+
default:
|
|
335
|
+
dest = src;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
#ifdef RDK_32BIT_BUILD
|
|
340
|
+
// avoid register pressure and spilling on 32 bit systems
|
|
341
|
+
typedef const RDValue &RDValue_cast_t;
|
|
342
|
+
#else
|
|
343
|
+
typedef RDValue RDValue_cast_t;
|
|
344
|
+
#endif
|
|
345
|
+
|
|
346
|
+
/////////////////////////////////////////////////////////////////////////////////////
|
|
347
|
+
// rdvalue_is<T>
|
|
348
|
+
|
|
349
|
+
template <class T>
|
|
350
|
+
inline bool rdvalue_is(RDValue_cast_t v) {
|
|
351
|
+
const short tag =
|
|
352
|
+
RDTypeTag::GetTag<typename boost::remove_reference<T>::type>();
|
|
353
|
+
if (v.getTag() == tag) {
|
|
354
|
+
return true;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// If we are an Any tag, check the any type info
|
|
358
|
+
if (v.getTag() == RDTypeTag::AnyTag) {
|
|
359
|
+
return v.value.a->type() == typeid(T);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
return false;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/////////////////////////////////////////////////////////////////////////////////////
|
|
366
|
+
// rdvalue_cast<T>
|
|
367
|
+
//
|
|
368
|
+
// POD types do not support reference semantics. Other types do.
|
|
369
|
+
// rdvalue_cast<const std::vector<double> &>(RDValue); // ok
|
|
370
|
+
// rdvalue_cast<const float &>(RDValue); // bad_any_cast
|
|
371
|
+
|
|
372
|
+
// Get stuff stored in boost any
|
|
373
|
+
template <class T>
|
|
374
|
+
inline T rdvalue_cast(RDValue_cast_t v) {
|
|
375
|
+
// Disable reference and pointer casts to POD data.
|
|
376
|
+
BOOST_STATIC_ASSERT(!(
|
|
377
|
+
(boost::is_pointer<T>::value &&
|
|
378
|
+
(boost::is_integral<typename boost::remove_pointer<T>::type>::value ||
|
|
379
|
+
boost::is_floating_point<
|
|
380
|
+
typename boost::remove_pointer<T>::type>::value)) ||
|
|
381
|
+
(boost::is_reference<T>::value &&
|
|
382
|
+
(boost::is_integral<typename boost::remove_reference<T>::type>::value ||
|
|
383
|
+
boost::is_floating_point<
|
|
384
|
+
typename boost::remove_reference<T>::type>::value))));
|
|
385
|
+
|
|
386
|
+
if (rdvalue_is<boost::any>(v)) {
|
|
387
|
+
return boost::any_cast<T>(*v.ptrCast<boost::any>());
|
|
388
|
+
}
|
|
389
|
+
throw boost::bad_any_cast();
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// POD casts
|
|
393
|
+
template <>
|
|
394
|
+
inline double rdvalue_cast<double>(RDValue_cast_t v) {
|
|
395
|
+
if (rdvalue_is<double>(v)) {
|
|
396
|
+
return v.value.d;
|
|
397
|
+
}
|
|
398
|
+
if (rdvalue_is<float>(v)) {
|
|
399
|
+
return v.value.f;
|
|
400
|
+
}
|
|
401
|
+
throw boost::bad_any_cast();
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
template <>
|
|
405
|
+
inline float rdvalue_cast<float>(RDValue_cast_t v) {
|
|
406
|
+
if (rdvalue_is<float>(v)) {
|
|
407
|
+
return v.value.f;
|
|
408
|
+
}
|
|
409
|
+
if (rdvalue_is<double>(v)) {
|
|
410
|
+
return boost::numeric_cast<float>(v.value.d);
|
|
411
|
+
}
|
|
412
|
+
throw boost::bad_any_cast();
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
template <>
|
|
416
|
+
inline int rdvalue_cast<int>(RDValue_cast_t v) {
|
|
417
|
+
if (rdvalue_is<int>(v)) {
|
|
418
|
+
return v.value.i;
|
|
419
|
+
}
|
|
420
|
+
if (rdvalue_is<unsigned int>(v)) {
|
|
421
|
+
return boost::numeric_cast<int>(v.value.u);
|
|
422
|
+
}
|
|
423
|
+
throw boost::bad_any_cast();
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
template <>
|
|
427
|
+
inline std::int8_t rdvalue_cast<std::int8_t>(RDValue_cast_t v) {
|
|
428
|
+
if (rdvalue_is<int>(v)) {
|
|
429
|
+
return boost::numeric_cast<std::int8_t>(v.value.i);
|
|
430
|
+
}
|
|
431
|
+
if (rdvalue_is<unsigned int>(v)) {
|
|
432
|
+
return boost::numeric_cast<std::int8_t>(v.value.u);
|
|
433
|
+
}
|
|
434
|
+
throw boost::bad_any_cast();
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
template <>
|
|
438
|
+
inline std::int16_t rdvalue_cast<std::int16_t>(RDValue_cast_t v) {
|
|
439
|
+
if (rdvalue_is<int>(v)) {
|
|
440
|
+
return boost::numeric_cast<std::int16_t>(v.value.i);
|
|
441
|
+
}
|
|
442
|
+
if (rdvalue_is<unsigned int>(v)) {
|
|
443
|
+
return boost::numeric_cast<std::int16_t>(v.value.u);
|
|
444
|
+
}
|
|
445
|
+
throw boost::bad_any_cast();
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
template <>
|
|
449
|
+
inline std::int64_t rdvalue_cast<std::int64_t>(RDValue_cast_t v) {
|
|
450
|
+
if (rdvalue_is<int>(v)) {
|
|
451
|
+
return static_cast<std::int64_t>(v.value.i);
|
|
452
|
+
}
|
|
453
|
+
if (rdvalue_is<unsigned int>(v)) {
|
|
454
|
+
return static_cast<std::int64_t>(v.value.u);
|
|
455
|
+
}
|
|
456
|
+
if (rdvalue_is<boost::any>(v)) {
|
|
457
|
+
return boost::any_cast<std::int64_t>(*v.ptrCast<boost::any>());
|
|
458
|
+
}
|
|
459
|
+
throw boost::bad_any_cast();
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
template <>
|
|
463
|
+
inline unsigned int rdvalue_cast<unsigned int>(RDValue_cast_t v) {
|
|
464
|
+
if (rdvalue_is<unsigned int>(v)) {
|
|
465
|
+
return v.value.u;
|
|
466
|
+
}
|
|
467
|
+
if (rdvalue_is<int>(v)) {
|
|
468
|
+
return boost::numeric_cast<unsigned int>(v.value.i);
|
|
469
|
+
}
|
|
470
|
+
throw boost::bad_any_cast();
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
template <>
|
|
474
|
+
inline std::uint8_t rdvalue_cast<std::uint8_t>(RDValue_cast_t v) {
|
|
475
|
+
if (rdvalue_is<int>(v)) {
|
|
476
|
+
return boost::numeric_cast<std::uint8_t>(v.value.i);
|
|
477
|
+
}
|
|
478
|
+
if (rdvalue_is<unsigned int>(v)) {
|
|
479
|
+
return boost::numeric_cast<std::uint8_t>(v.value.u);
|
|
480
|
+
}
|
|
481
|
+
throw boost::bad_any_cast();
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
template <>
|
|
485
|
+
inline std::uint16_t rdvalue_cast<std::uint16_t>(RDValue_cast_t v) {
|
|
486
|
+
if (rdvalue_is<int>(v)) {
|
|
487
|
+
return boost::numeric_cast<std::uint16_t>(v.value.i);
|
|
488
|
+
}
|
|
489
|
+
if (rdvalue_is<unsigned int>(v)) {
|
|
490
|
+
return boost::numeric_cast<std::uint16_t>(v.value.u);
|
|
491
|
+
}
|
|
492
|
+
throw boost::bad_any_cast();
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
template <>
|
|
496
|
+
inline std::uint64_t rdvalue_cast<std::uint64_t>(RDValue_cast_t v) {
|
|
497
|
+
if (rdvalue_is<unsigned int>(v)) {
|
|
498
|
+
return static_cast<std::uint64_t>(v.value.u);
|
|
499
|
+
}
|
|
500
|
+
if (rdvalue_is<int>(v)) {
|
|
501
|
+
return boost::numeric_cast<std::uint64_t>(v.value.i);
|
|
502
|
+
}
|
|
503
|
+
if (rdvalue_is<boost::any>(v)) {
|
|
504
|
+
return boost::any_cast<std::uint64_t>(*v.ptrCast<boost::any>());
|
|
505
|
+
}
|
|
506
|
+
throw boost::bad_any_cast();
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
template <>
|
|
510
|
+
inline bool rdvalue_cast<bool>(RDValue_cast_t v) {
|
|
511
|
+
if (rdvalue_is<bool>(v)) {
|
|
512
|
+
return v.value.b;
|
|
513
|
+
}
|
|
514
|
+
throw boost::bad_any_cast();
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
} // namespace RDKit
|
|
518
|
+
#endif
|