10 #ifndef _RD_FILEPARSERUTILS_H 11 #define _RD_FILEPARSERUTILS_H 16 #include <boost/lexical_cast.hpp> 17 #include <boost/algorithm/string.hpp> 24 namespace FileParserUtils {
27 std::string trimmed = boost::trim_copy(input);
28 if (acceptSpaces && trimmed ==
"") {
31 return boost::lexical_cast<T>(trimmed);
34 int toInt(
const std::string &input,
bool acceptSpaces =
false);
35 double toDouble(
const std::string &input,
bool acceptSpaces =
true);
38 std::string
getV3000Line(std::istream *inStream,
unsigned int &line);
42 Conformer *&conf,
bool &chiralityPossible,
43 unsigned int &nAtoms,
unsigned int &nBonds,
44 bool strictParsing =
true,
bool expectMEND =
true);
48 Conformer *&conf,
bool &chiralityPossible,
49 unsigned int &nAtoms,
unsigned int &nBonds,
50 bool strictParsing =
true);
RWMol is a molecule class that is intended to be edited.
std::string getV3000Line(std::istream *inStream, unsigned int &line)
double toDouble(const std::string &input, bool acceptSpaces=true)
int toInt(const std::string &input, bool acceptSpaces=false)
Atom * replaceAtomWithQueryAtom(RWMol *mol, Atom *atom)
T stripSpacesAndCast(const std::string &input, bool acceptSpaces=false)
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)
bool ParseV2000CTAB(std::istream *inStream, unsigned int &line, RWMol *mol, Conformer *&conf, bool &chiralityPossible, unsigned int &nAtoms, unsigned int &nBonds, bool strictParsing=true)
The class for representing atoms.