11 #ifndef _RD_MOLWRITERS_H_ 12 #define _RD_MOLWRITERS_H_ 26 virtual void write(
const ROMol &mol,
int confId=defaultConfId) = 0;
27 virtual void flush() = 0;
28 virtual void close() = 0;
30 virtual unsigned int numMols()
const =0;
55 std::string delimiter=
" ",
56 std::string nameHeader=
"Name",
57 bool includeHeader=
true,
58 bool isomericSmiles=
false,
59 bool kekuleSmiles=
false);
62 std::string delimiter=
" ",
63 std::string nameHeader=
"Name",
64 bool includeHeader=
true,
65 bool takeOwnership=
false,
66 bool isomericSmiles=
false,
67 bool kekuleSmiles=
false);
76 void write(
const ROMol &mol,
int confId=defaultConfId);
96 unsigned int numMols()
const {
return d_molid;} ;
100 void init(std::string delimiter,std::string nameHeader,
107 void dumpHeader()
const;
110 std::ostream *dp_ostream;
112 bool df_includeHeader;
113 unsigned int d_molid;
115 std::string d_nameHeader;
117 bool df_isomericSmiles;
118 bool df_kekuleSmiles;
136 SDWriter(std::ostream *outStream,
bool takeOwnership=
false);
145 void write(
const ROMol &mol,
int confId=defaultConfId);
165 unsigned int numMols()
const {
return d_molid; };
174 void writeProperty(
const ROMol &mol, std::string name);
176 std::ostream *dp_ostream;
178 unsigned int d_molid;
198 TDTWriter(std::ostream *outStream,
bool takeOwnership=
false);
207 void write(
const ROMol &mol,
int confId=defaultConfId);
227 unsigned int numMols()
const {
return d_molid; };
239 void writeProperty(
const ROMol &mol, std::string name);
241 std::ostream *dp_ostream;
243 unsigned int d_molid;
247 unsigned int d_numDigits;
254 PDBWriter(std::string fileName,
unsigned int flavor = 0);
255 PDBWriter(std::ostream *outStream,
bool takeOwnership=
false,
256 unsigned int flavor = 0);
260 void write(
const ROMol &mol,
int confId=defaultConfId);
282 unsigned int numMols()
const {
return d_count;} ;
285 std::ostream *dp_ostream;
286 unsigned int d_flavor;
287 unsigned int d_count;
void close()
close our stream (the writer cannot be used again)
void setProps(const STR_VECT &)
bool getWriteNames() const
void close()
close our stream (the writer cannot be used again)
virtual unsigned int numMols() const =0
void flush()
flush the ostream
void flush()
flush the ostream
Defines the primary molecule class ROMol as well as associated typedefs.
void close()
close our stream (the writer cannot be used again)
void close()
close our stream (the writer cannot be used again)
ROMol is a molecule class that is intended to have a fixed topology.
unsigned int numMols() const
get the number of molecules written so far
bool getForceV3000() const
void flush()
flush the ostream
unsigned int numMols() const
get the number of molecules written so far
void setNumDigits(unsigned int numDigits)
void setWriteNames(bool state=true)
virtual void setProps(const STR_VECT &propNames)=0
void setForceV3000(bool val)
Includes a bunch of functionality for handling Atom and Bond queries.
unsigned int getNumDigits() const
virtual void write(const ROMol &mol, int confId=defaultConfId)=0
unsigned int numMols() const
get the number of molecules written so far
#define PRECONDITION(expr, mess)
void setWrite2D(bool state=true)
unsigned int numMols() const
get the number of molecules written so far
void flush()
flush the ostream
std::vector< std::string > STR_VECT
void setKekulize(bool val)