 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
34 #ifndef __RD_REACTIONPARSER_H_21Aug2006__
35 #define __RD_REACTIONPARSER_H_21Aug2006__
41 class ChemicalReaction;
45 :
public std::exception {
53 const char *
what() const noexcept
override{
return _msg.c_str(); };
54 const char *
message() const noexcept{
return what(); };
63 const std::string &rxnBlock);
66 const std::string &fileName);
69 std::istream &rxnStream,
unsigned int &line);
85 const std::string &text,
86 std::map<std::string, std::string> *replacements = 0,
87 bool useSmiles =
false);
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction * RxnMolToChemicalReaction(const ROMol &mol)
Parse a ROMol into a ChemicalReaction, RXN role must be set before.
ChemicalReactionParserException(const std::string &msg)
construct with an error message
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction * RxnSmartsToChemicalReaction(const std::string &text, std::map< std::string, std::string > *replacements=0, bool useSmiles=false)
Parse a string containing "Reaction SMARTS" into a ChemicalReaction.
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction * RxnFileToChemicalReaction(const std::string &fileName)
Parse a file in MDL rxn format into a ChemicalReaction.
RDKIT_CHEMREACTIONS_EXPORT ROMol * ChemicalReactionToRxnMol(const ChemicalReaction &rxn)
returns a ROMol with RXN roles used to describe the reaction
ChemicalReactionParserException(const char *msg)
construct with an error message
const char * message() const noexcept
RDKIT_CHEMREACTIONS_EXPORT std::string ChemicalReactionToRxnSmiles(const ChemicalReaction &rxn, bool canonical=true)
returns the reaction SMILES for a reaction
const char * what() const noexcept override
get the error message
RDKIT_CHEMREACTIONS_EXPORT std::string ChemicalReactionToRxnSmarts(const ChemicalReaction &rxn)
returns the reaction SMARTS for a reaction
This is a class for storing and applying general chemical reactions.
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction * RxnBlockToChemicalReaction(const std::string &rxnBlock)
Parse a text block in MDL rxn format into a ChemicalReaction.
used to indicate an error in parsing reaction data
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction * RxnDataStreamToChemicalReaction(std::istream &rxnStream, unsigned int &line)
Parse a text stream in MDL rxn format into a ChemicalReaction.
~ChemicalReactionParserException() noexcept
#define RDKIT_CHEMREACTIONS_EXPORT
RDKIT_CHEMREACTIONS_EXPORT std::string ChemicalReactionToRxnBlock(const ChemicalReaction &rxn, bool separateAgents=false)
returns an RXN block for a reaction