RDKit
Open-source cheminformatics and machine learning.
RDKit::MolInterchange Namespace Reference

Classes

struct  JSONParseParameters
 

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)
 
template<typename T >
std::string MolToJSONData (const T &mol)
 

Variables

static const int currentMolJSONVersion = 10
 
static const int currentRDKitRepresentationVersion = 1
 
static const int currentChargeRepresentationVersion = 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::BondStereostereolookup
 
static const std::map< Bond::BondStereo, std::string > inv_stereolookup
 
static JSONParseParameters defaultJSONParseParameters
 

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

◆ 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

◆ MolsToJSONData()

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

Referenced by MolToJSONData().

◆ MolToJSONData()

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

Definition at line 82 of file MolInterchange.h.

References MolsToJSONData().

Variable Documentation

◆ bolookup

const std::map<unsigned int, Bond::BondType> RDKit::MolInterchange::bolookup
static
Initial value:
= {
{0, Bond::ZERO}, {1, Bond::SINGLE}, {2, Bond::DOUBLE}, {3, Bond::TRIPLE}}

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

◆ chilookup

const std::map<std::string, Atom::ChiralType> RDKit::MolInterchange::chilookup
static
Initial value:
= {
{"unspecified", Atom::CHI_UNSPECIFIED},
{"cw", Atom::CHI_TETRAHEDRAL_CW},
{"ccw", Atom::CHI_TETRAHEDRAL_CCW},
{"other", Atom::CHI_OTHER}}

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

◆ currentChargeRepresentationVersion

const int RDKit::MolInterchange::currentChargeRepresentationVersion = 10
static

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

◆ currentMolJSONVersion

const int RDKit::MolInterchange::currentMolJSONVersion = 10
static

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

◆ currentRDKitRepresentationVersion

const int RDKit::MolInterchange::currentRDKitRepresentationVersion = 1
static

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

◆ defaultJSONParseParameters

JSONParseParameters RDKit::MolInterchange::defaultJSONParseParameters
static

Definition at line 49 of file MolInterchange.h.

◆ inv_bolookup

const std::map<Bond::BondType, unsigned int> RDKit::MolInterchange::inv_bolookup
static
Initial value:
= {
{Bond::ZERO, 0}, {Bond::SINGLE, 1}, {Bond::DOUBLE, 2}, {Bond::TRIPLE, 3}}

Definition at line 34 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_TETRAHEDRAL_CW, "cw"},
{Atom::CHI_TETRAHEDRAL_CCW, "ccw"},
{Atom::CHI_OTHER, "other"}}

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

◆ inv_stereolookup

const std::map<Bond::BondStereo, std::string> RDKit::MolInterchange::inv_stereolookup
static
Initial value:
= {
{Bond::STEREONONE, "unspecified"}, {Bond::STEREOCIS, "cis"},
{Bond::STEREOTRANS, "trans"}, {Bond::STEREOZ, "cis"},
{Bond::STEREOE, "trans"}, {Bond::STEREOANY, "either"}}

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

◆ stereolookup

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

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

RDKit::StructureCheck::DOUBLE
@ DOUBLE
Definition: StructChecker.h:47
RDKit::StructureCheck::SINGLE
@ SINGLE
Definition: StructChecker.h:46
RDKit::StructureCheck::TRIPLE
@ TRIPLE
Definition: StructChecker.h:48