RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
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 , BEGINSGROUP , BEGINSTEREOGROUP , BEGINCONFPROPS ,
  BEGINCONFS_DOUBLE , QUERY_TYPELABEL , BEGINSYMMSSSR , BEGINFASTFIND ,
  BEGINFINDOTHERORUNKNOWN , QUERY_PROPERTY , QUERY_PROPERTY_WITH_VALUE , INVALID_TAG = 255
}
 

Static Public Member Functions

static unsigned int getDefaultPickleProperties ()
 
static void setDefaultPickleProperties (unsigned int)
 
static const CustomPropHandlerVecgetCustomPropHandlers ()
 
static void addCustomPropHandler (const CustomPropHandler &handler)
 
static void pickleMol (const ROMol *mol, std::ostream &ss)
 pickles a molecule and sends the results to stream 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)
 
static void pickleMol (const ROMol *mol, std::string &res)
 pickles a molecule and adds the results to 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)
 
static void molFromPickle (const std::string &pickle, ROMol *mol, unsigned int 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)
 
static void molFromPickle (const std::string &pickle, ROMol &mol)
 
static void molFromPickle (std::istream &ss, ROMol *mol, unsigned int propertyFlags)
 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)
 
static void molFromPickle (std::istream &ss, ROMol &mol)
 

Static Public Attributes

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
 

Detailed Description

handles pickling (serializing) molecules

Definition at line 68 of file MolPickler.h.

Member Enumeration Documentation

◆ Tags

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.

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 
BEGINSGROUP 
BEGINSTEREOGROUP 
BEGINCONFPROPS 
BEGINCONFS_DOUBLE 
QUERY_TYPELABEL 
BEGINSYMMSSSR 
BEGINFASTFIND 
BEGINFINDOTHERORUNKNOWN 
QUERY_PROPERTY 
QUERY_PROPERTY_WITH_VALUE 
INVALID_TAG 

Definition at line 79 of file MolPickler.h.

Member Function Documentation

◆ addCustomPropHandler()

static void RDKit::MolPickler::addCustomPropHandler ( const CustomPropHandler handler)
static

◆ getCustomPropHandlers()

static const CustomPropHandlerVec & RDKit::MolPickler::getCustomPropHandlers ( )
static

◆ getDefaultPickleProperties()

static unsigned int RDKit::MolPickler::getDefaultPickleProperties ( )
static

◆ molFromPickle() [1/8]

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

Definition at line 193 of file MolPickler.h.

◆ molFromPickle() [2/8]

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

Definition at line 186 of file MolPickler.h.

◆ molFromPickle() [3/8]

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

Definition at line 190 of file MolPickler.h.

◆ molFromPickle() [4/8]

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

constructs a molecule from a pickle stored in a string

◆ molFromPickle() [5/8]

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

Definition at line 207 of file MolPickler.h.

◆ molFromPickle() [6/8]

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

Definition at line 200 of file MolPickler.h.

◆ molFromPickle() [7/8]

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

Definition at line 204 of file MolPickler.h.

◆ molFromPickle() [8/8]

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

constructs a molecule from a pickle stored in a stream

◆ pickleMol() [1/8]

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

◆ pickleMol() [2/8]

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

Definition at line 168 of file MolPickler.h.

◆ pickleMol() [3/8]

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

◆ pickleMol() [4/8]

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

Definition at line 178 of file MolPickler.h.

◆ pickleMol() [5/8]

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

pickles a molecule and sends the results to stream ss

◆ pickleMol() [6/8]

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

◆ pickleMol() [7/8]

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

pickles a molecule and adds the results to string res

◆ pickleMol() [8/8]

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

◆ setDefaultPickleProperties()

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

Member Data Documentation

◆ endianId

const std::int32_t RDKit::MolPickler::endianId
static

mark the endian-ness of the pickle

Definition at line 73 of file MolPickler.h.

◆ versionMajor

const std::int32_t RDKit::MolPickler::versionMajor
static

mark the pickle major version

Definition at line 70 of file MolPickler.h.

◆ versionMinor

const std::int32_t RDKit::MolPickler::versionMinor
static

mark the pickle minor version

Definition at line 71 of file MolPickler.h.

◆ versionPatch

const std::int32_t RDKit::MolPickler::versionPatch
static

mark the pickle patch version

Definition at line 72 of file MolPickler.h.


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