Nabla#
- group Nabla
Functions
- cuestStatus_t cuestNablaCompute(
- cuestHandle_t handle,
- const cuestOEIntPlan_t plan,
- const cuestNablaComputeParameters_t parameters,
- cuestWorkspace_t *temporaryWorkspace,
- cuestNablaComputeParametersComponent_t component,
- double *outMatrix
Compute the atomic orbital nabla matrix using the provided
cuestOEIntPlan_tplan.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
cuestNablaComputeWorkspaceQuery.- 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 (
cuestNablaComputeParameters_t). Must not be NULLtemporaryWorkspace – [in] Temporary workspace buffers for computation (preallocated). Must not be NULL.
component – [in] Enum (
cuestNablaComputeParametersComponent_t) defining the nabla operator (i.e. \(\nabla_x\), \(\nabla_y\), or \(\nabla_z\)).outMatrix – [out] Output GPU buffer for computed nabla matrix elements [size: nao × nao]. Must not be NULL. Elements of this array are overwritten by the calculation results.
- Returns:
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_ARGUMENTifcomponentis not a validcuestNablaComputeParametersComponent_tvalue;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestNablaComputeWorkspaceQuery(
- cuestHandle_t handle,
- const cuestOEIntPlan_t plan,
- const cuestNablaComputeParameters_t parameters,
- cuestWorkspaceDescriptor_t *temporaryWorkspaceDescriptor,
- cuestNablaComputeParametersComponent_t component,
- double *outMatrix
Query the temporary workspace required (in bytes) for nabla matrix calculation.
This function computes the workspace requirements for a requested nabla calculation. Fill the provided workspace descriptor with host and device buffer sizes required. The
outMatrixpointer 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 (
cuestNablaComputeParameters_t). Must not be NULLtemporaryWorkspaceDescriptor – [out] Output descriptor for temporary workspace sizes. Must not be NULL.
component – [in] Enum (
cuestNablaComputeParametersComponent_t) defining the nabla operator (i.e. \(\nabla_x\), \(\nabla_y\), or \(\nabla_z\)).outMatrix – User matrix buffer (may be NULL during the workspace query).
- Returns:
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_ARGUMENTifcomponentis not a validcuestNablaComputeParametersComponent_tvalue;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- group NablaGrad
Functions
- cuestStatus_t cuestNablaDerivativeCompute(
- cuestHandle_t handle,
- const cuestOEIntPlan_t plan,
- const cuestNablaDerivativeComputeParameters_t parameters,
- cuestWorkspace_t *temporaryWorkspace,
- cuestNablaComputeParametersComponent_t component,
- const double *densityMatrix,
- double *outGradient
Compute the electronic gradient (derivative) of the atomic orbital nabla 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
- 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 (
cuestNablaDerivativeComputeParameters_t). Must not be NULLtemporaryWorkspace – [in] Temporary workspace buffers for computation (preallocated). Must not be NULL.
component – [in] Enum (
cuestNablaComputeParametersComponent_t) defining the nabla operator (i.e. \(\nabla_x\), \(\nabla_y\), or \(\nabla_z\)).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_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_ARGUMENTifcomponentis not a validcuestNablaComputeParametersComponent_tvalue;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestNablaDerivativeComputeWorkspaceQuery(
- cuestHandle_t handle,
- const cuestOEIntPlan_t plan,
- const cuestNablaDerivativeComputeParameters_t parameters,
- cuestWorkspaceDescriptor_t *temporaryWorkspaceDescriptor,
- cuestNablaComputeParametersComponent_t component,
- const double *densityMatrix,
- double *outGradient
Query the temporary workspace required (in bytes) for nabla 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 (
cuestNablaDerivativeComputeParameters_t). Must not be NULLtemporaryWorkspaceDescriptor – [out] Output descriptor for temporary workspace sizes. Must not be NULL.
component – [in] Enum (
cuestNablaComputeParametersComponent_t) defining the nabla operator (i.e. \(\nabla_x\), \(\nabla_y\), or \(\nabla_z\)).densityMatrix – Optional density matrix pointer (may be NULL).
outGradient – Optional buffer for computed gradient (may be NULL).
- Returns:
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_ARGUMENTifcomponentis not a validcuestNablaComputeParametersComponent_tvalue;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.