Coulomb#

group Coulomb

Functions

cuestStatus_t cuestDFCoulombCompute(
cuestHandle_t handle,
const cuestDFIntPlan_t plan,
const cuestDFCoulombComputeParameters_t parameters,
cuestWorkspace_t *temporaryWorkspace,
const double *densityMatrix,
double *outCoulombMatrix
)#

Compute the AO Coulomb (J) matrix using density fitting (DF) with the supplied DF integral plan and density matrix.

This routine computes the Coulomb matrix (J) from a density matrix using an auxiliary basis and density-fitted integrals. The user must provide a preallocated density matrix (size: nao × nao), an AO pair list (to define sparsity and shells), and a preallocated output buffer (size: nao × nao). All required temporary workspace must be allocated using the size returned by cuestDFCoulombComputeWorkspaceQuery.

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

  • plan[in] Density-fitted integral plan (opaque handle) constructed with cuestDFIntPlanCreate. Must not be NULL.

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

  • temporaryWorkspace[in] Temporary workspace buffer for this operation.

  • densityMatrix[in] Input density matrix (size: nao × nao) on GPU. Must not be NULL.

  • outCoulombMatrix[out] Output buffer for computed Coulomb matrix (size: nao × nao) on GPU. 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 cuestDFCoulombComputeWorkspaceQuery(
cuestHandle_t handle,
const cuestDFIntPlan_t plan,
const cuestDFCoulombComputeParameters_t parameters,
cuestWorkspaceDescriptor_t *temporaryWorkspaceDescriptor,
const double *densityMatrix,
double *outCoulombMatrix
)#

Query the temporary workspace required (in bytes) for a DF Coulomb matrix computation.

This function returns the workspace needed (host/device) for a single computation, based on the provided plan and pair list. Only sizes are computed; output and density buffers may be NULL.

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

  • plan[in] Density-fitted integral plan (opaque handle). Must not be NULL.

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

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

  • densityMatrix[in] Optional density matrix (may be NULL).

  • outCoulombMatrix[in] Optional output Coulomb matrix (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.