RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDKit::MolInterchange Namespace Reference

Classes

struct  JSONParseParameters
 
struct  JSONWriteParameters
 

Functions

RDKIT_MOLINTERCHANGE_EXPORT std::vector< boost::shared_ptr< ROMol > > JSONDataStreamToMols (std::istream *inStream, const JSONParseParameters &params=defaultJSONParseParameters)
 
RDKIT_MOLINTERCHANGE_EXPORT std::vector< boost::shared_ptr< ROMol > > JSONDataToMols (const std::string &jsonBlock, const JSONParseParameters &params=defaultJSONParseParameters)
 
template<typename T>
RDKIT_MOLINTERCHANGE_EXPORT std::string MolsToJSONData (const std::vector< T > &mols, const JSONWriteParameters &params=defaultJSONWriteParameters)
 
template<typename T>
std::string MolToJSONData (const T &mol, const JSONWriteParameters &params=defaultJSONWriteParameters)
 

Variables

constexpr int currentMolJSONVersion = 10
 
constexpr int currentRDKitJSONVersion = 12
 
constexpr int currentRDKitRepresentationVersion = 2
 
constexpr int currentChargeRepresentationVersion = 10
 
constexpr int currentQueryRepresentationVersion = 10
 
static const std::map< std::string, Atom::ChiralTypechilookup
 
static const std::map< Atom::ChiralType, std::string > inv_chilookup
 
static const std::map< unsigned int, Bond::BondTypebolookup
 
static const std::map< Bond::BondType, unsigned int > inv_bolookup
 
static const std::map< std::string, Bond::BondStereostereoBondlookup
 
static const std::map< Bond::BondStereo, std::string > inv_stereoBondlookup
 
static const std::map< std::string, StereoGroupTypestereoGrouplookup
 
static const std::map< StereoGroupType, std::string > inv_stereoGrouplookup
 
static JSONParseParameters defaultJSONParseParameters
 
static JSONWriteParameters defaultJSONWriteParameters
 

Function Documentation

◆ JSONDataStreamToMols()

RDKIT_MOLINTERCHANGE_EXPORT std::vector< boost::shared_ptr< ROMol > > RDKit::MolInterchange::JSONDataStreamToMols ( std::istream * inStream,
const JSONParseParameters & params = defaultJSONParseParameters )
Parameters
inStream- stream containing the data
params- parsing options

References defaultJSONParseParameters, and RDKIT_MOLINTERCHANGE_EXPORT.

◆ JSONDataToMols()

RDKIT_MOLINTERCHANGE_EXPORT std::vector< boost::shared_ptr< ROMol > > RDKit::MolInterchange::JSONDataToMols ( const std::string & jsonBlock,
const JSONParseParameters & params = defaultJSONParseParameters )
Parameters
jsonBlock- string containing the mol block
params- parsing options

References defaultJSONParseParameters.

◆ MolsToJSONData()

template<typename T>
RDKIT_MOLINTERCHANGE_EXPORT std::string RDKit::MolInterchange::MolsToJSONData ( const std::vector< T > & mols,
const JSONWriteParameters & params = defaultJSONWriteParameters )
Parameters
mols- the molecules to work with

References defaultJSONWriteParameters, and RDKIT_MOLINTERCHANGE_EXPORT.

Referenced by MolToJSONData().

◆ MolToJSONData()

template<typename T>
std::string RDKit::MolInterchange::MolToJSONData ( const T & mol,
const JSONWriteParameters & params = defaultJSONWriteParameters )
Parameters
mol- the molecule to work with

Definition at line 92 of file MolInterchange.h.

References defaultJSONWriteParameters, and MolsToJSONData().

Variable Documentation

◆ bolookup

const std::map<unsigned int, Bond::BondType> RDKit::MolInterchange::bolookup
static
Initial value:
= {
@ ZERO
Zero-order bond (from.
Definition Bond.h:77
@ QUADRUPLE
Definition Bond.h:60
@ DOUBLE
Definition Bond.h:58
@ TRIPLE
Definition Bond.h:59
@ DATIVE
standard two-electron dative
Definition Bond.h:73
@ SINGLE
Definition Bond.h:57

Definition at line 35 of file MolInterchange/details.h.

◆ chilookup

const std::map<std::string, Atom::ChiralType> RDKit::MolInterchange::chilookup
static
Initial value:
= {
{"unspecified", Atom::CHI_UNSPECIFIED},
{"other", Atom::CHI_OTHER}}
@ CHI_OTHER
some unrecognized type of chirality
Definition Atom.h:110
@ CHI_TETRAHEDRAL_CW
tetrahedral: clockwise rotation (SMILES @@)
Definition Atom.h:107
@ CHI_UNSPECIFIED
chirality that hasn't been specified
Definition Atom.h:106
@ CHI_TETRAHEDRAL_CCW
tetrahedral: counter-clockwise rotation (SMILES
Definition Atom.h:108

Definition at line 24 of file MolInterchange/details.h.

◆ currentChargeRepresentationVersion

int RDKit::MolInterchange::currentChargeRepresentationVersion = 10
constexpr

Definition at line 21 of file MolInterchange/details.h.

◆ currentMolJSONVersion

int RDKit::MolInterchange::currentMolJSONVersion = 10
constexpr

Definition at line 18 of file MolInterchange/details.h.

◆ currentQueryRepresentationVersion

int RDKit::MolInterchange::currentQueryRepresentationVersion = 10
constexpr

Definition at line 22 of file MolInterchange/details.h.

◆ currentRDKitJSONVersion

int RDKit::MolInterchange::currentRDKitJSONVersion = 12
constexpr

Definition at line 19 of file MolInterchange/details.h.

◆ currentRDKitRepresentationVersion

int RDKit::MolInterchange::currentRDKitRepresentationVersion = 2
constexpr

Definition at line 20 of file MolInterchange/details.h.

◆ defaultJSONParseParameters

JSONParseParameters RDKit::MolInterchange::defaultJSONParseParameters
static

Definition at line 51 of file MolInterchange.h.

Referenced by JSONDataStreamToMols(), and JSONDataToMols().

◆ defaultJSONWriteParameters

JSONWriteParameters RDKit::MolInterchange::defaultJSONWriteParameters
static

Definition at line 76 of file MolInterchange.h.

Referenced by MolsToJSONData(), and MolToJSONData().

◆ inv_bolookup

const std::map<Bond::BondType, unsigned int> RDKit::MolInterchange::inv_bolookup
static
Initial value:

Definition at line 38 of file MolInterchange/details.h.

◆ inv_chilookup

const std::map<Atom::ChiralType, std::string> RDKit::MolInterchange::inv_chilookup
static
Initial value:
= {
{Atom::CHI_UNSPECIFIED, "unspecified"},
{Atom::CHI_OTHER, "other"}}

Definition at line 29 of file MolInterchange/details.h.

◆ inv_stereoBondlookup

const std::map<Bond::BondStereo, std::string> RDKit::MolInterchange::inv_stereoBondlookup
static
Initial value:
= {
{Bond::STEREONONE, "unspecified"}, {Bond::STEREOCIS, "cis"},
{Bond::STEREOTRANS, "trans"}, {Bond::STEREOZ, "cis"},
{Bond::STEREOE, "trans"}, {Bond::STEREOANY, "either"},
{Bond::STEREOATROPCW, "atrop_cw"}, {Bond::STEREOATROPCCW, "atrop_ccw"}}
@ STEREOTRANS
Definition Bond.h:102
@ STEREOE
Definition Bond.h:100
@ STEREOZ
Definition Bond.h:99
@ STEREOATROPCCW
Definition Bond.h:104
@ STEREOCIS
Definition Bond.h:101
@ STEREONONE
Definition Bond.h:95
@ STEREOATROPCW
Definition Bond.h:103
@ STEREOANY
Definition Bond.h:96

Definition at line 46 of file MolInterchange/details.h.

◆ inv_stereoGrouplookup

const std::map<StereoGroupType, std::string> RDKit::MolInterchange::inv_stereoGrouplookup
static

◆ stereoBondlookup

const std::map<std::string, Bond::BondStereo> RDKit::MolInterchange::stereoBondlookup
static
Initial value:
= {
{"unspecified", Bond::STEREONONE}, {"cis", Bond::STEREOCIS},
{"trans", Bond::STEREOTRANS}, {"either", Bond::STEREOANY},
{"atrop_cw", Bond::STEREOATROPCW}, {"atrop_ccw", Bond::STEREOATROPCCW}}

Definition at line 42 of file MolInterchange/details.h.

◆ stereoGrouplookup

const std::map<std::string, StereoGroupType> RDKit::MolInterchange::stereoGrouplookup
static
Initial value:

Definition at line 52 of file MolInterchange/details.h.