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;
32 bool useLegacyStereo =
69 const std::string &smi,
int debugParse = 0,
bool sanitize =
true,
70 std::map<std::string, std::string> *replacements =
nullptr) {
97 const std::string &sma,
int debugParse = 0,
bool mergeHs =
false,
98 std::map<std::string, std::string> *replacements =
nullptr);
107 const char *
what() const noexcept
override {
return _msg.c_str(); };
114 inline std::unique_ptr<RDKit::RWMol>
operator"" _smiles(
const char *text,
116 std::string smi(text, len);
117 RWMol *ptr =
nullptr;
123 return std::unique_ptr<RWMol>(ptr);
125 inline std::unique_ptr<RDKit::RWMol>
operator"" _smarts(
const char *text,
127 std::string smi(text, len);
131 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)
~SmilesParseException() noexcept
const char * what() const noexcept override
#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 Atom * SmilesToAtom(const std::string &smi)
RDKIT_SMILESPARSE_EXPORT RWMol * SmartsToMol(const std::string &sma, int debugParse=0, bool mergeHs=false, std::map< std::string, std::string > *replacements=nullptr)
Construct a molecule from a SMARTS string.
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