10 #ifndef _RD_MOLSUPPLIER_H
11 #define _RD_MOLSUPPLIER_H
22 std::string
strip(
const std::string &orig);
50 virtual void init() = 0;
51 virtual void reset() = 0;
52 virtual bool atEnd() = 0;
80 bool sanitize=
true,
bool removeHs=
true,
81 bool strictParsing=
false);
128 explicit SDMolSupplier(
const std::string &fileName,
bool sanitize=
true,
129 bool removeHs=
true,
bool strictParsing=
true);
131 explicit SDMolSupplier(std::istream *inStream,
bool takeOwnership=
true,
132 bool sanitize=
true,
bool removeHs=
true,
bool strictParsing=
true);
140 void moveTo(
unsigned int idx);
148 void setData(
const std::string &text,
bool sanitize=
true,
bool removeHs=
true);
166 std::vector<std::streampos> d_molpos;
206 const std::string &delimiter=
" \t",
213 const std::string &delimiter=
" \t",
220 void setData(
const std::string &text,
221 const std::string &delimiter=
" ",
230 void moveTo(
unsigned int idx);
240 ROMol *processLine(std::string inLine);
241 void processTitleLine();
242 std::string nextLine();
243 long int skipComments();
250 std::vector<std::streampos> d_molpos;
251 std::vector<int> d_lineNums;
288 const std::string &nameRecord=
"",
289 int confId2D=-1,
int confId3D=0,
291 explicit TDTMolSupplier(std::istream *inStream,
bool takeOwnership=
true,
292 const std::string &nameRecord=
"",
293 int confId2D=-1,
int confId3D=0,
297 void setData(
const std::string &text,
298 const std::string &nameRecord=
"",
299 int confId2D=-1,
int confId3D=0,
305 void moveTo(
unsigned int idx);
315 bool advanceToNextRecord();
317 ROMol *parseMol(std::string inLine);
325 std::vector<std::streampos> d_molpos;
327 std::string d_nameProp;
333 explicit PDBMolSupplier(std::istream *inStream,
bool takeOwnership=
true,
334 bool sanitize=
true,
bool removeHs=
true,
335 unsigned int flavor=0);
337 bool sanitize=
true,
bool removeHs=
true,
338 unsigned int flavor=0);
346 virtual void reset();
348 virtual bool atEnd();
void setData(const std::string &text, bool sanitize=true, bool removeHs=true)
std::string getItemText(unsigned int idx)
returns the text block for a particular item
ROMol * removeHs(const ROMol &mol, bool implicitOnly=false, bool updateExplicitCount=false, bool sanitize=true)
returns a copy of a molecule with hydrogens removed
void moveTo(unsigned int idx)
void setStreamIndices(const std::vector< std::streampos > &locs)
std::string getItemText(unsigned int idx)
returns the text block for a particular item
virtual ~PDBMolSupplier()
lazy file parser for TDT files
Defines the primary molecule class ROMol as well as associated typedefs.
virtual void checkForEnd()
std::string getItemText(unsigned int idx)
returns the text block for a particular item
virtual void readMolProps(ROMol *)
ROMol is a molecule class that is intended to have a fixed topology.
virtual ~ForwardSDMolSupplier()
std::string strip(const std::string &orig)
PDBMolSupplier(std::istream *inStream, bool takeOwnership=true, bool sanitize=true, bool removeHs=true, unsigned int flavor=0)
void moveTo(unsigned int idx)
void moveTo(unsigned int idx)
ROMol * operator[](unsigned int idx)
void setData(const std::string &text, const std::string &nameRecord="", int confId2D=-1, int confId3D=0, bool sanitize=true)
std::istream * dp_inStream
Includes a bunch of functionality for handling Atom and Bond queries.
void setData(const std::string &text, const std::string &delimiter=" ", int smilesColumn=0, int nameColumn=1, bool titleLine=true, bool sanitize=true)
lazy file parser for Smiles tables
ROMol * operator[](unsigned int idx)
ROMol * operator[](unsigned int idx)
lazy file parser for PDB files
std::vector< std::string > STR_VECT