 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
11 #ifndef _RD_SMILESPARSE_H_
12 #define _RD_SMILESPARSE_H_
38 const SmilesParserParams ¶ms);
71 const std::string &smi,
int debugParse = 0,
bool sanitize =
true,
72 std::map<std::string, std::string> *replacements = 0) {
99 const std::string &sma,
int debugParse = 0,
bool mergeHs =
false,
100 std::map<std::string, std::string> *replacements = 0);
109 const char *
message()
const {
return _msg.c_str(); };
116 inline std::unique_ptr<RDKit::RWMol>
operator"" _smiles(
const char *text,
118 std::string smi(text, len);
119 RWMol *ptr =
nullptr;
125 return std::unique_ptr<RWMol>(ptr);
127 inline std::unique_ptr<RDKit::RWMol>
operator"" _smarts(
const char *text,
129 std::string smi(text, len);
130 RWMol *ptr =
nullptr;
136 return std::unique_ptr<RWMol>(ptr);
RDKIT_SMILESPARSE_EXPORT Atom * SmilesToAtom(const std::string &smi)
RWMol is a molecule class that is intended to be edited.
RDKIT_SMILESPARSE_EXPORT RWMol * SmartsToMol(const std::string &sma, int debugParse=0, bool mergeHs=false, std::map< std::string, std::string > *replacements=0)
Construct a molecule from a SMARTS string.
RDKIT_SMILESPARSE_EXPORT RWMol * SmilesToMol(const std::string &smi, const SmilesParserParams ¶ms)
RDKIT_SMILESPARSE_EXPORT Bond * SmilesToBond(const std::string &smi)
class for flagging sanitization errors
std::map< std::string, std::string > * replacements
SmilesParseException(const char *msg)
SmilesParseException(const std::string msg)
const char * message() const
#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
Defines the editable molecule class RWMol.
RDKIT_SMILESPARSE_EXPORT Atom * SmartsToAtom(const std::string &sma)
RDKIT_SMILESPARSE_EXPORT Bond * SmartsToBond(const std::string &sma)