Polarizable Continuum Models#
- group PCM
Functions
- cuestStatus_t cuestPCMPotentialCompute(
- cuestHandle_t handle,
- const cuestPCMIntPlan_t plan,
- const cuestPCMPotentialComputeParameters_t parameters,
- cuestWorkspace_t *temporaryWorkspace,
- const double *densityMatrix,
- const double *inQ,
- double *outQ,
- cuestPCMResults_t outPCMResults,
- double *outPCMPotentialMatrix
Compute the PCM potential matrix using preconditioned conjugate gradient (PCG) to solve for the PCM charges.
Guesses are obtained from the
inQmatrix, with the pre-allocatedoutQmatrix used to return the converged charges.Convergence properties are controlled by configuring the
cuestPCMPotentialComputeParameters_tstructure passed as theparametersparameter.The required temporary workspace must be allocated using the sizes returned by
cuestPCMPotentialComputeWorkspaceQuery. The number of points, npoint, can be queried from thecuestPCMIntPlan_tstructure using theCUEST_PCMINTPLAN_NUM_POINTquery and is the sum of thenumAngularPointsPerAtomarray used to create the plan.Kernel and precision selection. This routine can use JIT-compiled kernels and/or reduced-precision “ffloat” compute, selected through the compute parameters:
CUEST_PCMPOTENTIALCOMPUTE_PARAMETERS_JIT_USAGE_MODE(cuestJITUsageMode_t):CUEST_JIT_USAGE_MODE_ONuses JIT-compiled kernels,CUEST_JIT_USAGE_MODE_OFFuses AOT-compiled kernels. JIT-compiled kernels are only available in the cuEST CUDA 13 package; the default isCUEST_JIT_USAGE_MODE_ONin the cuEST CUDA 13 package andCUEST_JIT_USAGE_MODE_OFFin the cuEST CUDA 12 package. RequestingCUEST_JIT_USAGE_MODE_ONwith the cuEST CUDA 12 package returnsCUEST_STATUS_INVALID_ARGUMENT.CUEST_PCMPOTENTIALCOMPUTE_PARAMETERS_FFLOAT_USAGE_MODE(cuestFfloatUsageMode_t) selects the compute precision:CUEST_FFLOAT_USAGE_MODE_ONrequests ffloat compute,CUEST_FFLOAT_USAGE_MODE_OFFrequests fp64 compute, andCUEST_FFLOAT_USAGE_MODE_DEFAULTrequests ffloat compute when it is available and expected to provide a performance advantage on the present GPU architecture.JIT-compiled kernels and ffloat compute may be combined. When JIT is enabled, ffloat compute can be used throughout the operation. When JIT is disabled, ffloat compute can be used only while solving for the PCM charges; the remainder of the operation always uses fp64 compute.
Note that the return status is
CUEST_STATUS_SUCCESSeven if the PCM charges did not converge within the maximum number of iterations provided by theparameters. The caller should check theconvergedmember of theoutPCMResultshandle to determine if the PCM charges converged.- Parameters:
handle – [in] cuEST handle. Must not be NULL.
plan – [in] PCM integral plan (opaque handle) constructed with
cuestPCMIntPlanCreate. Must not be NULL.parameters – [in] PCM potential compute parameters (opaque handle) constructed with
cuestParametersCreate. Must not be NULL.temporaryWorkspace – [in] Temporary workspace buffer for this operation. Must not be NULL.
densityMatrix – [in] Total (alpha + beta) AO basis density matrix (size: nao × nao) on the GPU. Must not be NULL.
inQ – [in] Input guess Q vector (size: npoint) on the GPU; user should initialize this array to zeros if no guess is available. Must not be NULL.
outQ – [out] Output Q matrix (size: npoint) on the GPU. Must not be NULL. Elements of this array are overwritten by the calculation results.
outPCMResults – [out] PCM results (opaque handle) constructed with
cuestResultsCreate. Must not be NULL. Elements contained in this handle are overwritten by the calculation results.outPCMPotentialMatrix – [out] Output PCM potential matrix (size: nao × nao) on the GPU. Must not be NULL. Elements of this array are overwritten by the calculation results.
- Returns:
CUEST_STATUS_SUCCESSon success, including the case where the PCM charges did not converge within the maximum number of iterations provided by theparameters;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_ARGUMENTif theparametersare configured to have convergence threshold less than or equal to zero;CUEST_STATUS_INVALID_ARGUMENTif a parameter value is invalid, or if JIT-compiled kernels are requested with the cuEST CUDA 12 package;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestPCMPotentialComputeWorkspaceQuery(
- cuestHandle_t handle,
- const cuestPCMIntPlan_t plan,
- const cuestPCMPotentialComputeParameters_t parameters,
- cuestWorkspaceDescriptor_t *temporaryWorkspaceDescriptor,
- const double *densityMatrix,
- const double *inQ,
- double *outQ,
- cuestPCMResults_t outPCMResults,
- double *outPCMPotentialMatrix
Query the temporary workspace required for a PCM potential computation.
This function calculates the memory required for a PCM potential computation, returning host/device workspace buffer sizes in the output descriptor. The user arrays
densityMatrix,inQ,outQ,outPCMResults, andoutPCMPotentialMatrixmay be NULL. All parameters and object handles must be valid.Kernel and precision selection. This routine can use JIT-compiled kernels and/or reduced-precision “ffloat” compute, selected through the compute parameters:
CUEST_PCMPOTENTIALCOMPUTE_PARAMETERS_JIT_USAGE_MODE(cuestJITUsageMode_t):CUEST_JIT_USAGE_MODE_ONuses JIT-compiled kernels,CUEST_JIT_USAGE_MODE_OFFuses AOT-compiled kernels. JIT-compiled kernels are only available in the cuEST CUDA 13 package; the default isCUEST_JIT_USAGE_MODE_ONin the cuEST CUDA 13 package andCUEST_JIT_USAGE_MODE_OFFin the cuEST CUDA 12 package. RequestingCUEST_JIT_USAGE_MODE_ONwith the cuEST CUDA 12 package returnsCUEST_STATUS_INVALID_ARGUMENT.CUEST_PCMPOTENTIALCOMPUTE_PARAMETERS_FFLOAT_USAGE_MODE(cuestFfloatUsageMode_t) selects the compute precision:CUEST_FFLOAT_USAGE_MODE_ONrequests ffloat compute,CUEST_FFLOAT_USAGE_MODE_OFFrequests fp64 compute, andCUEST_FFLOAT_USAGE_MODE_DEFAULTrequests ffloat compute when it is available and expected to provide a performance advantage on the present GPU architecture.JIT-compiled kernels and ffloat compute may be combined. When JIT is enabled, ffloat compute can be used throughout the operation. When JIT is disabled, ffloat compute can be used only while solving for the PCM charges; the remainder of the operation always uses fp64 compute.
- Parameters:
handle – [in] cuEST handle. Must not be NULL.
plan – [in] PCM integral plan constructed with
cuestPCMIntPlanCreate. Must not be NULL.parameters – [in] PCM potential compute parameters constructed with
cuestParametersCreate. Must not be NULL.temporaryWorkspaceDescriptor – [out] Output descriptor for temporary workspace sizes. Must not be NULL.
densityMatrix – Density matrix. May be NULL.
inQ – Input Q matrix. May be NULL.
outQ – Output Q matrix. May be NULL.
outPCMResults – PCM results constructed with
cuestResultsCreate. May be NULL.outPCMPotentialMatrix – Output PCM potential matrix. 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_ARGUMENTif theparametersare configured to have convergence threshold less than or equal to zero;CUEST_STATUS_INVALID_ARGUMENTif a parameter value is invalid, or if JIT-compiled kernels are requested with the cuEST CUDA 12 package;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestPCMDerivativeCompute(
- cuestHandle_t handle,
- const cuestPCMIntPlan_t plan,
- const cuestPCMDerivativeComputeParameters_t parameters,
- cuestWorkspace_t *temporaryWorkspace,
- const double *densityMatrix,
- const double *inQ,
- double *outQ,
- cuestPCMResults_t outPCMResults,
- double *outPCMGradient
Compute the PCM nuclear gradient.
This routine computes the derivative of the PCM energy with respect to nuclear coordinates.
Converged surface charges are computed using a preconditioned conjugate gradient (PCG) solver. Convergence behavior is controlled by the
cuestPCMDerivativeComputeParameters_tstructure that is packaged insideparameters. Both maximum iterations and convergence threshold may be tuned based on the specific problem.The required temporary workspace must be allocated using the sizes returned by
cuestPCMDerivativeComputeWorkspaceQuery. The number of points, npoint, can be queried from thecuestPCMIntPlan_tstructure using theCUEST_PCMINTPLAN_NUM_POINTquery, and is the sum of thenumAngularPointsPerAtomarray used to create the plan.Kernel and precision selection. This routine can use JIT-compiled kernels and/or reduced-precision “ffloat” compute, selected through the compute parameters:
CUEST_PCMDERIVATIVECOMPUTE_PARAMETERS_JIT_USAGE_MODE(cuestJITUsageMode_t):CUEST_JIT_USAGE_MODE_ONuses JIT-compiled kernels,CUEST_JIT_USAGE_MODE_OFFuses AOT-compiled kernels. JIT-compiled kernels are only available in the cuEST CUDA 13 package; the default isCUEST_JIT_USAGE_MODE_ONin the cuEST CUDA 13 package andCUEST_JIT_USAGE_MODE_OFFin the cuEST CUDA 12 package. RequestingCUEST_JIT_USAGE_MODE_ONwith the cuEST CUDA 12 package returnsCUEST_STATUS_INVALID_ARGUMENT.CUEST_PCMDERIVATIVECOMPUTE_PARAMETERS_FFLOAT_USAGE_MODE(cuestFfloatUsageMode_t) selects the compute precision:CUEST_FFLOAT_USAGE_MODE_ONrequests ffloat compute,CUEST_FFLOAT_USAGE_MODE_OFFrequests fp64 compute, andCUEST_FFLOAT_USAGE_MODE_DEFAULTrequests ffloat compute when it is available and expected to provide a performance advantage on the present GPU architecture.JIT-compiled kernels and ffloat compute may be combined. When JIT is enabled, ffloat compute can be used throughout the operation. When JIT is disabled, ffloat compute can be used only while solving for the PCM charges; the remainder of the operation always uses fp64 compute.
It is important to note that the return status is
CUEST_STATUS_SUCCESSeven if the PCM charges did not converge within the maximum number of iterations provided byparameters. The caller should check theconvergedmember of theoutPCMResultshandle to determine whether the PCM charges returned byoutQare converged.In the case where
maxIterations==0, no PCG updates of the charges are performed. The values provided ininQare used to evaluate the PCM gradient, and are copied tooutQon return. In this mode, a residual is still evaluated and reported throughoutPCMResults, but the charges themselves are not modified.Similarly, if the PCG procedure reaches the maximum number of iterations without satisfying the requested convergence threshold, the gradient is still computed using the resulting (partially converged) charges. It is the caller’s responsibility to inspect the convergence information in
outPCMResultsand decide whether the result is acceptable.- Parameters:
handle – [in] cuEST handle. Must not be NULL.
plan – [in] PCM integral plan (opaque handle) constructed with
cuestPCMIntPlanCreate. Must not be NULL.parameters – [in] PCM derivative parameters (opaque handle) constructed with
cuestParametersCreate. Must not be NULL.temporaryWorkspace – [in] Temporary workspace buffer for this operation. Must not be NULL.
densityMatrix – [in] Total (alpha + beta) AO basis density matrix (size: nao × nao) on the GPU. Must not be NULL.
inQ – [in] Input guess charges (size: npoint) on the GPU; user should initialize this array to zeros if no guess is available. Must not be NULL.
outQ – [out] Converged charges (size: npoint) on the GPU. Must not be NULL. Elements of this array are overwritten by the calculation results.
outPCMResults – [out] PCM results (opaque handle) constructed with
cuestResultsCreate. Must not be NULL. Elements contained in this handle are overwritten by the calculation results.outPCMGradient – [out] Output PCM derivative (size: natoms × 3) on the GPU. Must not be NULL. Elements of this array are overwritten by the calculation results.
- Returns:
CUEST_STATUS_SUCCESSon success, including the case where the PCM charges did not converge within the maximum number of iterations provided by theparameters;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; includingparameters;CUEST_STATUS_INVALID_ARGUMENTif theparametersare configured to have convergence threshold less than or equal to zero;CUEST_STATUS_INVALID_ARGUMENTif a parameter value is invalid, or if JIT-compiled kernels are requested with the cuEST CUDA 12 package;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestPCMDerivativeComputeWorkspaceQuery(
- cuestHandle_t handle,
- const cuestPCMIntPlan_t plan,
- const cuestPCMDerivativeComputeParameters_t parameters,
- cuestWorkspaceDescriptor_t *temporaryWorkspaceDescriptor,
- const double *densityMatrix,
- const double *inQ,
- double *outQ,
- cuestPCMResults_t outPCMResults,
- double *outPCMGradient
Query the temporary workspace required for a PCM gradient computation.
Calculate the memory required for a PCM gradient computation, including the PCG solve for charges, returning host/device workspace buffer sizes in the output descriptor. The user arrays
densityMatrix,inQ,outQ,outPCMResults, andoutPCMGradientmay be NULL. All parameters and object handles must be valid.Kernel and precision selection. This routine can use JIT-compiled kernels and/or reduced-precision “ffloat” compute, selected through the compute parameters:
CUEST_PCMDERIVATIVECOMPUTE_PARAMETERS_JIT_USAGE_MODE(cuestJITUsageMode_t):CUEST_JIT_USAGE_MODE_ONuses JIT-compiled kernels,CUEST_JIT_USAGE_MODE_OFFuses AOT-compiled kernels. JIT-compiled kernels are only available in the cuEST CUDA 13 package; the default isCUEST_JIT_USAGE_MODE_ONin the cuEST CUDA 13 package andCUEST_JIT_USAGE_MODE_OFFin the cuEST CUDA 12 package. RequestingCUEST_JIT_USAGE_MODE_ONwith the cuEST CUDA 12 package returnsCUEST_STATUS_INVALID_ARGUMENT.CUEST_PCMDERIVATIVECOMPUTE_PARAMETERS_FFLOAT_USAGE_MODE(cuestFfloatUsageMode_t) selects the compute precision:CUEST_FFLOAT_USAGE_MODE_ONrequests ffloat compute,CUEST_FFLOAT_USAGE_MODE_OFFrequests fp64 compute, andCUEST_FFLOAT_USAGE_MODE_DEFAULTrequests ffloat compute when it is available and expected to provide a performance advantage on the present GPU architecture.JIT-compiled kernels and ffloat compute may be combined. When JIT is enabled, ffloat compute can be used throughout the operation. When JIT is disabled, ffloat compute can be used only while solving for the PCM charges; the remainder of the operation always uses fp64 compute.
- Parameters:
handle – [in] cuEST handle. Must not be NULL.
plan – [in] PCM integral plan constructed with
cuestPCMIntPlanCreate. Must not be NULL.parameters – [in] PCM derivative parameters constructed with
cuestParametersCreate. Must not be NULL.temporaryWorkspaceDescriptor – [out] Output descriptor for temporary workspace sizes. Must not be NULL.
densityMatrix – Density matrix. May be NULL.
inQ – Input Q vector. May be NULL.
outQ – Output Q vector. May be NULL.
outPCMResults – PCM results constructed with
cuestResultsCreate. May be NULL.outPCMGradient – Output PCM nuclear 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; includingparameters;CUEST_STATUS_INVALID_ARGUMENTif theparametersare configured to have convergence threshold less than or equal to zero;CUEST_STATUS_INVALID_ARGUMENTif a parameter value is invalid, or if JIT-compiled kernels are requested with the cuEST CUDA 12 package;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestPCMRadiiDerivativeCompute(
- cuestHandle_t handle,
- const cuestPCMIntPlan_t plan,
- const cuestPCMRadiiDerivativeComputeParameters_t parameters,
- cuestWorkspace_t *temporaryWorkspace,
- const double *densityMatrix,
- const double *inQ,
- double *outQ,
- cuestPCMResults_t outPCMResults,
- double *outPCMRadiiGradient
Compute the PCM gradient with respect to the atomic (cavity) radii.
This routine computes the derivative of the PCM energy with respect to each atomic cavity radius (the quantity needed by radius-rescaling solvent models such as DRACO), holding the electron density fixed.
Converged surface charges are computed using a preconditioned conjugate gradient (PCG) solver. Convergence behavior is controlled by the
cuestPCMRadiiDerivativeComputeParameters_tstructure that is packaged insideparameters. Both maximum iterations and convergence threshold may be tuned based on the specific problem.The required temporary workspace must be allocated using the sizes returned by
cuestPCMRadiiDerivativeComputeWorkspaceQuery. The number of points, npoint, can be queried from thecuestPCMIntPlan_tstructure using theCUEST_PCMINTPLAN_NUM_POINTquery, and is the sum of thenumAngularPointsPerAtomarray used to create the plan.Kernel and precision selection. This routine can use JIT-compiled kernels and/or reduced-precision “ffloat” compute, selected through the compute parameters:
CUEST_PCMRADIIDERIVATIVECOMPUTE_PARAMETERS_JIT_USAGE_MODE(cuestJITUsageMode_t):CUEST_JIT_USAGE_MODE_ONuses JIT-compiled kernels,CUEST_JIT_USAGE_MODE_OFFuses AOT-compiled kernels. JIT-compiled kernels are only available in the cuEST CUDA 13 package; the default isCUEST_JIT_USAGE_MODE_ONin the cuEST CUDA 13 package andCUEST_JIT_USAGE_MODE_OFFin the cuEST CUDA 12 package. RequestingCUEST_JIT_USAGE_MODE_ONwith the cuEST CUDA 12 package returnsCUEST_STATUS_INVALID_ARGUMENT.CUEST_PCMRADIIDERIVATIVECOMPUTE_PARAMETERS_FFLOAT_USAGE_MODE(cuestFfloatUsageMode_t) selects the compute precision:CUEST_FFLOAT_USAGE_MODE_ONrequests ffloat compute,CUEST_FFLOAT_USAGE_MODE_OFFrequests fp64 compute, andCUEST_FFLOAT_USAGE_MODE_DEFAULTrequests ffloat compute when it is available and expected to provide a performance advantage on the present GPU architecture.JIT-compiled kernels and ffloat compute may be combined. When JIT is enabled, ffloat compute can be used throughout the operation. When JIT is disabled, ffloat compute can be used only while solving for the PCM charges; the remainder of the operation always uses fp64 compute.
It is important to note that the return status is
CUEST_STATUS_SUCCESSeven if the PCM charges did not converge within the maximum number of iterations provided byparameters. The caller should check theconvergedmember of theoutPCMResultshandle to determine whether the PCM charges returned byoutQare converged.In the case where
maxIterations==0, no PCG updates of the charges are performed. The values provided ininQare used to evaluate the PCM radii gradient, and are copied tooutQon return. In this mode, a residual is still evaluated and reported throughoutPCMResults, but the charges themselves are not modified.Similarly, if the PCG procedure reaches the maximum number of iterations without satisfying the requested convergence threshold, the gradient is still computed using the resulting (partially converged) charges. It is the caller’s responsibility to inspect the convergence information in
outPCMResultsand decide whether the result is acceptable.- Parameters:
handle – [in] cuEST handle. Must not be NULL.
plan – [in] PCM integral plan (opaque handle) constructed with
cuestPCMIntPlanCreate. Must not be NULL.parameters – [in] PCM radii derivative parameters (opaque handle) constructed with
cuestParametersCreate. Must not be NULL.temporaryWorkspace – [in] Temporary workspace buffer for this operation. Must not be NULL.
densityMatrix – [in] Total (alpha + beta) AO basis density matrix (size: nao × nao) on the GPU. Must not be NULL.
inQ – [in] Input guess charges (size: npoint) on the GPU; user should initialize this array to zeros if no guess is available. Must not be NULL.
outQ – [out] Converged charges (size: npoint) on the GPU. Must not be NULL. Elements of this array are overwritten by the calculation results.
outPCMResults – [out] PCM results (opaque handle) constructed with
cuestResultsCreate. Must not be NULL. Elements contained in this handle are overwritten by the calculation results.outPCMRadiiGradient – [out] Output PCM radii derivative (size: natoms) on the GPU. Must not be NULL. Elements of this array are overwritten by the calculation results.
- Returns:
CUEST_STATUS_SUCCESSon success, including the case where the PCM charges did not converge within the maximum number of iterations provided by theparameters;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; includingparameters;CUEST_STATUS_INVALID_ARGUMENTif theparametersare configured to have convergence threshold less than or equal to zero;CUEST_STATUS_INVALID_ARGUMENTif a parameter value is invalid, or if JIT-compiled kernels are requested with the cuEST CUDA 12 package;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestPCMRadiiDerivativeComputeWorkspaceQuery(
- cuestHandle_t handle,
- const cuestPCMIntPlan_t plan,
- const cuestPCMRadiiDerivativeComputeParameters_t parameters,
- cuestWorkspaceDescriptor_t *temporaryWorkspaceDescriptor,
- const double *densityMatrix,
- const double *inQ,
- double *outQ,
- cuestPCMResults_t outPCMResults,
- double *outPCMRadiiGradient
Query the temporary workspace required for a PCM radii gradient computation.
Calculate the memory required for a PCM radii gradient computation, including the PCG solve for charges, returning host/device workspace buffer sizes in the output descriptor. The user arrays
densityMatrix,inQ,outQ,outPCMResults, andoutPCMRadiiGradientmay be NULL. All parameters and object handles must be valid.Kernel and precision selection. This routine can use JIT-compiled kernels and/or reduced-precision “ffloat” compute, selected through the compute parameters:
CUEST_PCMRADIIDERIVATIVECOMPUTE_PARAMETERS_JIT_USAGE_MODE(cuestJITUsageMode_t):CUEST_JIT_USAGE_MODE_ONuses JIT-compiled kernels,CUEST_JIT_USAGE_MODE_OFFuses AOT-compiled kernels. JIT-compiled kernels are only available in the cuEST CUDA 13 package; the default isCUEST_JIT_USAGE_MODE_ONin the cuEST CUDA 13 package andCUEST_JIT_USAGE_MODE_OFFin the cuEST CUDA 12 package. RequestingCUEST_JIT_USAGE_MODE_ONwith the cuEST CUDA 12 package returnsCUEST_STATUS_INVALID_ARGUMENT.CUEST_PCMRADIIDERIVATIVECOMPUTE_PARAMETERS_FFLOAT_USAGE_MODE(cuestFfloatUsageMode_t) selects the compute precision:CUEST_FFLOAT_USAGE_MODE_ONrequests ffloat compute,CUEST_FFLOAT_USAGE_MODE_OFFrequests fp64 compute, andCUEST_FFLOAT_USAGE_MODE_DEFAULTrequests ffloat compute when it is available and expected to provide a performance advantage on the present GPU architecture.JIT-compiled kernels and ffloat compute may be combined. When JIT is enabled, ffloat compute can be used throughout the operation. When JIT is disabled, ffloat compute can be used only while solving for the PCM charges; the remainder of the operation always uses fp64 compute.
- Parameters:
handle – [in] cuEST handle. Must not be NULL.
plan – [in] PCM integral plan constructed with
cuestPCMIntPlanCreate. Must not be NULL.parameters – [in] PCM radii derivative parameters constructed with
cuestParametersCreate. Must not be NULL.temporaryWorkspaceDescriptor – [out] Output descriptor for temporary workspace sizes. Must not be NULL.
densityMatrix – Density matrix. May be NULL.
inQ – Input Q vector. May be NULL.
outQ – Output Q vector. May be NULL.
outPCMResults – PCM results constructed with
cuestResultsCreate. May be NULL.outPCMRadiiGradient – Output PCM radii 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; includingparameters;CUEST_STATUS_INVALID_ARGUMENTif theparametersare configured to have convergence threshold less than or equal to zero;CUEST_STATUS_INVALID_ARGUMENTif a parameter value is invalid, or if JIT-compiled kernels are requested with the cuEST CUDA 12 package;CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- group PCMAdvanced
Functions
- cuestStatus_t cuestPCMIntegrationGridCompute(
- cuestHandle_t handle,
- const cuestPCMIntPlan_t plan,
- const cuestPCMIntegrationGridComputeParameters_t parameters,
- cuestWorkspace_t *temporaryWorkspace,
- double *outGridPoints
Compute PCM integration grid point coordinates.
This routine retrieves the Cartesian coordinates of each molecular grid point used to define the PCM cavity surface. These are the grid points used by the corresponding PCM integral plan.
- Since
v0.2.0
The resulting coordinates are written to a user-provided output buffer of shape (
npoint× 3), containing the x, y, z coordinates of each grid point.Temporary device workspace must be preallocated based on the size returned by
cuestPCMIntegrationGridComputeWorkspaceQuery.- Parameters:
handle – [in] cuEST handle. Must not be NULL.
plan – [in] PCM integral plan (opaque handle) constructed with
cuestPCMIntPlanCreate. Must not be NULL.parameters – [in] Compute parameters (
cuestPCMIntegrationGridComputeParameters_t) Must not be NULLtemporaryWorkspace – [in] Preallocated GPU workspace buffer. Must not be NULL.
outGridPoints – [out] Output buffer for computed grid point coordinates (size:
npoint× 3) on GPU. 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 the handle, plan, or parameters type is incorrect;CUEST_STATUS_EXCEPTIONon device or internal error;CUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestPCMIntegrationGridComputeWorkspaceQuery(
- cuestHandle_t handle,
- const cuestPCMIntPlan_t plan,
- const cuestPCMIntegrationGridComputeParameters_t parameters,
- cuestWorkspaceDescriptor_t *temporaryWorkspaceDescriptor,
- double *outGridPoints
Query temporary workspace requirements for PCM grid coordinate computation.
Determines the GPU memory workspace needed to generate the coordinates of molecular integration grid points defined by the provided PCM integral plan. This function must be called before
cuestPCMIntegrationGridComputeto ensure sufficient allocation.- Since
v0.2.0
Only workspace sizes are computed; input and output pointers may be NULL.
- Parameters:
handle – [in] cuEST handle. Must not be NULL.
plan – [in] PCM integral plan (opaque handle) constructed with
cuestPCMIntPlanCreate. Must not be NULL.parameters – [in] Compute parameters (
cuestPCMIntegrationGridComputeParameters_t) Must not be NULLtemporaryWorkspaceDescriptor – [out] Output descriptor for required workspace sizes (in bytes). Must not be NULL.
outGridPoints – Output array for grid point coordinates. 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 the handle, plan, or parameters type is incorrect;CUEST_STATUS_EXCEPTIONon device or internal error;CUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestPCMIntegrationWeightCompute(
- cuestHandle_t handle,
- const cuestPCMIntPlan_t plan,
- cuestPCMIntegrationWeightComputeParametersWeightType_t weightType,
- const cuestPCMIntegrationWeightComputeParameters_t parameters,
- cuestWorkspace_t *temporaryWorkspace,
- double *outGridWeights
Compute molecular integration weights for PCM quadrature.
This routine computes the integration weights associated with each grid point in the molecular integration grid used for PCM integration. The weights returned depend on the selected weight type, specified by
weightType.- Since
v0.2.0
Supported weighting schemes include:
CUEST_PCMINTEGRATIONWEIGHT_PARAMETERS_WEIGHTTYPE_SWITCHING— value of the iSWIG switching function;CUEST_PCMINTEGRATIONWEIGHT_PARAMETERS_WEIGHTTYPE_ZETA— value of zeta at the grid point.
The result is written to
outGridWeights(size:npoint× 1). Temporary workspace must be preallocated based oncuestPCMIntegrationWeightComputeWorkspaceQuery.- Parameters:
handle – [in] cuEST handle. Must not be NULL.
plan – [in] PCM integral plan (opaque handle) constructed with
cuestPCMIntPlanCreate. Must not be NULL.weightType – [in] Weight type to return (switching function value or zeta).
parameters – [in] Compute parameters (
cuestPCMIntegrationWeightComputeParameters_t) Must not be NULLtemporaryWorkspace – [in] Preallocated GPU workspace buffer for temporary data. Must not be NULL.
outGridWeights – [out] Output buffer for integration weights (size:
npoint× 1) on GPU. 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 the handle, plan, or parameters type is invalid;CUEST_STATUS_INVALID_ARGUMENTifweightTypeis unrecognized;CUEST_STATUS_EXCEPTIONon device or internal error;CUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestPCMIntegrationWeightComputeWorkspaceQuery(
- cuestHandle_t handle,
- const cuestPCMIntPlan_t plan,
- cuestPCMIntegrationWeightComputeParametersWeightType_t weightType,
- const cuestPCMIntegrationWeightComputeParameters_t parameters,
- cuestWorkspaceDescriptor_t *temporaryWorkspaceDescriptor,
- double *outGridWeights
Query the temporary workspace required (in bytes) for computing PCM integration weights.
Determines GPU memory workspace requirements to compute integration weights on the molecular grid as defined by the provided PCM integral plan. The required workspace depends on the grid structure and selected weight type.
- Since
v0.2.0
This query should be executed before calling
cuestPCMIntegrationWeightComputeto ensure that sufficient device memory is available.- Parameters:
handle – [in] cuEST handle. Must not be NULL.
plan – [in] PCM integral plan (opaque handle) constructed with
cuestPCMIntPlanCreate. Must not be NULL.weightType – [in] Weight type to return (switching function value or zeta).
parameters – [in] Compute parameters (
cuestPCMIntegrationWeightComputeParameters_t) Must not be NULLtemporaryWorkspaceDescriptor – [out] Output descriptor for required temporary workspace sizes (in bytes). Must not be NULL.
outGridWeights – Optional output buffer for computed weights. 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 the handle, plan, or parameters type is incorrect;CUEST_STATUS_INVALID_ARGUMENTifweightTypeis unsupported;CUEST_STATUS_EXCEPTIONon device or internal error;CUEST_STATUS_UNKNOWN_ERRORotherwise.