 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
11 #ifndef RD_SMILESPARSE_H
12 #define RD_SMILESPARSE_H
25 std::map<std::string, std::string> *replacements =
27 bool allowCXSMILES =
true;
30 bool parseName =
false;
67 const std::string &smi,
int debugParse = 0,
bool sanitize =
true,
68 std::map<std::string, std::string> *replacements = 0) {
95 const std::string &sma,
int debugParse = 0,
bool mergeHs =
false,
96 std::map<std::string, std::string> *replacements = 0);
105 const char *
what() const noexcept
override {
return _msg.c_str(); };
106 const char *
message() const noexcept {
return what(); };
113 inline std::unique_ptr<RDKit::RWMol>
operator"" _smiles(
const char *text,
115 std::string smi(text, len);
116 RWMol *ptr =
nullptr;
122 return std::unique_ptr<RWMol>(ptr);
124 inline std::unique_ptr<RDKit::RWMol>
operator"" _smarts(
const char *text,
126 std::string smi(text, len);
130 return std::unique_ptr<RWMol>(ptr);
const char * what() const noexcept override
class for representing a bond
RDKIT_SMILESPARSE_EXPORT Atom * SmilesToAtom(const std::string &smi)
RWMol is a molecule class that is intended to be edited.
const char * message() const noexcept
RDKIT_SMILESPARSE_EXPORT RWMol * SmartsToMol(const std::string &sma, int debugParse=0, bool mergeHs=false, std::map< std::string, std::string > *replacements=0)
Construct a molecule from a SMARTS string.
The class for representing atoms.
RDKIT_SMILESPARSE_EXPORT RWMol * SmilesToMol(const std::string &smi, const SmilesParserParams ¶ms)
RDKIT_SMILESPARSE_EXPORT Bond * SmilesToBond(const std::string &smi)
class for flagging sanitization errors
std::map< std::string, std::string > * replacements
SmilesParseException(const char *msg)
SmilesParseException(const std::string msg)
#define RDKIT_SMILESPARSE_EXPORT
RDKIT_GRAPHMOL_EXPORT ROMol * removeHs(const ROMol &mol, bool implicitOnly=false, bool updateExplicitCount=false, bool sanitize=true)
returns a copy of a molecule with hydrogens removed
~SmilesParseException() noexcept
Defines the editable molecule class RWMol.
RDKIT_SMILESPARSE_EXPORT Atom * SmartsToAtom(const std::string &sma)
RDKIT_SMILESPARSE_EXPORT Bond * SmartsToBond(const std::string &sma)