Grid#

cuest.bindings.cuestAtomGridCreate(
*,
handle: cuest.bindings.cuest.cuestHandle,
numRadialPoints: int,
radialNodes: list[float],
radialWeights: list[float],
numAngularPoints: list[int],
parameters: cuest.bindings.cuest.Parameters,
outAtomGrid: cuest.bindings.cuest.cuestAtomGridHandle,
) cuest.bindings.cuest.CuestStatus#

Create an atom grid object with specified parameters.

Parameters#

handle[in]cuestHandle

cuEST handle. Must not be NULL.

numRadialPoints[in]int

Number of radial points. Must be greater than zero.

radialNodes[in]List[float]

Location of radial nodes from the atom center, on the CPU (size: numRadialPoints). Must not be NULL.

radialWeights[in]List[float]

Quadrature weight of a radial point, radialWeights must be positive semidefinite, on the CPU (size: numRadialPoints).

numAngularPoints[in]List[int]

Number of angular points associated with a radial point, values must be Lebedev numbers, on the CPU (size: numRadialPoints).

parameters[in]CuestAtomGridParameters

Handle to CuestAtomGridParameters. Must not be NULL.

outAtomGrid[out]CuestAtomGridHandle

Pointer to output atom grid object; receives opaque handle on success. Must not be NULL.

Returns#

status[out]cuestStatus_t
cuest.bindings.cuestAtomGridDestroy(
*,
atomGrid: cuest.bindings.cuest.cuestAtomGridHandle,
) cuest.bindings.cuest.CuestStatus#

Frees all memory associated with the atom grid. After destruction, the grid handle must not be used.

Parameters#

atomGrid[in]cuestAtomGridHandle

Opaque atom grid handle to destroy. Must not be NULL.

Returns#

status[out]cuestStatus_t
cuest.bindings.cuestMolecularGridCreate(
*,
handle: cuest.bindings.cuest.cuestHandle,
numAtoms: int,
atomGrid: list[cuest.bindings.cuest.cuestAtomGridHandle],
xyz: list[float],
parameters: cuest.bindings.cuest.Parameters,
persistentWorkspace: int,
temporaryWorkspace: int,
outGrid: cuest.bindings.cuest.cuestMolecularGridHandle,
) cuest.bindings.cuest.CuestStatus#

Create a molecular grid object.

The molecular grid comprises multiple atom grids each at an atom center.

  • Each shell, and each array entry, must be valid.

  • The persistent and temporary workspaces must be provided and preallocated.

  • The output handle is only valid after successful creation.

Parameters#

handle[in]cuestHandle

cuEST handle. Must not be NULL.

numAtoms[in]int

Total number of atoms; must be greater than zero.

atomGrid[in]List[CuestAtomGridHandle]

Array of atom grid handles, length is numAtoms . Must not be NULL.

xyz[in]List[float]

Array of atomic Cartesian coordinates (size: numAtoms * 3) on the CPU. Data expected to be in row-major format: \([x_0,y_0,z_0,...]\). Must not be NULL.

parameters[in]CuestMolecularGridParameters

Handle to CuestMolecularGridParameters. Must not be NULL.

persistentWorkspace[in]Workspace

Pointer to preallocated workspace for persistent buffers. Must not be NULL.

temporaryWorkspace[in]Workspace

Pointer to preallocated workspace for temporary buffers. Must not be NULL.

outGrid[out]CuestMolecularGridHandle

Pointer for output molecular grid. Must not be NULL.

Returns#

status[out]cuestStatus_t
cuest.bindings.cuestMolecularGridCreateWorkspaceQuery(
*,
handle: cuest.bindings.cuest.cuestHandle,
numAtoms: int,
atomGrid: list[cuest.bindings.cuest.cuestAtomGridHandle],
xyz: list[float],
parameters: cuest.bindings.cuest.Parameters,
persistentWorkspaceDescriptor: int,
temporaryWorkspaceDescriptor: int,
outGrid: cuest.bindings.cuest.cuestMolecularGridHandle,
) cuest.bindings.cuest.CuestStatus#

Query workspace requirements for creating a molecular grid object.

This function simulates the allocation logic to determine necessary persistent and temporary buffer sizes.

Parameters#

handle[in]cuestHandle

cuEST handle. Must not be NULL.

numAtoms[in]int

Total number of atoms; must be greater than zero.

atomGrid[in]List[cuestAtomGridHandle]

Array of atom grid handles, length is numAtoms . Must not be NULL.

xyz[in]List[float]

Array of atomic Cartesian coordinates (size: numAtoms * 3) on the CPU. Data is expected to be row-major format: \([x_0,y_0,z_0,...]\). Must not be NULL.

parameters[in]CuestMolecularGridParameters

Handle to CuestMolecularGridParameters. Must not be NULL.

persistentWorkspaceDescriptor[out]WorkspaceDescriptor

Pointer to output workspace descriptor for persistent buffers. Must not be NULL.

temporaryWorkspaceDescriptor[out]WorkspaceDescriptor

Pointer to output workspace descriptor for temporary buffers. Must not be NULL.

outGrid[in]CuestMolecularGridHandle

Pointer for output molecular grid. May be NULL.

Returns#

status[out]cuestStatus_t
cuest.bindings.cuestMolecularGridDestroy(
*,
grid: cuest.bindings.cuest.cuestMolecularGridHandle,
) cuest.bindings.cuest.CuestStatus#

Destroy a molecular grid object.

Parameters#

grid[in]cuestMolecularGridHandle

Molecular grid handle to destroy. Must not be NULL.

Returns#

status[out]cuestStatus_t