11#ifndef RD_SMILESPARSE_H
12#define RD_SMILESPARSE_H
25namespace SmilesParse {
30 const char *
what() const noexcept
override {
return _msg.c_str(); }
40namespace SmilesParse {
45 bool allowCXSMILES =
true;
48 bool parseName =
true;
50 bool skipCleanup =
false;
51 bool debugParse =
false;
52 std::map<std::string, std::string>
57 bool allowCXSMILES =
true;
60 bool parseName =
true;
63 bool skipCleanup =
false;
64 bool debugParse =
false;
65 std::map<std::string, std::string>
70 const std::string &smi,
73 const std::string &sma,
77 const std::string &smi);
79 const std::string &smi);
82 const std::string &sma);
84 const std::string &sma);
95 std::map<std::string, std::string> *replacements =
97 bool allowCXSMILES =
true;
100 bool parseName =
true;
101 bool removeHs =
true;
102 bool skipCleanup =
false;
107 std::map<std::string, std::string> *replacements =
109 bool allowCXSMILES =
true;
110 bool strictCXSMILES =
112 bool parseName =
true;
115 bool skipCleanup =
false;
172 const std::string &smi,
int debugParse = 0,
bool sanitize =
true,
173 std::map<std::string, std::string> *replacements =
nullptr) {
218 const std::string &sma,
int debugParse = 0,
bool mergeHs =
false,
219 std::map<std::string, std::string> *replacements =
nullptr) {
237inline std::unique_ptr<RDKit::RWMol>
operator"" _smiles(
const char *text,
239 std::string smi(text, len);
241 return v2::SmilesParse::MolFromSmiles(smi);
246inline std::unique_ptr<RDKit::RWMol>
operator"" _smarts(
const char *text,
248 std::string smi(text, len);
249 return v2::SmilesParse::MolFromSmarts(smi);
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)
~SmilesParseException() noexcept override=default
const char * what() const noexcept override
#define RDKIT_SMILESPARSE_EXPORT
Atom * SmilesToAtom(const std::string &smi)
Bond * SmilesToBond(const std::string &smi)
RWMol * SmartsToMol(const std::string &sma, const SmartsParserParams &ps)
Bond * SmartsToBond(const std::string &sma)
RDKit::RWMol * SmilesToMol(const std::string &smi, const SmilesParserParams &ps)
Atom * SmartsToAtom(const std::string &sma)
RDKIT_SMILESPARSE_EXPORT std::unique_ptr< RDKit::Atom > AtomFromSmiles(const std::string &smi)
RDKIT_SMILESPARSE_EXPORT std::unique_ptr< RDKit::RWMol > MolFromSmiles(const std::string &smi, const SmilesParserParams ¶ms=SmilesParserParams())
RDKIT_SMILESPARSE_EXPORT std::unique_ptr< RDKit::Bond > BondFromSmiles(const std::string &smi)
RDKIT_SMILESPARSE_EXPORT std::unique_ptr< RDKit::Atom > AtomFromSmarts(const std::string &sma)
RDKIT_SMILESPARSE_EXPORT std::unique_ptr< RDKit::Bond > BondFromSmarts(const std::string &sma)
RDKIT_SMILESPARSE_EXPORT std::unique_ptr< RDKit::RWMol > MolFromSmarts(const std::string &sma, const SmartsParserParams ¶ms=SmartsParserParams())
std::map< std::string, std::string > * replacements
std::map< std::string, std::string > * replacements
std::map< std::string, std::string > replacements
std::map< std::string, std::string > replacements