![]() |
Octopus
|
Interoperable Separable Density Fitting (ISDF) molecular implementation. More...
Interoperable Separable Density Fitting (ISDF) molecular implementation.
Functions/Subroutines | |
subroutine, public | isdf_ace_compute_potentials (exxop, namespace, space, mesh, st, Vx_on_st, kpoints) |
ISDF wrapper computing interpolation points and vectors, which are used to build the potential \(W_j=\left(V_x\left[\left\{\varphi_i\right\}\right] \psi_j\right)(\mathbf{r})\) used in adaptively-compressed exchange. More... | |
subroutine, public | isdf_interpolation_vectors (isdf, namespace, mesh, st, centroids, psi_mu, P_r_mu, isdf_vectors) |
Top-level routine for computing ISDF vectors. More... | |
subroutine | pair_product_coefficient_matrix (p_phi, zct, p_psi) |
Construct the matrix-matrix product \(Z C^T\). More... | |
subroutine | coefficient_product_matrix (p_phi, cct, p_psi) |
Construct the coefficient product matrix \([CC^T]\). More... | |
subroutine, public | isdf_gram_matrix (mesh, isdf_vectors, gram_matrix) |
Compute the Gram matrix for the ISDF interpolation vectors. More... | |
subroutine | dphi_at_interpolation_points (mesh, st, centroids, max_state, psi_mu) |
Construct a 2D array of states, defined only at a specific subset of grid points. More... | |
subroutine | dquasi_density_matrix_at_mesh_centroid_points (st, max_state, psi_mu, p_r_mu) |
Compute the quasi-density matrix where one spatial coordinate is defined at grid points and the is defined at interpolation points. More... | |
subroutine | disdf_ace_apply_exchange_op (exxop, namespace, mesh, st, psi_mu, P_r_mu, isdf_vectors, Vx_on_st) |
Compute the action of the exchange potential on KS states for adaptively-compressed exchange. More... | |
Variables | |
integer, parameter, private | ik = 1 |
All molecular calculations performed at the Gamma-point. More... | |
subroutine, public isdf_oct_m::isdf_ace_compute_potentials | ( | type(exchange_operator_t), intent(in) | exxop, |
type(namespace_t), intent(in) | namespace, | ||
class(space_t), intent(in) | space, | ||
class(mesh_t), intent(in) | mesh, | ||
type(states_elec_t), intent(in) | st, | ||
type(states_elec_t), intent(out) | Vx_on_st, | ||
type(kpoints_t), intent(in) | kpoints | ||
) |
ISDF wrapper computing interpolation points and vectors, which are used to build the potential \(W_j=\left(V_x\left[\left\{\varphi_i\right\}\right] \psi_j\right)(\mathbf{r})\) used in adaptively-compressed exchange.
[in] | exxop | Exchange instance, containing Poisson solver settings, |
[in] | mesh | Real-space grid |
[in] | st | Current Kohn-Sham states |
[out] | vx_on_st | V_X operating on all states (W in ACE) |
subroutine, public isdf_oct_m::isdf_interpolation_vectors | ( | type(isdf_options_t), intent(in) | isdf, |
type(namespace_t), intent(in) | namespace, | ||
class(mesh_t), intent(in) | mesh, | ||
type(states_elec_t), intent(in) | st, | ||
type(centroids_t), intent(in) | centroids, | ||
real(real64), dimension(:, :), intent(out), allocatable | psi_mu, | ||
real(real64), dimension(:, :), intent(out), allocatable | P_r_mu, | ||
real(real64), dimension(:, :), intent(out), allocatable | isdf_vectors | ||
) |
|
private |
Construct the matrix-matrix product \(Z C^T\).
\[ Z C^T = P^{\varphi}_{\mathbf{r}, \mu} \cdot P^{\psi}_{\mathbf{r}, \mu} \]
which simplifies to:
\[ Z C^T = P^{\varphi}_{\mathbf{r}, \mu} \cdot P^{\varphi}_{\mathbf{r}, \mu} \]
if only one set of KS states is supplied.
[in] | p_phi | Quasi-density matrix, |
[in] | p_psi | Quasi-density matrix, |
[out] | zct | Array should be allocated by the caller |
|
private |
Construct the coefficient product matrix \([CC^T]\).
\( CC^T \) is defined as the element-wise product of \(P^{\varphi}(\mathbf{r}_\mu, \mathbf{r}_\nu)\) and \( P^{\psi}(\mathbf{r}_\mu, \mathbf{r}_\nu)\):
\[ CC^T = P^{\varphi} \circ P^{\psi} \]
If only one set of KS wave functions is used, this reduces to the element-wise squaring of f$P^{\varphi}(\mathbf{r}_\mu, \mathbf{r}_\nu)
[in] | p_phi | Quasi-density matrix, |
[in] | p_psi | Quasi-density matrix, |
[out] | cct | coefficient products |
subroutine, public isdf_oct_m::isdf_gram_matrix | ( | class(mesh_t), intent(in) | mesh, |
real(real64), dimension(:, :), intent(in), contiguous | isdf_vectors, | ||
real(real64), dimension(:, :), intent(out), contiguous | gram_matrix | ||
) |
|
private |
Construct a 2D array of states, defined only at a specific subset of grid points.
\( \{ \varphi_i(\mathbf{r}_\mu) \} \).
State index of psi_mu is defined as a contiguous index over all states in batches [stgroupblock_start, stgroupblock_end]. This is MPI-distributed, and can stay distributed as the states index is only ever reduced in this implementation .
The inner loop over centroids will only touch interpolation point indices defined in this domain, but psi_mu is initialised to zero and indexed over all interpolation points (all domains), allowing allreduce to gather the contributions. Hence the need for a mapping from a domain-local centroid index to a global centroid index.
[in] | st | States |
[in] | centroids | Centroids container |
[in] | max_state | Global index of highest state to include in the expansion |
[out] | psi_mu | \(\varphi_i(\mathbf{r}_\mu)\) |
|
private |
Compute the quasi-density matrix where one spatial coordinate is defined at grid points and the is defined at interpolation points.
The quasi-density matrix is defined as:
\[ P^{\varphi}(\mathbf{r}, \mathbf{r}_\mu) = \sum_i^m \varphi_i(\mathbf{r}) \varphi_i(\mathbf{r}_\mu) \]
where \( \varphi_i(\mathbf{r}) \) is a KS state, and \((\mu, \nu) \) are interpolation point indices.
[in] | st | States |
[in] | max_state | Global index of highest state to include in the expansion |
[in] | psi_mu | States sampled at interpolation points, |
[out] | p_r_mu | Quasi-density matrix, with expected shape(np, n_int) |
|
private |
Compute the action of the exchange potential on KS states for adaptively-compressed exchange.
\[ W_j(\mathbf{r}) = - \alpha_{CAM} \sum_{\mu} f_{j} P_{\mathbf{r}, \mu} V_{\mathbf{r}, \mu} \phi_j(\mathbf{r}_\mu). \]
where \( \alpha_{CAM} \) defines the Couloumb-attenuated method alpha parameter and \( f_{j} \) defines the state occupations. All weights and prefactors are absorbed into this expression. The KS states defined at interpolation points, \( \psi_i(\mathbf{r}_\mu) \), and the quasi-density matrix,
[in] | exxop | Exchange instance, containing Poisson solver settings, |
[in] | mesh | Real-space grid |
[in] | st | Current Kohn-Sham states |
[in] | psi_mu | Batched array of wave functions |
[in] | p_r_mu | Quasi-density matrix, |
[in] | isdf_vectors | ISDF vectors |
[in,out] | vx_on_st | V_X operating on all states (W in ACE) |