11 #ifndef _RD_FILEPARSERUTILS_H 12 #define _RD_FILEPARSERUTILS_H 17 #include <boost/lexical_cast.hpp> 18 #include <boost/algorithm/string.hpp> 25 namespace FileParserUtils {
28 std::string trimmed = boost::trim_copy(input);
29 if (acceptSpaces && trimmed ==
"") {
32 return boost::lexical_cast<T>(trimmed);
43 Conformer *&conf,
bool &chiralityPossible,
44 unsigned int &nAtoms,
unsigned int &nBonds,
45 bool strictParsing =
true,
bool expectMEND =
true);
49 Conformer *&conf,
bool &chiralityPossible,
50 unsigned int &nAtoms,
unsigned int &nBonds,
51 bool strictParsing =
true);
RDKIT_FILEPARSERS_EXPORT int toInt(const std::string &input, bool acceptSpaces=false)
#define RDKIT_FILEPARSERS_EXPORT
RDKIT_FILEPARSERS_EXPORT std::string getV3000Line(std::istream *inStream, unsigned int &line)
RWMol is a molecule class that is intended to be edited.
RDKIT_FILEPARSERS_EXPORT bool ParseV2000CTAB(std::istream *inStream, unsigned int &line, RWMol *mol, Conformer *&conf, bool &chiralityPossible, unsigned int &nAtoms, unsigned int &nBonds, bool strictParsing=true)
RDKIT_FILEPARSERS_EXPORT double toDouble(const std::string &input, bool acceptSpaces=true)
T stripSpacesAndCast(const std::string &input, bool acceptSpaces=false)
RDKIT_FILEPARSERS_EXPORT bool ParseV3000CTAB(std::istream *inStream, unsigned int &line, RWMol *mol, Conformer *&conf, bool &chiralityPossible, unsigned int &nAtoms, unsigned int &nBonds, bool strictParsing=true, bool expectMEND=true)
RDKIT_FILEPARSERS_EXPORT Atom * replaceAtomWithQueryAtom(RWMol *mol, Atom *atom)
The class for representing atoms.