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);
37 std::string
getV3000Line(std::istream *inStream,
unsigned int &line);
42 bool &chiralityPossible,
43 unsigned int &nAtoms,
unsigned int &nBonds,
44 bool strictParsing=
true,
bool expectMEND=
true);
49 bool &chiralityPossible,
50 unsigned int &nAtoms,
unsigned int &nBonds,
51 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.