Loading...
Searching...
No Matches
MolPickler.h
Go to the documentation of this file.
///
// Copyright (C) 2001-2021 Greg Landrum and Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <RDGeneral/export.h>
#ifndef RD_MOLPICKLE_H
#define RD_MOLPICKLE_H
#include <Geometry/point.h>
#include <GraphMol/Atom.h>
#include <GraphMol/QueryAtom.h>
#include <GraphMol/Bond.h>
#include <GraphMol/QueryBond.h>
#include <RDGeneral/StreamOps.h>
#include <boost/utility/binary.hpp>
#include <boost/variant.hpp>
#include <Query/QueryObjects.h>
// Std stuff
#include <iostream>
#include <string>
#include <sstream>
#include <exception>
#ifdef WIN32
#include <ios>
#endif
#include <cstdint>
#include <RDGeneral/BetterEnums.h>
namespace RDKit {
class ROMol;
class RingInfo;
//! used to indicate exceptions whilst pickling (serializing) molecules
class RDKIT_GRAPHMOL_EXPORT MolPicklerException : public std::exception {
public:
MolPicklerException(const char *msg) : _msg(msg) {}
MolPicklerException(const std::string msg) : _msg(msg) {}
const char *what() const noexcept override { return _msg.c_str(); }
~MolPicklerException() noexcept override = default;
private:
std::string _msg;
};
namespace PicklerOps {
BETTER_ENUM(
PropertyPickleOptions, unsigned int,
NoProps = 0, // no data pickled (default pickling, single-precision coords)
MolProps = 0x1, // only public non computed properties
AtomProps = 0x2, BondProps = 0x4,
QueryAtomData =
0x2, // n.b. DEPRECATED and set to AtomProps (does the same work)
PrivateProps = 0x10, ComputedProps = 0x20,
AllProps = 0x0000FFFF, // all data pickled
CoordsAsDouble = 0x00010000, // save coordinates in double precision
NoConformers =
0x00020000 // do not include conformers or associated properties
);
} // namespace PicklerOps
//! handles pickling (serializing) molecules
class RDKIT_GRAPHMOL_EXPORT MolPickler {
public:
static const std::int32_t versionMajor; //!< mark the pickle major version
static const std::int32_t versionMinor; //!< mark the pickle minor version
static const std::int32_t versionPatch; //!< mark the pickle patch version
static const std::int32_t endianId; //!< mark the endian-ness of the pickle
//! the pickle format is tagged using these tags:
//! NOTE: if you add to this list, be sure to put new entries AT THE BOTTOM,
/// otherwise
//! you will break old pickles.
typedef enum {
VERSION = 0,
BEGINATOM,
ATOM_INDEX,
ATOM_NUMBER,
ATOM_POS,
ATOM_CHARGE,
ATOM_NEXPLICIT,
ATOM_CHIRALTAG,
ATOM_MASS,
ATOM_ISAROMATIC,
ENDATOM,
BEGINBOND,
BOND_INDEX,
BOND_BEGATOMIDX,
BOND_ENDATOMIDX,
BOND_TYPE,
BOND_DIR,
ENDBOND,
BEGINPROPS,
ENDPROPS,
BEGINSSSR,
ENDSSSR,
ENDMOL,
BEGINCONFS,
ATOM_MAPNUMBER,
BEGINQUERY,
QUERY_VALUE,
QUERY_ISNEGATED,
QUERY_NUMCHILDREN,
QUERY_BOOL,
QUERY_AND,
QUERY_OR,
QUERY_XOR,
QUERY_EQUALS,
QUERY_GREATER,
QUERY_GREATEREQUAL,
QUERY_LESS,
QUERY_LESSEQUAL,
QUERY_RANGE,
QUERY_SET,
QUERY_NULL,
QUERY_ATOMRING,
QUERY_RECURSIVE,
ENDQUERY,
ATOM_DUMMYLABEL,
BEGIN_ATOM_MONOMER,
ATOM_PDB_RESIDUE_SERIALNUMBER,
ATOM_PDB_RESIDUE_ALTLOC,
ATOM_PDB_RESIDUE_RESIDUENAME,
ATOM_PDB_RESIDUE_CHAINID,
ATOM_PDB_RESIDUE_INSERTIONCODE,
ATOM_PDB_RESIDUE_OCCUPANCY,
ATOM_PDB_RESIDUE_TEMPFACTOR,
ATOM_PDB_RESIDUE_ISHETEROATOM,
ATOM_PDB_RESIDUE_SECONDARYSTRUCTURE,
ATOM_PDB_RESIDUE_RESIDUENUMBER,
ATOM_PDB_RESIDUE_SEGMENTNUMBER,
END_ATOM_MONOMER,
BEGINATOMPROPS,
BEGINBONDPROPS,
BEGINQUERYATOMDATA,
BEGINSGROUP,
BEGINSTEREOGROUP,
BEGINCONFPROPS,
BEGINCONFS_DOUBLE,
QUERY_TYPELABEL,
BEGINSYMMSSSR,
BEGINFASTFIND,
BEGINFINDOTHERORUNKNOWN,
QUERY_PROPERTY,
QUERY_PROPERTY_WITH_VALUE,
// add new entries above here
INVALID_TAG = 255
} Tags;
static unsigned int getDefaultPickleProperties();
static void setDefaultPickleProperties(unsigned int);
static const CustomPropHandlerVec &getCustomPropHandlers();
static void addCustomPropHandler(const CustomPropHandler &handler);
//! pickles a molecule and sends the results to stream \c ss
static void pickleMol(const ROMol *mol, std::ostream &ss);
static void pickleMol(const ROMol *mol, std::ostream &ss,
unsigned int propertyFlags);
static void pickleMol(const ROMol &mol, std::ostream &ss);
static void pickleMol(const ROMol &mol, std::ostream &ss,
unsigned int propertyFlags) {
MolPickler::pickleMol(&mol, ss, propertyFlags);
}
//! pickles a molecule and adds the results to string \c res
static void pickleMol(const ROMol *mol, std::string &res);
static void pickleMol(const ROMol *mol, std::string &res,
unsigned int propertyFlags);
static void pickleMol(const ROMol &mol, std::string &res);
static void pickleMol(const ROMol &mol, std::string &res,
unsigned int propertyFlags) {
MolPickler::pickleMol(&mol, res, propertyFlags);
}
//! constructs a molecule from a pickle stored in a string
static void molFromPickle(const std::string &pickle, ROMol *mol,
unsigned int propertyFlags);
static void molFromPickle(const std::string &pickle, ROMol &mol,
unsigned int propertyFlags) {
MolPickler::molFromPickle(pickle, &mol, propertyFlags);
}
static void molFromPickle(const std::string &pickle, ROMol *mol) {
MolPickler::molFromPickle(pickle, mol,
PicklerOps::PropertyPickleOptions::AllProps);
}
static void molFromPickle(const std::string &pickle, ROMol &mol) {
MolPickler::molFromPickle(pickle, &mol,
PicklerOps::PropertyPickleOptions::AllProps);
}
//! constructs a molecule from a pickle stored in a stream
static void molFromPickle(std::istream &ss, ROMol *mol,
unsigned int propertyFlags);
static void molFromPickle(std::istream &ss, ROMol &mol,
unsigned int propertyFlags) {
MolPickler::molFromPickle(ss, &mol, propertyFlags);
}
static void molFromPickle(std::istream &ss, ROMol *mol) {
MolPickler::molFromPickle(ss, mol,
PicklerOps::PropertyPickleOptions::AllProps);
}
static void molFromPickle(std::istream &ss, ROMol &mol) {
MolPickler::molFromPickle(ss, &mol,
PicklerOps::PropertyPickleOptions::AllProps);
}
private:
//! Pickle nonquery atom data
static std::int32_t _pickleAtomData(std::ostream &tss, const Atom *atom);
//! depickle nonquery atom data
static void _unpickleAtomData(std::istream &tss, Atom *atom, int version);
static void _pickleQueryAtomData(std::ostream &tss, const Atom *atom);
//! do the actual work of pickling a molecule
template <typename T>
static void _pickle(const ROMol *mol, std::ostream &ss,
unsigned int propertyFlags);
//! do the actual work of pickling an Atom
template <typename T>
static void _pickleAtom(std::ostream &ss, const Atom *atom);
//! do the actual work of pickling a Bond
template <typename T>
static void _pickleBond(std::ostream &ss, const Bond *bond,
std::map<int, int> &atomIdxMap);
//! do the actual work of pickling an SSSR structure
template <typename T>
static void _pickleSSSR(std::ostream &ss, const RingInfo *ringInfo,
std::map<int, int> &atomIdxMap);
//! do the actual work of pickling a SubstanceGroup
template <typename T>
static void _pickleSubstanceGroup(std::ostream &ss,
const SubstanceGroup &sgroup,
std::map<int, int> &atomIdxMap,
std::map<int, int> &bondIdxMap);
//! do the actual work of pickling Stereo Group data
template <typename T>
static void _pickleStereo(std::ostream &ss, std::vector<StereoGroup> groups,
std::map<int, int> &atomIdxMap,
std::map<int, int> &bondIdxMap);
//! do the actual work of pickling a Conformer
template <typename T, typename C>
static void _pickleConformer(std::ostream &ss, const Conformer *conf);
//! do the actual work of de-pickling a molecule
template <typename T>
static void _depickle(std::istream &ss, ROMol *mol, int version, int numAtoms,
unsigned int propertyFlags);
//! extract atomic data from a pickle and add the resulting Atom to the
/// molecule
template <typename T>
static Atom *_addAtomFromPickle(std::istream &ss, ROMol *mol,
RDGeom::Point3D &pos, int version,
bool directMap = false);
//! extract bond data from a pickle and add the resulting Bond to the molecule
template <typename T>
static Bond *_addBondFromPickle(std::istream &ss, ROMol *mol, int version,
bool directMap = false);
//! extract ring info from a pickle and add the resulting RingInfo to the
/// molecule
template <typename T>
static void _addRingInfoFromPickle(
std::istream &ss, ROMol *mol, int version, bool directMap = false,
FIND_RING_TYPE ringType =
FIND_RING_TYPE::FIND_RING_TYPE_OTHER_OR_UNKNOWN);
//! extract a SubstanceGroup from a pickle
template <typename T>
static SubstanceGroup _getSubstanceGroupFromPickle(std::istream &ss,
ROMol *mol, int version);
template <typename T>
static void _depickleStereo(std::istream &ss, ROMol *mol, int version);
//! extract a conformation from a pickle
template <typename T, typename C>
static Conformer *_conformerFromPickle(std::istream &ss, int version);
//! pickle standard properties
static void _pickleProperties(std::ostream &ss, const RDProps &props,
unsigned int pickleFlags);
//! unpickle standard properties
static void _unpickleProperties(std::istream &ss, RDProps &props,
int version);
//! backwards compatibility
static void _pickleV1(const ROMol *mol, std::ostream &ss);
//! backwards compatibility
static void _depickleV1(std::istream &ss, ROMol *mol);
//! backwards compatibility
static void _addAtomFromPickleV1(std::istream &ss, ROMol *mol);
//! backwards compatibility
static void _addBondFromPickleV1(std::istream &ss, ROMol *mol);
};
namespace PicklerOps {
// clang-format off
using QueryDetails = boost::variant<
MolPickler::Tags, std::tuple<MolPickler::Tags, int32_t>,
std::tuple<MolPickler::Tags, int32_t, int32_t>,
std::tuple<MolPickler::Tags, int32_t, int32_t, int32_t, char>,
std::tuple<MolPickler::Tags, std::set<int32_t>>,
std::tuple<MolPickler::Tags, std::string>,
std::tuple<MolPickler::Tags, PairHolder, double>>;
// clang-format on
template <class T>
QueryDetails getQueryDetails(const Queries::Query<int, T const *, true> *query);
} // namespace PicklerOps
}; // namespace RDKit
#endif
Atom.h
Defines the Atom class and associated typedefs.
BetterEnums.h
BETTER_ENUM
#define BETTER_ENUM(Enum, Underlying,...)
Definition BetterEnums.h:17
Bond.h
QueryAtom.h
QueryBond.h
QueryObjects.h
Pulls in all the query types.
StreamOps.h
Queries::Query
Base class for all queries.
Definition Query.h:45
RDGeom::Point3D
Definition point.h:54
RDKit::Atom
The class for representing atoms.
Definition Atom.h:75
RDKit::Bond
class for representing a bond
Definition Bond.h:47
RDKit::Conformer
The class for representing 2D or 3D conformation of a molecule.
Definition Conformer.h:46
RDKit::CustomPropHandler
Definition StreamOps.h:372
RDKit::MolPicklerException::~MolPicklerException
~MolPicklerException() noexcept override=default
RDKit::MolPicklerException::what
const char * what() const noexcept override
Definition MolPickler.h:44
RDKit::MolPicklerException::MolPicklerException
MolPicklerException(const std::string msg)
Definition MolPickler.h:43
RDKit::MolPicklerException::MolPicklerException
MolPicklerException(const char *msg)
Definition MolPickler.h:42
RDKit::MolPickler
handles pickling (serializing) molecules
Definition MolPickler.h:68
RDKit::MolPickler::endianId
static const std::int32_t endianId
mark the endian-ness of the pickle
Definition MolPickler.h:73
RDKit::MolPickler::molFromPickle
static void molFromPickle(std::istream &ss, ROMol *mol)
Definition MolPickler.h:206
RDKit::MolPickler::molFromPickle
static void molFromPickle(const std::string &pickle, ROMol &mol, unsigned int propertyFlags)
Definition MolPickler.h:186
RDKit::MolPickler::molFromPickle
static void molFromPickle(std::istream &ss, ROMol &mol, unsigned int propertyFlags)
Definition MolPickler.h:202
RDKit::MolPickler::pickleMol
static void pickleMol(const ROMol *mol, std::string &res, unsigned int propertyFlags)
RDKit::MolPickler::molFromPickle
static void molFromPickle(std::istream &ss, ROMol *mol, unsigned int propertyFlags)
constructs a molecule from a pickle stored in a stream
RDKit::MolPickler::molFromPickle
static void molFromPickle(const std::string &pickle, ROMol *mol)
Definition MolPickler.h:190
RDKit::MolPickler::Tags
Tags
Definition MolPickler.h:79
RDKit::MolPickler::ATOM_PDB_RESIDUE_TEMPFACTOR
@ ATOM_PDB_RESIDUE_TEMPFACTOR
Definition MolPickler.h:132
RDKit::MolPickler::BEGINFASTFIND
@ BEGINFASTFIND
Definition MolPickler.h:147
RDKit::MolPickler::QUERY_RECURSIVE
@ QUERY_RECURSIVE
Definition MolPickler.h:122
RDKit::MolPickler::QUERY_BOOL
@ QUERY_BOOL
Definition MolPickler.h:109
RDKit::MolPickler::QUERY_PROPERTY_WITH_VALUE
@ QUERY_PROPERTY_WITH_VALUE
Definition MolPickler.h:150
RDKit::MolPickler::BEGINATOMPROPS
@ BEGINATOMPROPS
Definition MolPickler.h:138
RDKit::MolPickler::BEGINFINDOTHERORUNKNOWN
@ BEGINFINDOTHERORUNKNOWN
Definition MolPickler.h:148
RDKit::MolPickler::QUERY_ISNEGATED
@ QUERY_ISNEGATED
Definition MolPickler.h:107
RDKit::MolPickler::ATOM_CHARGE
@ ATOM_CHARGE
Definition MolPickler.h:85
RDKit::MolPickler::QUERY_ATOMRING
@ QUERY_ATOMRING
Definition MolPickler.h:121
RDKit::MolPickler::QUERY_NULL
@ QUERY_NULL
Definition MolPickler.h:120
RDKit::MolPickler::BEGINQUERY
@ BEGINQUERY
Definition MolPickler.h:105
RDKit::MolPickler::BEGIN_ATOM_MONOMER
@ BEGIN_ATOM_MONOMER
Definition MolPickler.h:125
RDKit::MolPickler::ATOM_INDEX
@ ATOM_INDEX
Definition MolPickler.h:82
RDKit::MolPickler::QUERY_SET
@ QUERY_SET
Definition MolPickler.h:119
RDKit::MolPickler::BEGINSSSR
@ BEGINSSSR
Definition MolPickler.h:100
RDKit::MolPickler::ATOM_PDB_RESIDUE_OCCUPANCY
@ ATOM_PDB_RESIDUE_OCCUPANCY
Definition MolPickler.h:131
RDKit::MolPickler::ATOM_PDB_RESIDUE_SERIALNUMBER
@ ATOM_PDB_RESIDUE_SERIALNUMBER
Definition MolPickler.h:126
RDKit::MolPickler::END_ATOM_MONOMER
@ END_ATOM_MONOMER
Definition MolPickler.h:137
RDKit::MolPickler::ATOM_NUMBER
@ ATOM_NUMBER
Definition MolPickler.h:83
RDKit::MolPickler::BOND_BEGATOMIDX
@ BOND_BEGATOMIDX
Definition MolPickler.h:93
RDKit::MolPickler::BEGINSTEREOGROUP
@ BEGINSTEREOGROUP
Definition MolPickler.h:142
RDKit::MolPickler::QUERY_XOR
@ QUERY_XOR
Definition MolPickler.h:112
RDKit::MolPickler::BEGINBOND
@ BEGINBOND
Definition MolPickler.h:91
RDKit::MolPickler::QUERY_NUMCHILDREN
@ QUERY_NUMCHILDREN
Definition MolPickler.h:108
RDKit::MolPickler::ENDBOND
@ ENDBOND
Definition MolPickler.h:97
RDKit::MolPickler::BOND_INDEX
@ BOND_INDEX
Definition MolPickler.h:92
RDKit::MolPickler::ATOM_MAPNUMBER
@ ATOM_MAPNUMBER
Definition MolPickler.h:104
RDKit::MolPickler::QUERY_EQUALS
@ QUERY_EQUALS
Definition MolPickler.h:113
RDKit::MolPickler::BOND_ENDATOMIDX
@ BOND_ENDATOMIDX
Definition MolPickler.h:94
RDKit::MolPickler::ATOM_PDB_RESIDUE_INSERTIONCODE
@ ATOM_PDB_RESIDUE_INSERTIONCODE
Definition MolPickler.h:130
RDKit::MolPickler::ATOM_CHIRALTAG
@ ATOM_CHIRALTAG
Definition MolPickler.h:87
RDKit::MolPickler::BEGINSGROUP
@ BEGINSGROUP
Definition MolPickler.h:141
RDKit::MolPickler::QUERY_LESS
@ QUERY_LESS
Definition MolPickler.h:116
RDKit::MolPickler::QUERY_GREATER
@ QUERY_GREATER
Definition MolPickler.h:114
RDKit::MolPickler::ENDQUERY
@ ENDQUERY
Definition MolPickler.h:123
RDKit::MolPickler::ATOM_DUMMYLABEL
@ ATOM_DUMMYLABEL
Definition MolPickler.h:124
RDKit::MolPickler::ATOM_PDB_RESIDUE_RESIDUENUMBER
@ ATOM_PDB_RESIDUE_RESIDUENUMBER
Definition MolPickler.h:135
RDKit::MolPickler::INVALID_TAG
@ INVALID_TAG
Definition MolPickler.h:152
RDKit::MolPickler::ATOM_PDB_RESIDUE_SECONDARYSTRUCTURE
@ ATOM_PDB_RESIDUE_SECONDARYSTRUCTURE
Definition MolPickler.h:134
RDKit::MolPickler::QUERY_OR
@ QUERY_OR
Definition MolPickler.h:111
RDKit::MolPickler::ATOM_POS
@ ATOM_POS
Definition MolPickler.h:84
RDKit::MolPickler::BOND_TYPE
@ BOND_TYPE
Definition MolPickler.h:95
RDKit::MolPickler::BEGINBONDPROPS
@ BEGINBONDPROPS
Definition MolPickler.h:139
RDKit::MolPickler::BEGINSYMMSSSR
@ BEGINSYMMSSSR
Definition MolPickler.h:146
RDKit::MolPickler::QUERY_LESSEQUAL
@ QUERY_LESSEQUAL
Definition MolPickler.h:117
RDKit::MolPickler::BEGINCONFPROPS
@ BEGINCONFPROPS
Definition MolPickler.h:143
RDKit::MolPickler::QUERY_RANGE
@ QUERY_RANGE
Definition MolPickler.h:118
RDKit::MolPickler::VERSION
@ VERSION
Definition MolPickler.h:80
RDKit::MolPickler::ENDATOM
@ ENDATOM
Definition MolPickler.h:90
RDKit::MolPickler::BEGINQUERYATOMDATA
@ BEGINQUERYATOMDATA
Definition MolPickler.h:140
RDKit::MolPickler::QUERY_GREATEREQUAL
@ QUERY_GREATEREQUAL
Definition MolPickler.h:115
RDKit::MolPickler::BEGINCONFS
@ BEGINCONFS
Definition MolPickler.h:103
RDKit::MolPickler::ENDMOL
@ ENDMOL
Definition MolPickler.h:102
RDKit::MolPickler::ENDSSSR
@ ENDSSSR
Definition MolPickler.h:101
RDKit::MolPickler::ATOM_PDB_RESIDUE_SEGMENTNUMBER
@ ATOM_PDB_RESIDUE_SEGMENTNUMBER
Definition MolPickler.h:136
RDKit::MolPickler::ATOM_PDB_RESIDUE_RESIDUENAME
@ ATOM_PDB_RESIDUE_RESIDUENAME
Definition MolPickler.h:128
RDKit::MolPickler::ATOM_PDB_RESIDUE_ALTLOC
@ ATOM_PDB_RESIDUE_ALTLOC
Definition MolPickler.h:127
RDKit::MolPickler::BOND_DIR
@ BOND_DIR
Definition MolPickler.h:96
RDKit::MolPickler::ATOM_PDB_RESIDUE_CHAINID
@ ATOM_PDB_RESIDUE_CHAINID
Definition MolPickler.h:129
RDKit::MolPickler::ATOM_MASS
@ ATOM_MASS
Definition MolPickler.h:88
RDKit::MolPickler::BEGINCONFS_DOUBLE
@ BEGINCONFS_DOUBLE
Definition MolPickler.h:144
RDKit::MolPickler::QUERY_AND
@ QUERY_AND
Definition MolPickler.h:110
RDKit::MolPickler::QUERY_PROPERTY
@ QUERY_PROPERTY
Definition MolPickler.h:149
RDKit::MolPickler::BEGINATOM
@ BEGINATOM
Definition MolPickler.h:81
RDKit::MolPickler::ENDPROPS
@ ENDPROPS
Definition MolPickler.h:99
RDKit::MolPickler::ATOM_NEXPLICIT
@ ATOM_NEXPLICIT
Definition MolPickler.h:86
RDKit::MolPickler::QUERY_TYPELABEL
@ QUERY_TYPELABEL
Definition MolPickler.h:145
RDKit::MolPickler::BEGINPROPS
@ BEGINPROPS
Definition MolPickler.h:98
RDKit::MolPickler::ATOM_ISAROMATIC
@ ATOM_ISAROMATIC
Definition MolPickler.h:89
RDKit::MolPickler::ATOM_PDB_RESIDUE_ISHETEROATOM
@ ATOM_PDB_RESIDUE_ISHETEROATOM
Definition MolPickler.h:133
RDKit::MolPickler::QUERY_VALUE
@ QUERY_VALUE
Definition MolPickler.h:106
RDKit::MolPickler::pickleMol
static void pickleMol(const ROMol &mol, std::ostream &ss)
RDKit::MolPickler::pickleMol
static void pickleMol(const ROMol &mol, std::string &res, unsigned int propertyFlags)
Definition MolPickler.h:178
RDKit::MolPickler::pickleMol
static void pickleMol(const ROMol *mol, std::ostream &ss, unsigned int propertyFlags)
RDKit::MolPickler::molFromPickle
static void molFromPickle(const std::string &pickle, ROMol *mol, unsigned int propertyFlags)
constructs a molecule from a pickle stored in a string
RDKit::MolPickler::getCustomPropHandlers
static const CustomPropHandlerVec & getCustomPropHandlers()
RDKit::MolPickler::molFromPickle
static void molFromPickle(const std::string &pickle, ROMol &mol)
Definition MolPickler.h:194
RDKit::MolPickler::setDefaultPickleProperties
static void setDefaultPickleProperties(unsigned int)
RDKit::MolPickler::versionMajor
static const std::int32_t versionMajor
mark the pickle major version
Definition MolPickler.h:70
RDKit::MolPickler::versionMinor
static const std::int32_t versionMinor
mark the pickle minor version
Definition MolPickler.h:71
RDKit::MolPickler::molFromPickle
static void molFromPickle(std::istream &ss, ROMol &mol)
Definition MolPickler.h:210
RDKit::MolPickler::pickleMol
static void pickleMol(const ROMol &mol, std::ostream &ss, unsigned int propertyFlags)
Definition MolPickler.h:168
RDKit::MolPickler::pickleMol
static void pickleMol(const ROMol *mol, std::ostream &ss)
pickles a molecule and sends the results to stream ss
RDKit::MolPickler::pickleMol
static void pickleMol(const ROMol *mol, std::string &res)
pickles a molecule and adds the results to string res
RDKit::MolPickler::getDefaultPickleProperties
static unsigned int getDefaultPickleProperties()
RDKit::MolPickler::addCustomPropHandler
static void addCustomPropHandler(const CustomPropHandler &handler)
RDKit::MolPickler::versionPatch
static const std::int32_t versionPatch
mark the pickle patch version
Definition MolPickler.h:72
RDKit::MolPickler::pickleMol
static void pickleMol(const ROMol &mol, std::string &res)
RDKit::RDProps
Definition RDProps.h:14
RDKit::ROMol
Definition ROMol.h:199
RDKit::RingInfo
Definition RingInfo.h:38
RDKit::SubstanceGroup
The class for representing SubstanceGroups.
Definition SubstanceGroup.h:55
export.h
RDKIT_GRAPHMOL_EXPORT
#define RDKIT_GRAPHMOL_EXPORT
Definition export.h:249
RDKit::PicklerOps
Definition MolPickler.h:51
RDKit::PicklerOps::getQueryDetails
QueryDetails getQueryDetails(const Queries::Query< int, T const *, true > *query)
RDKit::PicklerOps::QueryDetails
boost::variant< MolPickler::Tags, std::tuple< MolPickler::Tags, int32_t >, std::tuple< MolPickler::Tags, int32_t, int32_t >, std::tuple< MolPickler::Tags, int32_t, int32_t, int32_t, char >, std::tuple< MolPickler::Tags, std::set< int32_t > >, std::tuple< MolPickler::Tags, std::string >, std::tuple< MolPickler::Tags, PairHolder, double > > QueryDetails
Definition MolPickler.h:315
RDKit
Std stuff.
Definition Abbreviations.h:19
RDKit::FIND_RING_TYPE
FIND_RING_TYPE
A class to store information about a molecule's rings.
Definition RingInfo.h:31
RDKit::FIND_RING_TYPE_OTHER_OR_UNKNOWN
@ FIND_RING_TYPE_OTHER_OR_UNKNOWN
Definition RingInfo.h:35
RDKit::CustomPropHandlerVec
std::vector< std::shared_ptr< const CustomPropHandler > > CustomPropHandlerVec
Definition StreamOps.h:388
point.h