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;
32 bool useLegacyStereo =
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;
111 const std::string &sma,
int debugParse = 0,
bool mergeHs =
false,
112 std::map<std::string, std::string> *replacements =
nullptr) {
127 const char *
what() const noexcept
override {
return _msg.c_str(); }
134 inline std::unique_ptr<
RDKit::
RWMol> operator"" _smiles(const
char *text,
136 std::string smi(text, len);
137 RWMol *ptr =
nullptr;
143 return std::unique_ptr<RWMol>(ptr);
145 inline std::unique_ptr<RDKit::RWMol>
operator"" _smarts(
const char *text,
147 std::string smi(text, len);
151 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_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
RDKIT_SMILESPARSE_EXPORT Atom * SmartsToAtom(const std::string &sma)
RDKIT_SMILESPARSE_EXPORT RWMol * SmartsToMol(const std::string &sma, const SmartsParserParams &ps)
RDKIT_SMILESPARSE_EXPORT Atom * SmilesToAtom(const std::string &smi)
RDKIT_SMILESPARSE_EXPORT Bond * SmilesToBond(const std::string &smi)
RDKIT_SMILESPARSE_EXPORT Bond * SmartsToBond(const std::string &sma)
RDKIT_SMILESPARSE_EXPORT RWMol * SmilesToMol(const std::string &smi, const SmilesParserParams ¶ms)
std::map< std::string, std::string > * replacements
std::map< std::string, std::string > * replacements