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 =
71 const std::string &smi,
int debugParse = 0,
bool sanitize =
true,
72 std::map<std::string, std::string> *replacements =
nullptr) {
88 std::map<std::string, std::string> *replacements =
90 bool allowCXSMILES =
true;
93 bool parseName =
true;
115 const std::string &sma,
int debugParse = 0,
bool mergeHs =
false,
116 std::map<std::string, std::string> *replacements =
nullptr) {
131 const char *
what() const noexcept
override {
return _msg.c_str(); }
138inline std::unique_ptr<
RDKit::
RWMol> operator"" _smiles(const
char *text,
140 std::string smi(text, len);
141 RWMol *ptr =
nullptr;
147 return std::unique_ptr<RWMol>(ptr);
149inline std::unique_ptr<RDKit::RWMol>
operator"" _smarts(
const char *text,
151 std::string smi(text, len);
155 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 RWMol * SmartsToMol(const std::string &sma, const SmartsParserParams &ps)
RDKIT_SMILESPARSE_EXPORT Atom * SmartsToAtom(const std::string &sma)
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
std::map< std::string, std::string > * replacements