Loading...
Searching...
No Matches
UniqueTautomerFunctor Class Referenceabstract

`#include <tautomer.h>`

Inheritance diagram for UniqueTautomerFunctor:
[legend]

## Public Member Functions

virtual | ~UniqueTautomerFunctor ()
void | operator() (OBMol *mol)
virtual void | operator() (OBMol *mol, const std::string &smiles)=0

## Detailed Description

Functor for tautomer enumeration algorithm. Subclass this class to write your own functor. This functor will be called for every unique tautomer that is found.

Example to write all unique tautomer smiles to std::cout:

class WriteSmilesFunctor : public UniqueTautomerFunctor
{
public:
void operator()(OBMol *mol, const std::string &smiles)
{
std::cout << smiles << std::endl;
}
};
OpenBabel::OBMol
Molecule Class.
Definition mol.h:121
OpenBabel::UniqueTautomerFunctor
Definition tautomer.h:105
OpenBabel::UniqueTautomerFunctor::operator()
void operator()(OBMol *mol)
Definition tautomer.cpp:856

This functor can be used in the following way:

OBMol mol;
...
WriteSmilesFunctor functor;
// write all unique tautomers to std::cout
EnumerateTautomers(mol, functor);
OpenBabel::EnumerateTautomers
void EnumerateTautomers(OBMol *mol, TautomerFunctor &functor)
Definition tautomer.cpp:870

## Constructor & Destructor Documentation

## ~UniqueTautomerFunctor()

virtual ~UniqueTautomerFunctor | ( |  | ) |

inline virtual

## Member Function Documentation

## operator()() [1/2]

void operator() | ( | OBMol * | mol | ) |

virtual

This function is called every time a tautomer is discovered.

Parameters

  mol | The tautomer.

Implements TautomerFunctor.

Referenced by operator()().

## operator()() [2/2]

virtual void operator() | ( | OBMol * | mol,
|  | const std::string & | smiles )

pure virtual

This function is called every time a unique tautomer is discovered.

Parameters

  mol | The tautomer.
  smiles | The canonical SMILES for the tautomer.

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

- tautomer.h
- tautomer.cpp