10 #ifndef _RD_MOLPICKLE_H 11 #define _RD_MOLPICKLE_H 27 #include <boost/cstdint.hpp> 38 const char *
message()
const {
return _msg.c_str(); };
118 static void pickleMol(
const ROMol *mol, std::ostream &ss);
123 static void pickleMol(
const ROMol *mol, std::string &res);
129 static void molFromPickle(
const std::string &pickle,
ROMol *mol);
135 static void molFromPickle(std::istream &ss,
ROMol *mol);
142 template <
typename T>
143 static void _pickle(
const ROMol *mol, std::ostream &ss);
146 template <
typename T>
147 static void _pickleAtom(std::ostream &ss,
const Atom *atom);
150 template <
typename T>
151 static void _pickleBond(std::ostream &ss,
const Bond *bond,
152 std::map<int, int> &atomIdxMap);
155 template <
typename T>
156 static void _pickleSSSR(std::ostream &ss,
const RingInfo *ringInfo,
157 std::map<int, int> &atomIdxMap);
160 template <
typename T>
161 static void _pickleConformer(std::ostream &ss,
const Conformer *conf);
164 template <
typename T>
165 static void _depickle(std::istream &ss,
ROMol *mol,
int version,
170 template <
typename T>
171 static Atom *_addAtomFromPickle(std::istream &ss,
ROMol *mol,
173 bool directMap =
false);
176 template <
typename T>
177 static Bond *_addBondFromPickle(std::istream &ss,
ROMol *mol,
int version,
178 bool directMap =
false);
182 template <
typename T>
183 static void _addRingInfoFromPickle(std::istream &ss,
ROMol *mol,
int version,
184 bool directMap =
false);
187 template <
typename T>
188 static Conformer *_conformerFromPickle(std::istream &ss,
int version);
191 static void _pickleV1(
const ROMol *mol, std::ostream &ss);
193 static void _depickleV1(std::istream &ss,
ROMol *mol);
195 static void _addAtomFromPickleV1(std::istream &ss,
ROMol *mol);
197 static void _addBondFromPickleV1(std::istream &ss,
ROMol *mol);
static void pickleMol(const ROMol *mol, std::ostream &ss)
pickles a molecule and sends the results to stream ss
MolPicklerException(const char *msg)
static void pickleMol(const ROMol &mol, std::string &res)
Tags
mark the endian-ness of the pickle
static const boost::int32_t versionPatch
mark the pickle version
ROMol is a molecule class that is intended to have a fixed topology.
const char * message() const
static void molFromPickle(const std::string &pickle, ROMol &mol)
static const boost::int32_t endianId
Includes a bunch of functionality for handling Atom and Bond queries.
A class to store information about a molecule's rings.
used to indicate exceptions whilst pickling (serializing) molecules
class for representing a bond
MolPicklerException(const std::string msg)
handles pickling (serializing) molecules
static void molFromPickle(const std::string &pickle, ROMol *mol)
constructs a molecule from a pickle stored in a string
static void molFromPickle(std::istream &ss, ROMol &mol)
Defines the Atom class and associated typedefs.
static void pickleMol(const ROMol &mol, std::ostream &ss)
The class for representing atoms.