Chemical Data Processing Library C++ API - Version 1.1.1
Public Member Functions | List of all members
CDPL::Chem::Hydrogen3DCoordinatesCalculator Class Reference

Hydrogen3DCoordinatesCalculator. More...

#include <Hydrogen3DCoordinatesCalculator.hpp>

Public Member Functions

 Hydrogen3DCoordinatesCalculator ()
 Constructs the Hydrogen3DCoordinatesCalculator instance. More...
 
 Hydrogen3DCoordinatesCalculator (const MolecularGraph &molgraph, Math::Vector3DArray &coords, bool undef_only=true)
 Constructs the Hydrogen3DCoordinatesCalculator instance and calculates 3D-coordinates for the hydrogen atoms of the molecular graph molgraph. More...
 
void undefinedOnly (bool undef_only)
 Allows to specify whether already defined hydrogen atom coordinates have to be recalculated or are left unchanged. More...
 
bool undefinedOnly () const
 Tells whether already defined hydrogen atom coordinates are recalculated or left unchanged. More...
 
void setAtom3DCoordinatesCheckFunction (const AtomPredicate &func)
 Specifies a function that tells whether 3D coordinates are available for it's argument atom. More...
 
const AtomPredicategetAtom3DCoordinatesCheckFunction () const
 Returns the function that was registered to determine whether for a given atom 3D coordinates are available. More...
 
void setAtom3DCoordinatesFunction (const Atom3DCoordinatesFunction &func)
 Specifies a function for the retrieval of atom 3D-coordinates. More...
 
const Atom3DCoordinatesFunctiongetAtom3DCoordinatesFunction () const
 Returns the function that was registered for the retrieval of atom 3D-coordinates. More...
 
void setup (const MolecularGraph &molgraph)
 
void calculate (const MolecularGraph &molgraph, Math::Vector3DArray &coords, bool init_coords=true)
 Calculates 3D-coordinates for the hydrogen atoms of the molecular graph molgraph. More...
 
void calculate (Math::Vector3DArray &coords, bool init_coords=true)
 

Detailed Description

Hydrogen3DCoordinatesCalculator.

Constructor & Destructor Documentation

◆ Hydrogen3DCoordinatesCalculator() [1/2]

CDPL::Chem::Hydrogen3DCoordinatesCalculator::Hydrogen3DCoordinatesCalculator ( )

Constructs the Hydrogen3DCoordinatesCalculator instance.

◆ Hydrogen3DCoordinatesCalculator() [2/2]

CDPL::Chem::Hydrogen3DCoordinatesCalculator::Hydrogen3DCoordinatesCalculator ( const MolecularGraph molgraph,
Math::Vector3DArray coords,
bool  undef_only = true 
)

Constructs the Hydrogen3DCoordinatesCalculator instance and calculates 3D-coordinates for the hydrogen atoms of the molecular graph molgraph.

The calculated coordinates can be retrieved by a call to getResult().

Parameters
molgraphThe molecular graph for which to calculate 3D-coordinates.
coordsAn array containing the heavy atom and calculated hydrogen 3D-coordinates. The coordinates are stored in the same order as the atoms appear in the atom list of the molecular graph (i.e. the coordinates of an atom are accessible via its index).
undef_onlySpecifies whether or not to recalculate already defined hydrogen atom coordinates.

Member Function Documentation

◆ undefinedOnly() [1/2]

void CDPL::Chem::Hydrogen3DCoordinatesCalculator::undefinedOnly ( bool  undef_only)

Allows to specify whether already defined hydrogen atom coordinates have to be recalculated or are left unchanged.

Parameters
undef_onlytrue if already defined hydrogen atom coordinates have to be left unchanged, and false otherwise.
Note
The default setting is to calculate coordinates only for hydrogens with not yet defined positions.

◆ undefinedOnly() [2/2]

bool CDPL::Chem::Hydrogen3DCoordinatesCalculator::undefinedOnly ( ) const

Tells whether already defined hydrogen atom coordinates are recalculated or left unchanged.

Returns
true if already defined hydrogen atom coordinates are left unchanged, and false otherwise.

◆ setAtom3DCoordinatesCheckFunction()

void CDPL::Chem::Hydrogen3DCoordinatesCalculator::setAtom3DCoordinatesCheckFunction ( const AtomPredicate func)

Specifies a function that tells whether 3D coordinates are available for it's argument atom.

Parameters
funcThe atom 3D coordinates check function.

◆ getAtom3DCoordinatesCheckFunction()

const AtomPredicate& CDPL::Chem::Hydrogen3DCoordinatesCalculator::getAtom3DCoordinatesCheckFunction ( ) const

Returns the function that was registered to determine whether for a given atom 3D coordinates are available.

Returns
The registered atom 3D coordinates check function.

◆ setAtom3DCoordinatesFunction()

void CDPL::Chem::Hydrogen3DCoordinatesCalculator::setAtom3DCoordinatesFunction ( const Atom3DCoordinatesFunction func)

Specifies a function for the retrieval of atom 3D-coordinates.

Parameters
funcThe atom 3D-coordinates function.

◆ getAtom3DCoordinatesFunction()

const Atom3DCoordinatesFunction& CDPL::Chem::Hydrogen3DCoordinatesCalculator::getAtom3DCoordinatesFunction ( ) const

Returns the function that was registered for the retrieval of atom 3D-coordinates.

Returns
The registered atom 3D-coordinates function.

◆ setup()

void CDPL::Chem::Hydrogen3DCoordinatesCalculator::setup ( const MolecularGraph molgraph)

◆ calculate() [1/2]

void CDPL::Chem::Hydrogen3DCoordinatesCalculator::calculate ( const MolecularGraph molgraph,
Math::Vector3DArray coords,
bool  init_coords = true 
)

Calculates 3D-coordinates for the hydrogen atoms of the molecular graph molgraph.

Parameters
molgraphThe molecular graph for which to calculate 3D-coordinates.
coordsAn array containing the heavy atom and calculated hydrogen 3D-coordinates. The coordinates are stored in the same order as the atoms appear in the atom list of the molecular graph (i.e. the coordinates of an atom are accessible via its index).
init_coordsIf false, defined atom coordinates are already present in coords and thus won't get assigned again.

◆ calculate() [2/2]

void CDPL::Chem::Hydrogen3DCoordinatesCalculator::calculate ( Math::Vector3DArray coords,
bool  init_coords = true 
)

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