Hydrogen3DCoordinatesCalculator.
More...
◆ __init__()
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
-
molgraph | The molecular graph for which to calculate 3D-coordinates. |
coords | An 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_only | Specifies whether or not to recalculate already defined hydrogen atom coordinates. |
◆ 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_only | True 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()
Specifies a function for the retrieval of atom 3D-coordinates.
- Parameters
-
func | The atom 3D-coordinates function. |
◆ 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
-
func | The 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 | ) |
|
◆ calculate() [1/2]
Calculates 3D-coordinates for the hydrogen atoms of the molecular graph molgraph.
- Parameters
-
molgraph | The molecular graph for which to calculate 3D-coordinates. |
coords | An 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_coords | If 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 |
|
) |
| |