RDKit: RDKit::TDTWriter Class Reference

| RDKit Open-source cheminformatics and machine learning.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
RDKit::TDTWriter Class Reference

`#include <MolWriters.h>`

Inheritance diagram for RDKit::TDTWriter:

## Public Member Functions
| TDTWriter (const std::string &fileName)
| TDTWriter (std::ostream *outStream, bool takeOwnership=false)
| ~TDTWriter ()
void | setProps (const STR_VECT &propNames)
| set a vector of property names that are need to be written out for each molecule More...
void | write (const ROMol &mol, int confId=defaultConfId)
| write a new molecule to the file More...
void | flush ()
| flush the ostream More...
void | close ()
| close our stream (the writer cannot be used again) More...
unsigned int | numMols () const
| get the number of molecules written so far More...
void | setWrite2D (bool state=true)
bool | getWrite2D () const
void | setWriteNames (bool state=true)
bool | getWriteNames () const
void | setNumDigits (unsigned int numDigits)
unsigned int | getNumDigits () const
Public Member Functions inherited from RDKit::MolWriter
virtual | ~MolWriter ()

## Detailed Description

The TDTWriter is for writing molecules and properties to TDT files

Definition at line 201 of file MolWriters.h.

## Constructor & Destructor Documentation

RDKit::TDTWriter::TDTWriter | ( | const std::string & | fileName | ) |

Parameters

  fileName | : filename to write to ("-" to write to stdout)

RDKit::TDTWriter::TDTWriter | ( | std::ostream * | outStream,
|  | bool | takeOwnership = `false`
| ) |  |

RDKit::TDTWriter::~TDTWriter | ( |  | ) |

## Member Function Documentation

void RDKit::TDTWriter::close | ( |  | ) |
| inlinevirtual

close our stream (the writer cannot be used again)

Implements RDKit::MolWriter.

Definition at line 240 of file MolWriters.h.

References flush().

void RDKit::TDTWriter::flush | ( |  | ) |
| inlinevirtual

flush the ostream

Implements RDKit::MolWriter.

Definition at line 226 of file MolWriters.h.

References PRECONDITION.

Referenced by close().

unsigned int RDKit::TDTWriter::getNumDigits | ( |  | ) | const
| inline

Definition at line 260 of file MolWriters.h.

bool RDKit::TDTWriter::getWrite2D | ( |  | ) | const
| inline

Definition at line 254 of file MolWriters.h.

bool RDKit::TDTWriter::getWriteNames | ( |  | ) | const
| inline

Definition at line 257 of file MolWriters.h.

unsigned int RDKit::TDTWriter::numMols | ( |  | ) | const
| inlinevirtual

get the number of molecules written so far

Implements RDKit::MolWriter.

Definition at line 251 of file MolWriters.h.

void RDKit::TDTWriter::setNumDigits | ( | unsigned int | numDigits | ) |
| inline

Definition at line 259 of file MolWriters.h.

void RDKit::TDTWriter::setProps | ( | const STR_VECT & | propNames | ) |
| virtual

set a vector of property names that are need to be written out for each molecule

Implements RDKit::MolWriter.

void RDKit::TDTWriter::setWrite2D | ( | bool | state = `true` | ) |
| inline

Definition at line 253 of file MolWriters.h.

void RDKit::TDTWriter::setWriteNames | ( | bool | state = `true` | ) |
| inline

Definition at line 256 of file MolWriters.h.

void RDKit::TDTWriter::write | ( | const ROMol & | mol,
|  | int | confId = `defaultConfId`
| ) |  |
| virtual

write a new molecule to the file

Implements RDKit::MolWriter.

The documentation for this class was generated from the following file:

- MolWriters.h