Chemical Data Processing Library Python API - Version 1.1.1
Public Member Functions | Properties | List of all members
CDPL.Chem.Hydrogen3DCoordinatesCalculator Class Reference

Hydrogen3DCoordinatesCalculator. More...

+ Inheritance diagram for CDPL.Chem.Hydrogen3DCoordinatesCalculator:

Public Member Functions

None __init__ ()
 Constructs the Hydrogen3DCoordinatesCalculator instance.
 
None __init__ (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...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
None undefinedOnly (bool undef_only)
 Allows to specify whether already defined hydrogen atom coordinates have to be recalculated or are left unchanged. More...
 
bool undefinedOnly ()
 Tells whether already defined hydrogen atom coordinates are recalculated or left unchanged. More...
 
None setAtom3DCoordinatesFunction (Atom3DCoordinatesFunction func)
 Specifies a function for the retrieval of atom 3D-coordinates. More...
 
Atom3DCoordinatesFunction getAtom3DCoordinatesFunction ()
 Returns the function that was registered for the retrieval of atom 3D-coordinates. More...
 
None setAtom3DCoordinatesCheckFunction (AtomPredicate func)
 Specifies a function that tells whether 3D coordinates are available for it's argument atom. More...
 
AtomPredicate getAtom3DCoordinatesCheckFunction ()
 Returns the function that was registered to determine whether for a given atom 3D coordinates are available. More...
 
None setup (MolecularGraph molgraph)
 
None calculate (MolecularGraph molgraph, Math.Vector3DArray coords, bool init_coords=True)
 Calculates 3D-coordinates for the hydrogen atoms of the molecular graph molgraph. More...
 
None calculate (Math.Vector3DArray coords, bool init_coords=True)
 

Properties

 objectID = property(getObjectID)
 
 undefOnly = property(undefinedOnly, undefinedOnly)
 
 atomCoordsFunction = property(getAtom3DCoordinatesFunction, setAtom3DCoordinatesCheckFunction)
 
 atomCoordsCheckFunction = property(getAtom3DCoordinatesCheckFunction, setAtom3DCoordinatesCheckFunction)
 

Detailed Description

Hydrogen3DCoordinatesCalculator.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Chem.Hydrogen3DCoordinatesCalculator.__init__ ( 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

◆ getObjectID()

int CDPL.Chem.Hydrogen3DCoordinatesCalculator.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python Hydrogen3DCoordinatesCalculator instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two Hydrogen3DCoordinatesCalculator instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().

Returns
The numeric ID of the internally referenced C++ class instance.

◆ undefinedOnly() [1/2]

None 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 ( )

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.

◆ setAtom3DCoordinatesFunction()

None CDPL.Chem.Hydrogen3DCoordinatesCalculator.setAtom3DCoordinatesFunction ( Atom3DCoordinatesFunction  func)

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

Parameters
funcThe atom 3D-coordinates function.

◆ getAtom3DCoordinatesFunction()

Atom3DCoordinatesFunction CDPL.Chem.Hydrogen3DCoordinatesCalculator.getAtom3DCoordinatesFunction ( )

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

Returns
The registered atom 3D-coordinates function.

◆ setAtom3DCoordinatesCheckFunction()

None CDPL.Chem.Hydrogen3DCoordinatesCalculator.setAtom3DCoordinatesCheckFunction ( 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()

AtomPredicate CDPL.Chem.Hydrogen3DCoordinatesCalculator.getAtom3DCoordinatesCheckFunction ( )

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.

◆ setup()

None CDPL.Chem.Hydrogen3DCoordinatesCalculator.setup ( MolecularGraph  molgraph)
Parameters
molgraph

◆ calculate() [1/2]

None CDPL.Chem.Hydrogen3DCoordinatesCalculator.calculate ( 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]

None CDPL.Chem.Hydrogen3DCoordinatesCalculator.calculate ( Math.Vector3DArray  coords,
bool   init_coords = True 
)
Parameters
coords
init_coords