Multipole#

group Multipole

Functions

cuestStatus_t cuestMultipoleCompute(
cuestHandle_t handle,
const cuestOEIntPlan_t plan,
const cuestMultipoleComputeParameters_t parameters,
cuestWorkspace_t *temporaryWorkspace,
const uint32_t *multipoleOrder,
const double *origin,
double *outMatrix
)#

Compute the atomic orbital multipole matrix using the provided cuestOEIntPlan_t plan.

The output buffer must be preallocated and sized for nao × nao elements, where nao is the number of atomic orbitals in the basis. Temporary workspace must be allocated using size returned by cuestMultipoleComputeWorkspaceQuery.

Since

v0.2.0

With the default configuration of the cuEST handle, multipole moments with a total order of up to 30 are supported (assuming an orbital basis including g orbitals). Support for higher-order multipoles can be enabled by increasing CUEST_HANDLE_PARAMETERS_MAX_GAUSS_HERMITE. Exceeding this limit will result in a CUEST_STATUS_EXCEPTION return code.

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

  • plan[in] One-electron integral computation plan (opaque handle). Must not be NULL.

  • parameters[in] Compute parameters (cuestMultipoleComputeParameters_t). Must not be NULL

  • temporaryWorkspace[in] Temporary workspace buffers for computation (preallocated). Must not be NULL.

  • multipoleOrder[in] Exponents defining the multipole operator: x^l y^m z^n [size: 3]. CPU array. Must not be NULL.

  • origin[in] Cartesian coordinates defining the multipole origin [size: 3]. CPU array. Must not be NULL.

  • outMatrix[out] Output GPU buffer for computed multipole matrix elements [size: nao × nao]. Must not be NULL. Elements of this array are overwritten by the calculation results.

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 opaque handles are not the correct type;

  • CUEST_STATUS_EXCEPTION or CUEST_STATUS_UNKNOWN_ERROR otherwise.

cuestStatus_t cuestMultipoleComputeWorkspaceQuery(
cuestHandle_t handle,
const cuestOEIntPlan_t plan,
const cuestMultipoleComputeParameters_t parameters,
cuestWorkspaceDescriptor_t *temporaryWorkspaceDescriptor,
const uint32_t *multipoleOrder,
const double *origin,
double *outMatrix
)#

Query the temporary workspace required (in bytes) for multipole matrix calculation.

This function computes the workspace requirements for a requested multipole calculation. Fill the provided workspace descriptor with host and device buffer sizes required. The outMatrix pointer may be NULL.

Since

v0.2.0

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

  • plan[in] One-electron integral computation plan (opaque handle). Must not be NULL.

  • parameters[in] Compute parameters (cuestMultipoleComputeParameters_t). Must not be NULL

  • temporaryWorkspaceDescriptor[out] Output descriptor for temporary workspace sizes. Must not be NULL.

  • multipoleOrder[in] Integer exponents defining the multipole operator: x^l y^m z^n [size: 3]. CPU array. Must not be NULL.

  • origin[in] Cartesian coordinates defining the multipole origin [size: 3]. CPU array. Must not be NULL.

  • outMatrix – User matrix buffer (may be NULL during the workspace query).

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 opaque handles are not the correct type;

  • CUEST_STATUS_EXCEPTION or CUEST_STATUS_UNKNOWN_ERROR otherwise.

group MultipoleGrad

Functions

cuestStatus_t cuestMultipoleDerivativeCompute(
cuestHandle_t handle,
const cuestOEIntPlan_t plan,
const cuestMultipoleDerivativeComputeParameters_t parameters,
cuestWorkspace_t *temporaryWorkspace,
const uint32_t *multipoleOrder,
const double *origin,
const double *densityMatrix,
double *outGradient
)#

Compute the electronic gradient (derivative) of the atomic orbital multipole matrix using the supplied integral plan and density matrix.

Both the input density matrix and the output gradient must be preallocated. The density matrix must be an (nao x nao) array and the output gradient must have space for (natom x 3) elements, where nao is the number of atomic orbitals and natom the number of atoms in the system. All required temporary workspace must be allocated by the user prior to calling this function.

Since

v0.2.0

With the default configuration of the cuEST handle, multipole moment derivatives with a total order of up to 29 are supported (assuming an orbital basis including g orbitals). Support for higher-order multipoles can be enabled by increasing CUEST_HANDLE_PARAMETERS_MAX_GAUSS_HERMITE. Exceeding this limit will result in a CUEST_STATUS_EXCEPTION return code.

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

  • plan[in] One-electron integral computation plan (opaque handle). Must not be NULL.

  • parameters[in] Compute parameters (cuestMultipoleDerivativeComputeParameters_t). Must not be NULL

  • temporaryWorkspace[in] Temporary workspace buffers for computation (preallocated). Must not be NULL.

  • multipoleOrder[in] Exponents defining the multipole operator: x^l y^m z^n [size: 3]. CPU array. Must not be NULL.

  • origin[in] Cartesian coordinates defining the multipole origin [size: 3]. CPU array. Must not be NULL.

  • densityMatrix[in] Pointer to input density matrix [size: nao × nao]. GPU array. Must not be NULL.

  • outGradient[out] Pointer to GPU buffer for computed gradients [size: natom × 3]. Must not be NULL. Elements of this array are overwritten by the calculation results.

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 opaque handles are not the correct type;

  • CUEST_STATUS_EXCEPTION or CUEST_STATUS_UNKNOWN_ERROR otherwise.

cuestStatus_t cuestMultipoleDerivativeComputeWorkspaceQuery(
cuestHandle_t handle,
const cuestOEIntPlan_t plan,
const cuestMultipoleDerivativeComputeParameters_t parameters,
cuestWorkspaceDescriptor_t *temporaryWorkspaceDescriptor,
const uint32_t *multipoleOrder,
const double *origin,
const double *densityMatrix,
double *outGradient
)#

Query the temporary workspace required (in bytes) for multipole matrix gradient calculation.

This function computes the workspace requirements of a single gradient evaluation, based on the supplied plan and dimensions. The workspace descriptor is filled with host and device memory requirements. Output buffers may be NULL for the purposes of the query.

Since

v0.2.0

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

  • plan[in] One-electron integral computation plan (opaque handle). Must not be NULL.

  • parameters[in] Compute parameters (cuestMultipoleDerivativeComputeParameters_t). Must not be NULL

  • temporaryWorkspaceDescriptor[out] Output descriptor for temporary workspace sizes. Must not be NULL.

  • multipoleOrder[in] Exponents defining the multipole operator: x^l y^m z^n [size: 3]. CPU array. Must not be NULL.

  • origin[in] Cartesian coordinates defining the multipole origin [size: 3]. CPU array. Must not be NULL.

  • densityMatrix – Optional density matrix pointer (may be NULL).

  • outGradient – Optional buffer for computed gradient (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 opaque handles are not the correct type;

  • CUEST_STATUS_EXCEPTION or CUEST_STATUS_UNKNOWN_ERROR otherwise.