Chemical Data Processing Library Python API - Version 1.4.0
Public Member Functions | Properties | List of all members
CDPL.GRAIL.AtomDensityGridCalculator Class Reference

Calculator that fills a spatial grid with combined per-atom density contributions. More...

+ Inheritance diagram for CDPL.GRAIL.AtomDensityGridCalculator:

Public Member Functions

None __init__ ()
 Constructs the AtomDensityGridCalculator instance.
 
None __init__ (Chem.DoubleVector3D2AtomFunctor func)
 Constructs the AtomDensityGridCalculator instance with the given density function. More...
 
None __init__ (Chem.DoubleVector3D2AtomFunctor density_func, Math.DoubleDVectorFunctor comb_func)
 Constructs the AtomDensityGridCalculator instance with the given density and density-combination functions. More...
 
None __init__ (AtomDensityGridCalculator calc)
 Constructs a copy of the AtomDensityGridCalculator instance calc. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
AtomDensityGridCalculator assign (AtomDensityGridCalculator calc)
 Copy assignment operator. More...
 
None setDistanceCutoff (float dist)
 Sets the distance cutoff beyond which atoms are not considered. More...
 
float getDistanceCutoff ()
 Returns the currently configured distance cutoff. More...
 
Chem.DoubleVector3D2AtomFunctor getDensityFunction ()
 Returns the currently configured density function. More...
 
None setDensityFunction (Chem.DoubleVector3D2AtomFunctor func)
 Sets the density function used to evaluate per-atom contributions. More...
 
None setDensityCombinationFunction (Math.DoubleDVectorFunctor func)
 Sets the function used to combine per-atom density contributions. More...
 
Math.DoubleDVectorFunctor getDensityCombinationFunction ()
 Returns the currently configured density-combination function. More...
 
None setAtom3DCoordinatesFunction (Chem.Atom3DCoordinatesFunction func)
 Specifies a function for the retrieval of atom 3D-coordinates for grid calculation. More...
 
Chem.Atom3DCoordinatesFunction getAtom3DCoordinatesFunction ()
 Returns the function used for the retrieval of atom 3D-coordinates. More...
 
None calculate (Chem.AtomContainer atoms, Grid.DSpatialGrid grid)
 Calculates the combined per-atom density at each cell of grid for the given atoms. More...
 

Properties

 objectID = property(getObjectID)
 
 distanceCutoff = property(getDistanceCutoff, setDistanceCutoff)
 
 densityFunction = property(getDensityFunction, setDensityFunction)
 
 densityCombFunction = property(getDensityCombinationFunction, setDensityCombinationFunction)
 
 atomCoordsFunction = property(getAtom3DCoordinatesFunction, setAtom3DCoordinatesFunction)
 

Detailed Description

Calculator that fills a spatial grid with combined per-atom density contributions.

For each grid cell, the density contributions of all atoms within the configured cutoff distance are evaluated using a user-supplied density function and combined into a single cell value via a user-supplied combination function (defaulting to a sum).

Constructor & Destructor Documentation

◆ __init__() [1/3]

None CDPL.GRAIL.AtomDensityGridCalculator.__init__ ( Chem.DoubleVector3D2AtomFunctor  func)

Constructs the AtomDensityGridCalculator instance with the given density function.

Parameters
funcThe density function.

◆ __init__() [2/3]

None CDPL.GRAIL.AtomDensityGridCalculator.__init__ ( Chem.DoubleVector3D2AtomFunctor  density_func,
Math.DoubleDVectorFunctor  comb_func 
)

Constructs the AtomDensityGridCalculator instance with the given density and density-combination functions.

Parameters
density_funcThe density function.
comb_funcThe function used to combine per-atom density contributions.

◆ __init__() [3/3]

None CDPL.GRAIL.AtomDensityGridCalculator.__init__ ( AtomDensityGridCalculator  calc)

Constructs a copy of the AtomDensityGridCalculator instance calc.

Parameters
calcThe AtomDensityGridCalculator to copy.

Member Function Documentation

◆ getObjectID()

int CDPL.GRAIL.AtomDensityGridCalculator.getObjectID ( )

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

Different Python AtomDensityGridCalculator 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 AtomDensityGridCalculator 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.

◆ assign()

AtomDensityGridCalculator CDPL.GRAIL.AtomDensityGridCalculator.assign ( AtomDensityGridCalculator  calc)

Copy assignment operator.

Parameters
calcThe other AtomDensityGridCalculator instance.
Returns
self

◆ setDistanceCutoff()

None CDPL.GRAIL.AtomDensityGridCalculator.setDistanceCutoff ( float  dist)

Sets the distance cutoff beyond which atoms are not considered.

Parameters
distThe cutoff distance.

◆ getDistanceCutoff()

float CDPL.GRAIL.AtomDensityGridCalculator.getDistanceCutoff ( )

Returns the currently configured distance cutoff.

Returns
The configured cutoff distance.

◆ getDensityFunction()

Chem.DoubleVector3D2AtomFunctor CDPL.GRAIL.AtomDensityGridCalculator.getDensityFunction ( )

Returns the currently configured density function.

Returns
The configured density function.

◆ setDensityFunction()

None CDPL.GRAIL.AtomDensityGridCalculator.setDensityFunction ( Chem.DoubleVector3D2AtomFunctor  func)

Sets the density function used to evaluate per-atom contributions.

Parameters
funcThe density function.

◆ setDensityCombinationFunction()

None CDPL.GRAIL.AtomDensityGridCalculator.setDensityCombinationFunction ( Math.DoubleDVectorFunctor  func)

Sets the function used to combine per-atom density contributions.

Parameters
funcThe density-combination function.

◆ getDensityCombinationFunction()

Math.DoubleDVectorFunctor CDPL.GRAIL.AtomDensityGridCalculator.getDensityCombinationFunction ( )

Returns the currently configured density-combination function.

Returns
The configured density-combination function.

◆ setAtom3DCoordinatesFunction()

None CDPL.GRAIL.AtomDensityGridCalculator.setAtom3DCoordinatesFunction ( Chem.Atom3DCoordinatesFunction  func)

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

Parameters
funcThe atom 3D-coordinates function.

◆ getAtom3DCoordinatesFunction()

Chem.Atom3DCoordinatesFunction CDPL.GRAIL.AtomDensityGridCalculator.getAtom3DCoordinatesFunction ( )

Returns the function used for the retrieval of atom 3D-coordinates.

Returns
The configured atom 3D-coordinates function.

◆ calculate()

None CDPL.GRAIL.AtomDensityGridCalculator.calculate ( Chem.AtomContainer  atoms,
Grid.DSpatialGrid  grid 
)

Calculates the combined per-atom density at each cell of grid for the given atoms.

Parameters
atomsThe atoms contributing to the density.
gridThe output grid populated with per-cell density values.