Angular Momentum#
- cuest.bindings.cuestAngularMomentumComputeWorkspaceQuery(
- *,
- handle: cuest.bindings.cuest.cuestHandle,
- plan: cuest.bindings.cuest.cuestOEIntPlanHandle,
- parameters: cuest.bindings.cuest.Parameters,
- temporaryWorkspaceDescriptor: int,
- component: int,
- origin: collections.abc.Sequence[float],
- outMatrix: cuest.bindings.cuest.Pointer,
Query the temporary workspace required (in bytes) for angular momentum matrix calculation.
This function computes the workspace requirements for a requested angular momentum calculation. Fill the provided workspace descriptor with host and device buffer sizes required. The
outMatrixpointer may be NULL.The angular momentum operator is specified by the cuestAngularMomentumComputeParametersComponent_t enum. The operator origin may not be NULL during the WorkspaceQuery.
Parameters#
- handle[in]cuestHandle
cuEST handle. Must not be NULL.
- plan[in]cuestOEIntPlanHandle
One-electron integral plan (opaque handle) constructed with
cuestOEIntPlanCreate(). Must not be NULL.- parameters[in]Parameters
Compute parameters handle (
cuestAngularMomentumComputeParameters()) initialized bycuestParametersCreate()withCuestParametersType.CUEST_ANGULARMOMENTUMCOMPUTE_PARAMETERS. Must not be NULL.- temporaryWorkspaceDescriptor[out]int
Output descriptor for temporary workspace sizes. Must not be NULL. Integer address of a
cuestWorkspaceDescriptor_tstructure (hostBufferSizeInBytes,deviceBufferSizeInBytes; bothsize_t), as implemented byWorkspaceDescriptorin cuda_utils.py.- component[in]CuestAngularMomentumComputeParametersComponent
Specifies the operator: \(L_x\), \(L_y\), or \(L_z\). Python enum mirroring the C API type
cuestAngularMomentumComputeParametersComponent_t(CUEST_ANGULARMOMENTUMCOMPUTE_PARAMETERS_COMPONENT_LX/_LY/_LZ).- origin[in]List[float]
List of length 3 specifying the cartesian coordinates of the origin, on the CPU. Must have exactly 3 entries.
- outMatrixPointer
Optional buffer for computed angular momentum matrix
Returns#
- status[out]CuestStatus
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 validcuestAngularMomentumComputeParametersComponent_tvalue;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuest.bindings.cuestAngularMomentumCompute(
- *,
- handle: cuest.bindings.cuest.cuestHandle,
- plan: cuest.bindings.cuest.cuestOEIntPlanHandle,
- parameters: cuest.bindings.cuest.Parameters,
- temporaryWorkspace: int,
- component: int,
- origin: collections.abc.Sequence[float],
- outMatrix: cuest.bindings.cuest.Pointer,
Compute the atomic orbital angular momentum matrix using the provided OEIntPlan.
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
cuestAngularMomentumComputeWorkspaceQuery().The angular momentum operator is specified by the cuestAngularMomentumComputeParametersComponent_t enum. The operator origin is specified via the origin argument.
Parameters#
- handle[in]cuestHandle
cuEST handle. Must not be NULL.
- plan[in]cuestOEIntPlanHandle
One-electron integral plan (opaque handle) constructed with
cuestOEIntPlanCreate(). Must not be NULL.- parameters[in]Parameters
Compute parameters handle (
cuestAngularMomentumComputeParameters()) initialized bycuestParametersCreate()withCuestParametersType.CUEST_ANGULARMOMENTUMCOMPUTE_PARAMETERS. Must not be NULL.- temporaryWorkspace[in]int
Temporary workspace buffers for computation (preallocated). Must not be NULL. Integer address of a
cuestWorkspace_tstructure (hostBuffer,hostBufferSizeInBytes,deviceBuffer,deviceBufferSizeInBytes), as implemented byWorkspacein cuda_utils.py.- component[in]CuestAngularMomentumComputeParametersComponent
Specifies the operator: \(L_x\), \(L_y\), or \(L_z\). Python enum mirroring the C API type
cuestAngularMomentumComputeParametersComponent_t(CUEST_ANGULARMOMENTUMCOMPUTE_PARAMETERS_COMPONENT_LX/_LY/_LZ).- origin[in]List[float]
List of length 3 specifying the cartesian coordinates of the origin, on the CPU. Must have exactly 3 entries.
- outMatrix[out]Pointer
Output buffer for computed angular momentum matrix elements (size: nao × nao) on the GPU. Must not be NULL. Elements of this array are overwritten by the calculation results.
Returns#
- status[out]CuestStatus
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 validcuestAngularMomentumComputeParametersComponent_tvalue;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuest.bindings.cuestAngularMomentumDerivativeComputeWorkspaceQuery(
- *,
- handle: cuest.bindings.cuest.cuestHandle,
- plan: cuest.bindings.cuest.cuestOEIntPlanHandle,
- parameters: cuest.bindings.cuest.Parameters,
- temporaryWorkspaceDescriptor: int,
- component: int,
- origin: collections.abc.Sequence[float],
- densityMatrix: cuest.bindings.cuest.Pointer,
- outGradient: cuest.bindings.cuest.Pointer,
Query the temporary workspace required (in bytes) for angular momentum 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.
The angular momentum operator is specified by the cuestAngularMomentumComputeParametersComponent_t enum. The operator origin may not be NULL during the WorkspaceQuery.
Parameters#
- handle[in]cuestHandle
cuEST handle. Must not be NULL.
- plan[in]cuestOEIntPlanHandle
One-electron integral plan (opaque handle) constructed with
cuestOEIntPlanCreate(). Must not be NULL.- parameters[in]Parameters
Compute parameters handle (
cuestAngularMomentumDerivativeComputeParameters()) initialized bycuestParametersCreate()withCuestParametersType.CUEST_ANGULARMOMENTUMDERIVATIVECOMPUTE_PARAMETERS. Must not be NULL.- temporaryWorkspaceDescriptor[out]int
Output descriptor for temporary workspace sizes. Must not be NULL. Integer address of a
cuestWorkspaceDescriptor_tstructure (hostBufferSizeInBytes,deviceBufferSizeInBytes; bothsize_t), as implemented byWorkspaceDescriptorin cuda_utils.py.- component[in]CuestAngularMomentumComputeParametersComponent
Specifies the operator: \(L_x\), \(L_y\), or \(L_z\). Python enum mirroring the C API type
cuestAngularMomentumComputeParametersComponent_t(CUEST_ANGULARMOMENTUMCOMPUTE_PARAMETERS_COMPONENT_LX/_LY/_LZ).- origin[in]List[float]
List of length 3 specifying the cartesian coordinates of the origin, on the CPU. Must have exactly 3 entries.
- densityMatrixPointer
Optional density matrix
- outGradientPointer
Optional output gradient
Returns#
- status[out]CuestStatus
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 validcuestAngularMomentumComputeParametersComponent_tvalue;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuest.bindings.cuestAngularMomentumDerivativeCompute(
- *,
- handle: cuest.bindings.cuest.cuestHandle,
- plan: cuest.bindings.cuest.cuestOEIntPlanHandle,
- parameters: cuest.bindings.cuest.Parameters,
- temporaryWorkspace: int,
- component: int,
- origin: collections.abc.Sequence[float],
- densityMatrix: cuest.bindings.cuest.Pointer,
- outGradient: cuest.bindings.cuest.Pointer,
Compute the electronic gradient (derivative) of the atomic orbital angular momentum 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 a 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.
The angular momentum operator is specified by the cuestAngularMomentumComputeParametersComponent_t enum. The operator origin is specified via the origin argument.
Parameters#
- handle[in]cuestHandle
cuEST handle. Must not be NULL.
- plan[in]cuestOEIntPlanHandle
One-electron integral plan (opaque handle) constructed with
cuestOEIntPlanCreate(). Must not be NULL.- parameters[in]Parameters
Compute parameters handle (
cuestAngularMomentumDerivativeComputeParameters()) initialized bycuestParametersCreate()withCuestParametersType.CUEST_ANGULARMOMENTUMDERIVATIVECOMPUTE_PARAMETERS. Must not be NULL.- temporaryWorkspace[in]int
Temporary workspace buffers (preallocated for this operation). Must not be NULL. Integer address of a
cuestWorkspace_tstructure (hostBuffer,hostBufferSizeInBytes,deviceBuffer,deviceBufferSizeInBytes), as implemented byWorkspacein cuda_utils.py.- component[in]CuestAngularMomentumComputeParametersComponent
Specifies the operator: \(L_x\), \(L_y\), or \(L_z\). Python enum mirroring the C API type
cuestAngularMomentumComputeParametersComponent_t(CUEST_ANGULARMOMENTUMCOMPUTE_PARAMETERS_COMPONENT_LX/_LY/_LZ).- origin[in]List[float]
List of length 3 specifying the cartesian coordinates of the origin, on the CPU. Must have exactly 3 entries.
- densityMatrix[in]Pointer
Input density matrix (size: nao × nao) on the GPU. Must not be NULL.
- outGradient[out]Pointer
Output gradient (size: natom × 3) on the GPU. Must not be NULL. Elements of this array are overwritten by the calculation results.
Returns#
- statusCuestStatus
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 validcuestAngularMomentumComputeParametersComponent_tvalue;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.