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 = 11
 
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 intinv_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

◆ 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,
const JSONWriteParameters params = defaultJSONWriteParameters 
)
Parameters
mols- the molecules to work with

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 93 of file MolInterchange.h.

References MolsToJSONData(), and RDKit::rdvalue_is().

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}, {4, Bond::QUADRUPLE}, {17, Bond::DATIVE}}

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},
{"cw", Atom::CHI_TETRAHEDRAL_CW},
{"ccw", Atom::CHI_TETRAHEDRAL_CCW},
{"other", Atom::CHI_OTHER}}

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

◆ currentChargeRepresentationVersion

constexpr int RDKit::MolInterchange::currentChargeRepresentationVersion = 10
constexpr

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

◆ currentMolJSONVersion

constexpr int RDKit::MolInterchange::currentMolJSONVersion = 10
constexpr

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

◆ currentQueryRepresentationVersion

constexpr int RDKit::MolInterchange::currentQueryRepresentationVersion = 10
constexpr

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

◆ currentRDKitJSONVersion

constexpr int RDKit::MolInterchange::currentRDKitJSONVersion = 11
constexpr

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

◆ currentRDKitRepresentationVersion

constexpr int RDKit::MolInterchange::currentRDKitRepresentationVersion = 2
constexpr

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

◆ defaultJSONParseParameters

JSONParseParameters RDKit::MolInterchange::defaultJSONParseParameters
static

Definition at line 52 of file MolInterchange.h.

◆ defaultJSONWriteParameters

JSONWriteParameters RDKit::MolInterchange::defaultJSONWriteParameters
static

Definition at line 77 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}, {Bond::QUADRUPLE, 4}, {Bond::DATIVE, 17}}

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_TETRAHEDRAL_CW, "cw"},
{Atom::CHI_TETRAHEDRAL_CCW, "ccw"},
{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"}}

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

◆ inv_stereoGrouplookup

const std::map<StereoGroupType, std::string> RDKit::MolInterchange::inv_stereoGrouplookup
static
Initial value:
= {
{StereoGroupType::STEREO_ABSOLUTE, "abs"},
{StereoGroupType::STEREO_AND, "and"},
{StereoGroupType::STEREO_OR, "or"}}

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

◆ 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}}

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

◆ stereoGrouplookup

const std::map<std::string, StereoGroupType> RDKit::MolInterchange::stereoGrouplookup
static
Initial value:
= {
{"abs", StereoGroupType::STEREO_ABSOLUTE},
{"and", StereoGroupType::STEREO_AND},
{"or", StereoGroupType::STEREO_OR}}

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