RDKit: RDKit::TDTWriter Class Reference

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
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 () override
void | setProps (const STR_VECT &propNames) override
| set a vector of property names that are need to be written out for each molecule
void | write (const ROMol &mol, int confId=defaultConfId) override
| write a new molecule to the file
void | flush () override
| flush the ostream
void | close () override
| close our stream (the writer cannot be used again)
unsigned int | numMols () const override
| get the number of molecules written so far
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 218 of file MolWriters.h.

## Constructor & Destructor Documentation

## ◆ TDTWriter() [1/2]

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

Parameters

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

## ◆ TDTWriter() [2/2]

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

## ◆ ~TDTWriter()

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

## Member Function Documentation

## ◆ close()

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

close our stream (the writer cannot be used again)

Implements RDKit::MolWriter.

Definition at line 258 of file MolWriters.h.

References flush().

## ◆ flush()

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

flush the ostream

Implements RDKit::MolWriter.

Definition at line 243 of file MolWriters.h.

References PRECONDITION.

Referenced by close().

## ◆ getNumDigits()

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

Definition at line 283 of file MolWriters.h.

## ◆ getWrite2D()

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

Definition at line 277 of file MolWriters.h.

## ◆ getWriteNames()

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

Definition at line 280 of file MolWriters.h.

## ◆ numMols()

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

get the number of molecules written so far

Implements RDKit::MolWriter.

Definition at line 274 of file MolWriters.h.

## ◆ setNumDigits()

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

Definition at line 282 of file MolWriters.h.

## ◆ setProps()

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

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

Implements RDKit::MolWriter.

## ◆ setWrite2D()

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

Definition at line 276 of file MolWriters.h.

## ◆ setWriteNames()

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

Definition at line 279 of file MolWriters.h.

## ◆ write()

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

write a new molecule to the file

Implements RDKit::MolWriter.

References RDKit::defaultConfId.

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

- MolWriters.h