10 #ifndef _RD_MOLPICKLE_H 11 #define _RD_MOLPICKLE_H 27 #include <boost/cstdint.hpp> 38 const char *
message ()
const {
return _msg.c_str(); };
116 static void pickleMol(
const ROMol *mol,std::ostream &ss);
119 static void pickleMol(
const ROMol *mol,std::string &res);
123 static void molFromPickle(
const std::string &pickle,
ROMol *mol);
127 static void molFromPickle(std::istream &ss,
ROMol *mol);
131 template <
typename T>
132 static void _pickle(
const ROMol *mol,std::ostream &ss);
135 template <
typename T>
136 static void _pickleAtom(std::ostream &ss,
const Atom *atom);
139 template <
typename T>
140 static void _pickleBond(std::ostream &ss,
const Bond *bond,
141 std::map<int,int> &atomIdxMap);
144 template <
typename T>
145 static void _pickleSSSR(std::ostream &ss,
const RingInfo *ringInfo,
146 std::map<int,int> &atomIdxMap);
149 template <
typename T>
150 static void _pickleConformer(std::ostream &ss,
const Conformer *conf);
153 template <
typename T>
154 static void _depickle(std::istream &ss,
ROMol *mol,
int version,
int numAtoms);
158 template <
typename T>
161 bool directMap=
false);
164 template <
typename T>
165 static Bond *_addBondFromPickle(std::istream &ss,
ROMol *mol,
167 bool directMap=
false);
170 template <
typename T>
171 static void _addRingInfoFromPickle(std::istream &ss,
ROMol *mol,
173 bool directMap=
false);
176 template <
typename T>
177 static Conformer *_conformerFromPickle(std::istream &ss,
int version);
180 static void _pickleV1(
const ROMol *mol,std::ostream &ss);
182 static void _depickleV1(std::istream &ss,
ROMol *mol);
184 static void _addAtomFromPickleV1(std::istream &ss,
ROMol *mol);
186 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.
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
const char * message() const
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.