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;
81 bool takeOwnership =
true,
bool sanitize =
true,
83 bool strictParsing =
false);
133 explicit SDMolSupplier(
const std::string &fileName,
bool sanitize =
true,
134 bool removeHs =
true,
bool strictParsing =
true);
136 explicit SDMolSupplier(std::istream *inStream,
bool takeOwnership =
true,
137 bool sanitize =
true,
bool removeHs =
true,
138 bool strictParsing =
true);
145 void moveTo(
unsigned int idx);
153 void setData(
const std::string &text,
bool sanitize =
true,
174 void setDataCommon(
const std::string &text,
bool sanitize,
bool removeHs);
177 std::vector<std::streampos> d_molpos;
215 const std::string &delimiter =
" \t",
216 int smilesColumn = 0,
int nameColumn = 1,
217 bool titleLine =
true,
bool sanitize =
true);
220 const std::string &delimiter =
" \t",
221 int smilesColumn = 0,
int nameColumn = 1,
222 bool titleLine =
true,
bool sanitize =
true);
225 void setData(
const std::string &text,
const std::string &delimiter =
" ",
226 int smilesColumn = 0,
int nameColumn = 1,
bool titleLine =
true,
227 bool sanitize =
true);
232 void moveTo(
unsigned int idx);
242 ROMol *processLine(std::string inLine);
243 void processTitleLine();
244 std::string nextLine();
245 long int skipComments();
252 std::vector<std::streampos>
254 std::vector<int> d_lineNums;
290 const std::string &nameRecord =
"",
int confId2D = -1,
291 int confId3D = 0,
bool sanitize =
true);
292 explicit TDTMolSupplier(std::istream *inStream,
bool takeOwnership =
true,
293 const std::string &nameRecord =
"",
int confId2D = -1,
294 int confId3D = 0,
bool sanitize =
true);
297 void setData(
const std::string &text,
const std::string &nameRecord =
"",
298 int confId2D = -1,
int confId3D = 0,
bool sanitize =
true);
303 void moveTo(
unsigned int idx);
313 bool advanceToNextRecord();
315 ROMol *parseMol(std::string inLine);
323 std::vector<std::streampos>
326 std::string d_nameProp;
332 explicit PDBMolSupplier(std::istream *inStream,
bool takeOwnership =
true,
333 bool sanitize =
true,
bool removeHs =
true,
334 unsigned int flavor = 0);
335 explicit PDBMolSupplier(
const std::string &fname,
bool sanitize =
true,
336 bool removeHs =
true,
unsigned int flavor = 0);
343 virtual void reset();
345 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