10 #ifndef _RD_FILEPARSERUTILS_H 11 #define _RD_FILEPARSERUTILS_H 15 #include <boost/lexical_cast.hpp> 16 #include <boost/algorithm/string.hpp> 22 namespace FileParserUtils {
25 std::string trimmed = boost::trim_copy(input);
26 if (acceptSpaces && trimmed ==
"") {
29 return boost::lexical_cast<T>(trimmed);
32 int toInt(
const std::string &input,
bool acceptSpaces =
false);
33 double toDouble(
const std::string &input,
bool acceptSpaces =
true);
36 std::string
getV3000Line(std::istream *inStream,
unsigned int &line);
40 Conformer *&conf,
bool &chiralityPossible,
41 unsigned int &nAtoms,
unsigned int &nBonds,
42 bool strictParsing =
true,
bool expectMEND =
true);
46 Conformer *&conf,
bool &chiralityPossible,
47 unsigned int &nAtoms,
unsigned int &nBonds,
48 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)
Includes a bunch of functionality for handling Atom and Bond queries.
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.