Grid#

group Grid

Functions

cuestStatus_t cuestAtomGridCreate(
cuestHandle_t handle,
uint64_t numRadialPoints,
const double *radialNodes,
const double *radialWeights,
const uint64_t *numAngularPoints,
const cuestAtomGridParameters_t parameters,
cuestAtomGrid_t *outAtomGrid
)#

Create an atom grid object with specified parameters.

Parameters:
  • handle[in] cuEST handle. Must not be NULL.

  • numRadialPoints[in] Number of radial points. Must be greater than zero.

  • radialNodes[in] Location of radial nodes from the atom center (size: numRadialPoints) on the CPU. Must not be NULL.

  • radialWeights[in] Pointer to array containing quadrature weights of a radial point (size: numRadialPoints) on the CPU. Elements must be positive semidefinite . Must not be NULL.

  • numAngularPoints[in] Pointer to array containing number of angular points associated with a radial point (size: numRadialPoints) on the CPU. Values must be Lebedev numbers. Must not be NULL.

  • parameters[in] Handle to cuestAtomGridParameters_t. Must not be NULL.

  • outAtomGrid[out] Pointer to output atom grid object; receives opaque handle on success. Must not be NULL.

Returns:

  • CUEST_STATUS_SUCCESS on success;

  • CUEST_STATUS_INVALID_HANDLE if the cuEST handle is NULL;

  • CUEST_STATUS_NULL_POINTER if any required pointer is NULL;

  • CUEST_STATUS_INVALID_TYPE if the cuEST handle or parameters are not of the correct type.

  • CUEST_STATUS_INVALID_ARGUMENT if numRadialPoints is zero;

  • CUEST_STATUS_EXCEPTION for unexpected error;

  • CUEST_STATUS_UNKNOWN_ERROR for non-std exceptions.

cuestStatus_t cuestAtomGridDestroy(cuestAtomGrid_t atomGrid)#

Destroy/free an atom grid object created with cuestAtomGridCreate.

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

Parameters:

atomGrid[in] Opaque atom grid handle to destroy. Must not be NULL.

Returns:

  • CUEST_STATUS_SUCCESS on success;

  • CUEST_STATUS_NULL_POINTER if atomGrid is NULL;

  • CUEST_STATUS_INVALID_TYPE if atomGrid is not of type cuestAtomGrid_t.

  • CUEST_STATUS_EXCEPTION or CUEST_STATUS_UNKNOWN_ERROR on error.

cuestStatus_t cuestMolecularGridCreate(
cuestHandle_t handle,
uint64_t numAtoms,
const cuestAtomGrid_t *atomGrid,
const double *xyz,
const cuestMolecularGridParameters_t parameters,
cuestWorkspace_t *persistentWorkspace,
cuestWorkspace_t *temporaryWorkspace,
cuestMolecularGrid_t *outGrid
)#

Create a molecular grid object.

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

  • All buffer pointers must be valid (not NULL).

  • 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] cuEST handle. Must not be NULL.

  • numAtoms[in] Total number of atoms; must be greater than zero.

  • atomGrid[in] Array of atom grid handles (size: numAtoms). CPU array, must not be NULL and no elements of the array may be NULL.

  • xyz[in] Array of atomic Cartesian coordinates (size: numAtoms * 3) on the CPU. Ordering of elements is row-major: \( [x_0, y_0, z_0, ...] \). Must not be NULL.

  • parameters[in] Handle to cuestMolecularGridParameters_t. Must not be NULL.

  • persistentWorkspace[in] Pointer to preallocated workspace for persistent buffers. Must not be NULL.

  • temporaryWorkspace[in] Pointer to preallocated workspace for temporary buffers. Must not be NULL.

  • outGrid[out] Pointer for output molecular grid. Must not be NULL.

Returns:

  • CUEST_STATUS_SUCCESS on success;

  • CUEST_STATUS_INVALID_HANDLE if the cuEST handle is NULL;

  • CUEST_STATUS_NULL_POINTER if any pointer parameter is NULL;

  • CUEST_STATUS_INVALID_TYPE if the cuEST handle, parameters or atom grids are not of the correct type;

  • CUEST_STATUS_INVALID_ARGUMENT if numAtoms is zero;

  • CUEST_STATUS_EXCEPTION or CUEST_STATUS_UNKNOWN_ERROR on error.

cuestStatus_t cuestMolecularGridCreateWorkspaceQuery(
cuestHandle_t handle,
uint64_t numAtoms,
const cuestAtomGrid_t *atomGrid,
const double *xyz,
const cuestMolecularGridParameters_t parameters,
cuestWorkspaceDescriptor_t *persistentWorkspaceDescriptor,
cuestWorkspaceDescriptor_t *temporaryWorkspaceDescriptor,
cuestMolecularGrid_t *outGrid
)#

Query workspace requirements for creating a molecular grid object.

This function simulates the allocation logic to determine necessary persistent and temporary buffer sizes. All buffer pointers and arrays must be valid.

Parameters:
  • handle[in] cuEST handle. Must not be NULL.

  • numAtoms[in] Total number of atoms; must be greater than zero.

  • atomGrid[in] Flat array of atom grid handles (size: numAtoms). CPU array, must not be NULL and no elements of the array may be NULL.

  • xyz[in] Array of atomic Cartesian coordinates (size: numAtoms * 3) on the CPU. Ordering of elements is row-major: \( [x_0, y_0, z_0, ...] \). Must not be NULL.

  • parameters[in] Handle to cuestMolecularGridParameters_t. Must not be NULL.

  • persistentWorkspaceDescriptor[out] Output descriptor for persistent buffer sizing. Must not be NULL.

  • temporaryWorkspaceDescriptor[out] Output descriptor for temporary buffer sizing. Must not be NULL.

  • outGrid[in] Pointer for output molecular grid. May be NULL.

Returns:

  • CUEST_STATUS_SUCCESS on success;

  • CUEST_STATUS_INVALID_HANDLE if the cuEST handle is NULL;

  • CUEST_STATUS_NULL_POINTER if any required pointer is NULL;

  • CUEST_STATUS_INVALID_TYPE if the cuEST handle, parameters or atom grids are not of the correct type;

  • CUEST_STATUS_INVALID_ARGUMENT if numAtoms is zero;

  • CUEST_STATUS_EXCEPTION or CUEST_STATUS_UNKNOWN_ERROR for other errors.

cuestStatus_t cuestMolecularGridDestroy(cuestMolecularGrid_t grid)#

Destroy/free a molecular grid object and all associated resources.

After this function is called, the grid handle must not be used.

Parameters:

grid[in] Molecular grid handle to destroy; must not be NULL.

Returns:

  • CUEST_STATUS_SUCCESS on success;

  • CUEST_STATUS_NULL_POINTER if grid is NULL;

  • CUEST_STATUS_INVALID_TYPE if grid is not of type cuestMolecularGrid_t.

  • CUEST_STATUS_EXCEPTION or CUEST_STATUS_UNKNOWN_ERROR on error.