Exchange#
- cuest.bindings.cuestDFSymmetricExchangeComputeWorkspaceQuery(
- *,
- handle: cuest.bindings.cuest.cuestHandle,
- plan: cuest.bindings.cuest.cuestDFIntPlanHandle,
- parameters: cuest.bindings.cuest.Parameters,
- variableBufferSize: int,
- temporaryWorkspaceDescriptor: int,
- numOccupied: int,
- coefficientMatrix: cuest.bindings.cuest.Pointer,
- outExchangeMatrix: cuest.bindings.cuest.Pointer,
Query the temporary workspace required (in bytes) for a DF exchange matrix calculation.
This function returns (via output parameters) the host and device workspace buffer sizes needed to perform a symmetric exchange computation, given the plan and matrix dimensions. The coefficient matrix and output buffer may be NULL (only sizes are computed).
Parameters#
- handle[in]CuestHandle
cuEST handle. Must not be NULL.
- plan[in]CuestDFIntPlanHandle
Density-fitted integral plan (opaque handle).
- parameters[in]cuestDFSymmetricExchangeComputeParameters_t
Parameters object. Must not be NULL.
- variableBufferSize[in]WorkspaceDescriptor
User-provided descriptor for an internal scratch buffer (host and device). Must not be NULL. For most problem sizes, 2 GB is a good buffer size. On newer devices, such as H200 and B200, buffer sizes up to 8 GB may improve performance. Host memory is currently unused. Note that the variableBufferSize does not limit total memory usage. This value must remain unchanged between WorkspaceQuery and Compute calls.
- temporaryWorkspaceDescriptor[out]WorkspaceDescriptor
Output descriptor for workspace sizes (host and device). Must not be NULL.
- numOccupied[in]int
Number of occupied orbitals (rows in coefficient matrix); must be greater than zero.
- coefficientMatrix[in]Pointer
Optional pointer to coefficient matrix buffer. May be NULL.
- outExchangeMatrix[in]Pointer
Optional pointer to output exchange matrix buffer. May be NULL.
Returns#
- status[out]cuestStatus_t
CUEST_STATUS_SUCCESSon success;CUEST_STATUS_INVALID_HANDLEif the cuEST handle is NULL;CUEST_STATUS_NULL_POINTERif any required pointer is NULL;CUEST_STATUS_INVALID_TYPEif opaque handles are not the correct type.CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuest.bindings.cuestDFSymmetricExchangeCompute(
- *,
- handle: cuest.bindings.cuest.cuestHandle,
- plan: cuest.bindings.cuest.cuestDFIntPlanHandle,
- parameters: cuest.bindings.cuest.Parameters,
- variableBufferSize: int,
- temporaryWorkspace: int,
- numOccupied: int,
- coefficientMatrix: cuest.bindings.cuest.Pointer,
- outExchangeMatrix: cuest.bindings.cuest.Pointer,
Compute the AO symmetric exchange (K) matrix using density fitting (DF) with the supplied DF integral plan and coefficient matrix.
This function computes the density-fitted AO exchange matrix from an orbital coefficient matrix and a DF plan.
The input coefficient matrix must be preallocated to size (
numOccupied× nao). Data is expected to be in row-major format.The output buffer
outExchangeMatrixmust be preallocated for (nao × nao) doubles.All handles, pointers, and buffers must be valid and non-NULL.
Temporary workspace must be preallocated using size returned by
cuestDFSymmetricExchangeComputeWorkspaceQuery().
Parameters#
- handle[in]CuestHandle
cuEST handle. Must not be NULL.
- plan[in]CuestDFIntPlanHandle
Density-fitted integral plan (opaque handle).
- parameters[in]cuestDFSymmetricExchangeComputeParameters_t
Parameters object. Must not be NULL.
- variableBufferSize[in]WorkspaceDescriptor
User-provided descriptor for an internal scratch buffer (host and device). Must not be NULL. For most problem sizes, 2 GB is a good buffer size. On newer devices, such as H200 and B200, buffer sizes up to 8 GB may improve performance. Host memory is currently unused. Note that the variableBufferSize does not limit total memory usage. This value must remain unchanged between WorkspaceQuery and Compute calls.
- temporaryWorkspace[in]Workspace
Temporary workspace buffer for this operation. Must not be NULL.
- numOccupied[in]int
Number of occupied orbitals (rows in coefficient matrix); must be greater than zero.
- coefficientMatrix[in]Pointer
Input coefficient matrix (size:
numOccupied× nao) on the GPU. Must not be NULL.- outExchangeMatrix[out]Pointer
Output buffer for the AO exchange matrix (size: nao × nao) on the GPU. Must not be NULL. Elements of this array are overwritten by the calculation results.
Returns#
- status[out]cuestStatus_t
CUEST_STATUS_SUCCESSon success;CUEST_STATUS_INVALID_HANDLEif the cuEST handle is NULL;CUEST_STATUS_NULL_POINTERif any required pointer is NULL;CUEST_STATUS_INVALID_TYPEif opaque handles are not the correct type.CUEST_STATUS_INVALID_ARGUMENTifnumOccupiedis zero;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.