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 =
true;
69 const std::string &
smi,
int debugParse = 0,
bool sanitize =
true,
70 std::map<std::string, std::string> *replacements =
nullptr) {
86 std::map<std::string, std::string> *replacements =
88 bool allowCXSMILES =
true;
91 bool parseName =
true;
113 const std::string &
sma,
int debugParse = 0,
bool mergeHs =
false,
114 std::map<std::string, std::string> *replacements =
nullptr) {
117 ps.mergeHs = mergeHs;
118 ps.replacements = replacements;
129 const char *
what() const noexcept
override {
return _msg.c_str(); }
136inline std::unique_ptr<
RDKit::
RWMol> operator"" _smiles(const
char *text,
138 std::string smi(text, len);
139 RWMol *ptr =
nullptr;
145 return std::unique_ptr<RWMol>(ptr);
147inline std::unique_ptr<RDKit::RWMol>
operator"" _smarts(
const char *text,
149 std::string smi(text, len);
153 return std::unique_ptr<RWMol>(ptr);
Defines the editable molecule class RWMol.
The class for representing atoms.
class for representing a bond
class for flagging sanitization errors
RWMol is a molecule class that is intended to be edited.
SmilesParseException(const std::string msg)
SmilesParseException(const char *msg)
const char * what() const noexcept override
~SmilesParseException() noexcept override=default
#define RDKIT_SMILESPARSE_EXPORT
RDKIT_SMILESPARSE_EXPORT RWMol * SmartsToMol(const std::string &sma, const SmartsParserParams &ps)
RDKIT_SMILESPARSE_EXPORT Atom * SmartsToAtom(const std::string &sma)
bool rdvalue_is(const RDValue_cast_t)
RDKIT_SMILESPARSE_EXPORT Bond * SmilesToBond(const std::string &smi)
RDKIT_SMILESPARSE_EXPORT RWMol * SmilesToMol(const std::string &smi, const SmilesParserParams ¶ms)
RDKIT_SMILESPARSE_EXPORT Bond * SmartsToBond(const std::string &sma)
RDKIT_SMILESPARSE_EXPORT Atom * SmilesToAtom(const std::string &smi)
std::map< std::string, std::string > * replacements