RDKit: RDKit::MolInterchange Namespace Reference

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
Classes | Functions | Variables
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::ChiralType > | chilookup
static const std::map< Atom::ChiralType, std::string > | inv_chilookup
static const std::map< unsigned int, Bond::BondType > | bolookup
static const std::map< Bond::BondType, unsigned int > | inv_bolookup
static const std::map< std::string, Bond::BondStereo > | stereoBondlookup
static const std::map< Bond::BondStereo, std::string > | inv_stereoBondlookup
static const std::map< std::string, StereoGroupType > | stereoGrouplookup
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:
= {
{0, Bond::ZERO}, {1, Bond::SINGLE}, {2, Bond::DOUBLE},
{3, Bond::TRIPLE}, {4, Bond::QUADRUPLE}, {17, Bond::DATIVE}}
RDKit::Bond::ZERO
@ ZERO
Zero-order bond (from.
Definition Bond.h:77
RDKit::Bond::QUADRUPLE
@ QUADRUPLE
Definition Bond.h:60
RDKit::Bond::DOUBLE
@ DOUBLE
Definition Bond.h:58
RDKit::Bond::TRIPLE
@ TRIPLE
Definition Bond.h:59
RDKit::Bond::DATIVE
@ DATIVE
standard two-electron dative
Definition Bond.h:73
RDKit::Bond::SINGLE
@ 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},
{"cw", Atom::CHI_TETRAHEDRAL_CW},
{"ccw", Atom::CHI_TETRAHEDRAL_CCW},
{"other", Atom::CHI_OTHER}}
RDKit::Atom::CHI_OTHER
@ CHI_OTHER
some unrecognized type of chirality
Definition Atom.h:110
RDKit::Atom::CHI_TETRAHEDRAL_CW
@ CHI_TETRAHEDRAL_CW
tetrahedral: clockwise rotation (SMILES @@)
Definition Atom.h:107
RDKit::Atom::CHI_UNSPECIFIED
@ CHI_UNSPECIFIED
chirality that hasn't been specified
Definition Atom.h:106
RDKit::Atom::CHI_TETRAHEDRAL_CCW
@ 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:
= {
{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"},
{Bond::STEREOATROPCW, "atrop_cw"}, {Bond::STEREOATROPCCW, "atrop_ccw"}}
RDKit::Bond::STEREOTRANS
@ STEREOTRANS
Definition Bond.h:102
RDKit::Bond::STEREOE
@ STEREOE
Definition Bond.h:100
RDKit::Bond::STEREOZ
@ STEREOZ
Definition Bond.h:99
RDKit::Bond::STEREOATROPCCW
@ STEREOATROPCCW
Definition Bond.h:104
RDKit::Bond::STEREOCIS
@ STEREOCIS
Definition Bond.h:101
RDKit::Bond::STEREONONE
@ STEREONONE
Definition Bond.h:95
RDKit::Bond::STEREOATROPCW
@ STEREOATROPCW
Definition Bond.h:103
RDKit::Bond::STEREOANY
@ 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

Initial value:
= {
{StereoGroupType::STEREO_ABSOLUTE, "abs"},
{StereoGroupType::STEREO_AND, "and"},
{StereoGroupType::STEREO_OR, "or"}}
RDKit::StereoGroupType::STEREO_OR
@ STEREO_OR
Definition StereoGroup.h:32
RDKit::StereoGroupType::STEREO_AND
@ STEREO_AND
Definition StereoGroup.h:33
RDKit::StereoGroupType::STEREO_ABSOLUTE
@ STEREO_ABSOLUTE
Definition StereoGroup.h:31

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},
{"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:
= {
{"abs", StereoGroupType::STEREO_ABSOLUTE},
{"and", StereoGroupType::STEREO_AND},
{"or", StereoGroupType::STEREO_OR}}

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