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);
97 virtual void checkForEnd();
99 virtual void readMolProps(
ROMol *);
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);
141 ROMol * operator[](
unsigned int idx);
146 std::string getItemText(
unsigned int idx);
147 unsigned int length();
148 void setData(
const std::string &text,
bool sanitize=
true,
bool removeHs=
true);
160 void setStreamIndices(
const std::vector<std::streampos> &locs);
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);
231 ROMol * operator[](
unsigned int idx);
236 std::string getItemText(
unsigned int idx);
237 unsigned int length();
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);
306 ROMol * operator[](
unsigned int idx);
311 std::string getItemText(
unsigned int idx);
312 unsigned int length();
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();
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