Interoperable Separable Density Fitting (ISDF) molecular implementation.
|
subroutine, public | interpolative_separable_density_fitting_vectors (namespace, mesh, st, centroids, 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 \(["@CMAKE_C_COMPILER@"^T]\). More...
|
|
subroutine, public | interpolation_vector_gram_matrix (mesh, isdf_vectors, gram_matrix) |
| Compute the Gram matrix for the ISDF interpolation vectors. More...
|
|
integer function | local_number_of_states (st, max_state) |
| Number of states contributing to the expansion, local to current process. More...
|
|
subroutine | gather_psi_mu_over_states (st, psi_mu, psi_global) |
| Gather state-distributed psi from multiple processes. More...
|
|
subroutine | output_psi_mu_for_all_states (namespace, st, max_state, psi_mu) |
| Output the gathered psi_mu for all states, such that the matrix is the same irregardless of state parallelism. 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 isdf_oct_m::pair_product_coefficient_matrix |
( |
real(real64), dimension(:, :), intent(in), target, contiguous |
p_phi, |
|
|
real(real64), dimension(:, :), intent(out), contiguous |
zct, |
|
|
real(real64), dimension(:, :), intent(in), optional, target, contiguous |
p_psi |
|
) |
| |
|
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.
- Parameters
-
[in] | p_phi | Quasi-density matrix, |
[in] | p_psi | Quasi-density matrix, |
[out] | zct | Array should be allocated by the caller |
Definition at line 266 of file isdf.F90.
subroutine isdf_oct_m::coefficient_product_matrix |
( |
real(real64), dimension(:, :), intent(in), target, contiguous |
p_phi, |
|
|
real(real64), dimension(:, :), intent(out), contiguous |
cct, |
|
|
real(real64), dimension(:, :), intent(in), optional, target, contiguous |
p_psi |
|
) |
| |
|
private |
Construct the coefficient product matrix \(["@CMAKE_C_COMPILER@"^T]\).
\( "@CMAKE_C_COMPILER@"^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)\):
\[
"@CMAKE_C_COMPILER@"^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)
- Parameters
-
[in] | p_phi | Quasi-density matrix, |
[in] | p_psi | Quasi-density matrix, |
[out] | cct | coefficient products |
Definition at line 324 of file isdf.F90.
integer function isdf_oct_m::local_number_of_states |
( |
type(states_elec_t), intent(in) |
st, |
|
|
integer, intent(in) |
max_state |
|
) |
| |
|
private |
Number of states contributing to the expansion, local to current process.
Number of states between the first state of the block 1 on this process and the min of max_state
and the last state of block N on this process. For processes where minst of the first block > max_state
, return 0.
- Parameters
-
[in] | st | States instance |
[in] | max_state | Index of final state to consider - Global state indexing |
Definition at line 418 of file isdf.F90.
subroutine isdf_oct_m::dphi_at_interpolation_points |
( |
class(mesh_t), intent(in) |
mesh, |
|
|
type(states_elec_t), intent(in) |
st, |
|
|
type(centroids_t), intent(in) |
centroids, |
|
|
integer, intent(in) |
max_state, |
|
|
real(real64), dimension(:, :), intent(out), allocatable |
psi_mu |
|
) |
| |
|
private |
Construct a 2D array of states, defined only at a specific subset of grid points.
\( \{ \varphi_i(\mathbf{r}_\mu) \} \).
Implementation Details
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.
- Parameters
-
[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)\) |
Definition at line 600 of file isdf.F90.
subroutine isdf_oct_m::dquasi_density_matrix_at_mesh_centroid_points |
( |
type(states_elec_t), intent(in) |
st, |
|
|
integer, intent(in) |
max_state, |
|
|
real(real64), dimension(:, :), intent(in), contiguous |
psi_mu, |
|
|
real(real64), dimension(:, :), intent(out), contiguous |
p_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.
- Parameters
-
[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) |
Definition at line 685 of file isdf.F90.