RDKit
Open-source cheminformatics and machine learning.
RDKit::MolPickler Class Reference

handles pickling (serializing) molecules More...

#include <MolPickler.h>

Public Types

enum  Tags {
  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
}
 mark the endian-ness of the pickle More...
 

Static Public Member Functions

static unsigned int getDefaultPickleProperties ()
 
static void setDefaultPickleProperties (unsigned int)
 
static void pickleMol (const ROMol *mol, std::ostream &ss)
 pickles a molecule and sends the results to stream ss More...
 
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)
 
static void pickleMol (const ROMol *mol, std::string &res)
 pickles a molecule and adds the results to string res More...
 
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)
 
static void molFromPickle (const std::string &pickle, ROMol *mol)
 constructs a molecule from a pickle stored in a string More...
 
static void molFromPickle (const std::string &pickle, ROMol &mol)
 
static void molFromPickle (std::istream &ss, ROMol *mol)
 constructs a molecule from a pickle stored in a stream More...
 
static void molFromPickle (std::istream &ss, ROMol &mol)
 

Static Public Attributes

static const boost::int32_t versionMajor
 
static const boost::int32_t versionMinor
 
static const boost::int32_t versionPatch
 mark the pickle version More...
 
static const boost::int32_t endianId
 

Detailed Description

handles pickling (serializing) molecules

Definition at line 60 of file MolPickler.h.

Member Enumeration Documentation

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, you will break old pickles.

Enumerator
VERSION 
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 

Definition at line 70 of file MolPickler.h.

Member Function Documentation

static unsigned int RDKit::MolPickler::getDefaultPickleProperties ( )
static
static void RDKit::MolPickler::molFromPickle ( const std::string &  pickle,
ROMol mol 
)
static

constructs a molecule from a pickle stored in a string

Referenced by RDKit::EnumerateLibrary::getReagents(), and molFromPickle().

static void RDKit::MolPickler::molFromPickle ( const std::string &  pickle,
ROMol mol 
)
inlinestatic

Definition at line 161 of file MolPickler.h.

References molFromPickle().

static void RDKit::MolPickler::molFromPickle ( std::istream &  ss,
ROMol mol 
)
static

constructs a molecule from a pickle stored in a stream

static void RDKit::MolPickler::molFromPickle ( std::istream &  ss,
ROMol mol 
)
inlinestatic

Definition at line 167 of file MolPickler.h.

References molFromPickle().

static void RDKit::MolPickler::pickleMol ( const ROMol mol,
std::ostream &  ss 
)
static

pickles a molecule and sends the results to stream ss

Referenced by RDKit::SmartsMatcher::copy(), RDKit::EnumerateLibrary::getReagents(), and pickleMol().

static void RDKit::MolPickler::pickleMol ( const ROMol mol,
std::ostream &  ss,
unsigned int  propertyFlags 
)
static
static void RDKit::MolPickler::pickleMol ( const ROMol mol,
std::ostream &  ss 
)
static
static void RDKit::MolPickler::pickleMol ( const ROMol mol,
std::ostream &  ss,
unsigned int  propertyFlags 
)
inlinestatic

Definition at line 144 of file MolPickler.h.

References pickleMol().

static void RDKit::MolPickler::pickleMol ( const ROMol mol,
std::string &  res 
)
static

pickles a molecule and adds the results to string res

static void RDKit::MolPickler::pickleMol ( const ROMol mol,
std::string &  res,
unsigned int  propertyFlags 
)
static
static void RDKit::MolPickler::pickleMol ( const ROMol mol,
std::string &  res 
)
static
static void RDKit::MolPickler::pickleMol ( const ROMol mol,
std::string &  res,
unsigned int  propertyFlags 
)
inlinestatic

Definition at line 154 of file MolPickler.h.

References RDKit::EnumerationStrategyPickler::pickle(), and pickleMol().

static void RDKit::MolPickler::setDefaultPickleProperties ( unsigned  int)
static

Member Data Documentation

const boost::int32_t RDKit::MolPickler::endianId
static

Definition at line 64 of file MolPickler.h.

const boost::int32_t RDKit::MolPickler::versionMajor
static

Definition at line 62 of file MolPickler.h.

const boost::int32_t RDKit::MolPickler::versionMinor
static

Definition at line 62 of file MolPickler.h.

const boost::int32_t RDKit::MolPickler::versionPatch
static

mark the pickle version

Definition at line 62 of file MolPickler.h.


The documentation for this class was generated from the following file: