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);
99 virtual void checkForEnd();
101 virtual void readMolProps(
ROMol *);
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);
146 ROMol *operator[](
unsigned int idx);
151 std::string getItemText(
unsigned int idx);
152 unsigned int length();
153 void setData(
const std::string &text,
bool sanitize =
true,
155 void setData(
const std::string &text,
bool sanitize,
bool removeHs,
170 void setStreamIndices(
const std::vector<std::streampos> &locs);
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);
233 ROMol *operator[](
unsigned int idx);
238 std::string getItemText(
unsigned int idx);
239 unsigned int length();
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);
304 ROMol *operator[](
unsigned int idx);
309 std::string getItemText(
unsigned int idx);
310 unsigned int length();
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();
ROMol * removeHs(const ROMol &mol, bool implicitOnly=false, bool updateExplicitCount=false, bool sanitize=true)
returns a copy of a molecule with hydrogens removed
virtual ~PDBMolSupplier()
lazy file parser for TDT files
Defines the primary molecule class ROMol as well as associated typedefs.
ROMol is a molecule class that is intended to have a fixed topology.
virtual ~ForwardSDMolSupplier()
std::string strip(const std::string &orig)
std::istream * dp_inStream
Includes a bunch of functionality for handling Atom and Bond queries.
lazy file parser for Smiles tables
lazy file parser for PDB files
std::vector< std::string > STR_VECT