Skip to main content

cuestMolecularGridCreateWorkspaceQuery

Function cuestMolecularGridCreateWorkspaceQuery 

Source
pub unsafe fn cuestMolecularGridCreateWorkspaceQuery(
    handle: cuestHandle_t,
    numAtoms: u64,
    atomGrid: *const cuestAtomGrid_t,
    xyz: *const f64,
    parameters: cuestMolecularGridParameters_t,
    persistentWorkspaceDescriptor: *mut cuestWorkspaceDescriptor_t,
    temporaryWorkspaceDescriptor: *mut cuestWorkspaceDescriptor_t,
    outGrid: *mut cuestMolecularGrid_t,
) -> cuestStatus_t
Expand description

@brief Query workspace requirements for creating a molecular grid object. @ingroup Grid

This function simulates the allocation logic to determine necessary persistent and temporary buffer sizes. All buffer pointers and arrays must be valid.

@param[in] handle cuEST handle. Must not be NULL. @param[in] numAtoms Total number of atoms; must be greater than zero. @param[in] atomGrid Flat array of atom grid handles (size: \c numAtoms). CPU array, must not be NULL and no elements of the array may be NULL. @param[in] xyz Array of atomic Cartesian coordinates (size: \c numAtoms * 3) on the CPU. Ordering of elements is row-major: \f$ [x_0, y_0, z_0, …] \f$. Must not be NULL. @param[in] parameters Handle to \c cuestMolecularGridParameters_t. Must not be NULL. @param[out] persistentWorkspaceDescriptor Output descriptor for persistent buffer sizing. Must not be NULL. @param[out] temporaryWorkspaceDescriptor Output descriptor for temporary buffer sizing. Must not be NULL. @param outGrid Pointer for output molecular grid. May be NULL.

@return

  • \c CUEST_STATUS_SUCCESS on success;
  • \c CUEST_STATUS_INVALID_HANDLE if the cuEST handle is NULL;
  • \c CUEST_STATUS_NULL_POINTER if any required pointer is NULL;
  • \c CUEST_STATUS_INVALID_TYPE if the cuEST handle, parameters or atom grids are not of the correct type;
  • \c CUEST_STATUS_INVALID_ARGUMENT if \c numAtoms is zero;
  • \c CUEST_STATUS_EXCEPTION or \c CUEST_STATUS_UNKNOWN_ERROR for other errors.