Loading...
Searching...
No Matches
ReactionParser.h File Reference
`#include <RDGeneral/export.h>`
`#include <string>`
`#include <iostream>`
`#include <fstream>`
`#include <sstream>`
`#include <utility>`
`#include <boost/format.hpp>`
`#include <RDGeneral/BadFileException.h>`
`#include <RDGeneral/FileParseException.h>`

Go to the source code of this file.

## Classes

class | RDKit::ChemicalReactionParserException
| used to indicate an error in parsing reaction data More...

## Namespaces

namespace | RDKit
| Std stuff.
namespace | RDKit::PNGData
| Tags used for PNG metadata.

## Functions

std::unique_ptr< ChemicalReaction > | RDKit::operator""_rxnsmarts (const char *text, size_t len)
std::unique_ptr< ChemicalReaction > | RDKit::operator""_rxnsmiles (const char *text, size_t len)
Reaction SMARTS/SMILES Support
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction * | RDKit::RxnSmartsToChemicalReaction (const std::string &text, std::map< std::string, std::string > *replacements=nullptr, bool useSmiles=false, bool allowCXSMILES=true)
| Parse a string containing "Reaction SMARTS" into a ChemicalReaction.
RDKIT_CHEMREACTIONS_EXPORT std::string | RDKit::ChemicalReactionToRxnSmarts (const ChemicalReaction &rxn)
| returns the reaction SMARTS for a reaction
RDKIT_CHEMREACTIONS_EXPORT std::string | RDKit::ChemicalReactionToRxnSmiles (const ChemicalReaction &rxn, bool canonical=true)
| returns the reaction SMILES for a reaction
Reaction Mol Support
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction * | RDKit::RxnMolToChemicalReaction (const ROMol &mol)
| Parse a ROMol into a ChemicalReaction, RXN role must be set before.
RDKIT_CHEMREACTIONS_EXPORT ROMol * | RDKit::ChemicalReactionToRxnMol (const ChemicalReaction &rxn)
| returns a ROMol with RXN roles used to describe the reaction
MDL rxn Support
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction * | RDKit::RxnBlockToChemicalReaction (const std::string &rxnBlock, bool sanitize=false, bool removeHs=false, bool strictParsing=true)
| Parse a text block in MDL rxn format into a ChemicalReaction.
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction * | RDKit::RxnFileToChemicalReaction (const std::string &fileName, bool sanitize=false, bool removeHs=false, bool strictParsing=true)
| Parse a file in MDL rxn format into a ChemicalReaction.
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction * | RDKit::RxnDataStreamToChemicalReaction (std::istream &rxnStream, unsigned int &line, bool sanitize=false, bool removeHs=false, bool strictParsing=true)
| Parse a text stream in MDL rxn format into a ChemicalReaction.
RDKIT_CHEMREACTIONS_EXPORT std::string | RDKit::ChemicalReactionToRxnBlock (const ChemicalReaction &rxn, bool separateAgents=false, bool forceV3000=false)
| returns an rxn block for a reaction
RDKIT_CHEMREACTIONS_EXPORT std::string | RDKit::ChemicalReactionToV3KRxnBlock (const ChemicalReaction &rxn, bool separateAgents=false)
| returns an V3000 rxn block for a reaction
PNG Support
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction * | RDKit::PNGStreamToChemicalReaction (std::istream &pngStream)
| constructs a ChemicalReaction from the metadata in a PNG stream
ChemicalReaction * | RDKit::PNGStringToChemicalReaction (const std::string &data)
| constructs a ChemicalReaction from the metadata in a PNG string See `PNGStreamToChemicalReaction()` for more details
ChemicalReaction * | RDKit::PNGFileToChemicalReaction (const std::string &fname)
| constructs a ChemicalReaction from the metadata in a PNG file See `PNGStreamToChemicalReaction()` for more details
RDKIT_CHEMREACTIONS_EXPORT std::string | RDKit::addChemicalReactionToPNGStream (const ChemicalReaction &rxn, std::istream &iStream, bool includePkl=true, bool includeSmiles=true, bool includeSmarts=false, bool includeRxn=false)
| adds metadata for a ChemicalReaction to the data from a PNG stream. The modified PNG data is returned.
std::string | RDKit::addChemicalReactionToPNGString (const ChemicalReaction &rxn, const std::string &pngString, bool includePkl=true, bool includeSmiles=true, bool includeSmarts=false, bool includeRxn=false)
| adds metadata for a ChemicalReaction to the data from a PNG string. See addChemicalReactionToPNGStream() for more details.
std::string | RDKit::addChemicalReactionToPNGFile (const ChemicalReaction &rxn, const std::string &fname, bool includePkl=true, bool includeSmiles=true, bool includeSmarts=false, bool includeRxn=false)
| adds metadata for a ChemicalReaction to the data from a PNG string. See addChemicalReactionToPNGStream() for more details.
CDXML rxn Support
RDKIT_CHEMREACTIONS_EXPORT std::vector< std::unique_ptr< ChemicalReaction > > | RDKit::CDXMLToChemicalReactions (const std::string &rxnBlock, bool sanitize=false, bool removeHs=false)
| Parse text in CDXML rxn format into a vector of ChemicalReactions.
RDKIT_CHEMREACTIONS_EXPORT std::vector< std::unique_ptr< ChemicalReaction > > | RDKit::CDXMLFileToChemicalReactions (const std::string &fileName, bool sanitize=false, bool removeHs=false)
| Parse a file in CDXML rxn format into a vector of ChemicalReactions.
RDKIT_CHEMREACTIONS_EXPORT std::vector< std::unique_ptr< ChemicalReaction > > | RDKit::CDXMLDataStreamToChemicalReactions (std::istream &rxnStream, bool sanitize=false, bool removeHs=false)
| Parse a text stream in CDXML rxn format into a vector of ChemicalReactions.