![]() |
Octopus
|
Data Types | |
| type | projector_t |
| The projector data type is intended to hold the local and non-local parts of the pseudopotentials. The definition of the action of a projector (which is done through the X(project) subroutine) depends on the type of the projector. More... | |
Functions/Subroutines | |
| logical elemental function, public | projector_is_null (p) |
| logical elemental function, public | projector_is (p, type) |
| logical elemental function, public | projector_has_augmentation (p) |
| Whether the projector carries an augmentation contribution (charge augmentation Q_ij and a generalized overlap S). More... | |
| subroutine, public | projector_init (p, pseudo, namespace, dim, reltype) |
| subroutine, public | projector_init_phases (this, dim, std, bnd, kpoints, vec_pot, vec_pot_var) |
| subroutine, public | projector_build (p, ps, so_strength, dgrid, namespace, nspin, kpt_st_grp, fill_values, aug_species) |
| subroutine, public | projector_check_discretization (pseudo, sm, namespace) |
| Check how well the nonlocal projectors are resolved on the real-space grid. More... | |
| subroutine, public | projector_bcast_fill (p, grp, root) |
| Broadcast the projector values built by the owning rank of an atom-distributed projector build. More... | |
| subroutine | projector_build_aug_qflm (p, ps, dgrid, kpt_st_grp) |
| Build the effective (double-grid transformed) ultrasoft augmentation. More... | |
| subroutine, public | projector_aug_pair_to_columns (proj, pmat, ncomp, pairw, wcol) |
| Apply the Gaunt coupling between projection pairs and the combined augmentation columns: wcol(col, c) += sum_{(i,j) -> col} gaunt * pairw(i, j, c). This is the common kernel of every scatter-side augmentation consumer (augmentation density, forces, current); the grid work then reduces to acc = aug_qflm . wcol (one gemv per component). Zero-weight pairs are skipped. More... | |
| subroutine, public | projector_aug_columns_to_pairs (proj, pmat, ncomp, wq, pairm) |
| Contract combined-column values back to the projection-pair matrix: pairm(i, j, c) = sum_{(i,j) -> col} gaunt * wq(col, c). This is the common kernel of every dot-product-side augmentation consumer (D_ij screening, augmentation moments, forces), applied after the grid reduction wq = aug_qflm^T . (gathered field) (one gemv per component). More... | |
| subroutine, public | projector_end (p) |
| subroutine, public | dproject_psi (mesh, bnd, pj, npj, dim, psi, ppsi, ik) |
| dproject_psi calculates the action of a projector on the psi wavefunction. The result is summed up to ppsi More... | |
| subroutine, public | dproject_psi_batch (mesh, bnd, pj, npj, dim, psib, ppsib) |
| To optimize the application of the non-local operator in parallel, the projectors are applied in steps. More... | |
| real(real64) function, public | dprojector_matrix_element (pj, bnd, dim, ik, psia, psib) |
| dprojector_matrix_element calculates <psia|projector|psib> More... | |
| subroutine | dproject_sphere (mesh, pj, dim, psi, ppsi) |
| subroutine, public | dprojector_commute_r (pj, mesh, bnd, dim, idir, ik, psi, cpsi) |
| This function calculates |cpsi> += [x, V_nl] |psi> More... | |
| subroutine, public | dprojector_commute_r_allatoms_alldir (pj, ions, mesh, dim, bnd, ik, psi, cpsi) |
| This function calculates |cpsi> += [x, V_nl] |psi> More... | |
| subroutine, public | zproject_psi (mesh, bnd, pj, npj, dim, psi, ppsi, ik) |
| zproject_psi calculates the action of a projector on the psi wavefunction. The result is summed up to ppsi More... | |
| subroutine, public | zproject_psi_batch (mesh, bnd, pj, npj, dim, psib, ppsib) |
| To optimize the application of the non-local operator in parallel, the projectors are applied in steps. More... | |
| complex(real64) function, public | zprojector_matrix_element (pj, bnd, dim, ik, psia, psib) |
| zprojector_matrix_element calculates <psia|projector|psib> More... | |
| subroutine | zproject_sphere (mesh, pj, dim, psi, ppsi) |
| subroutine, public | zprojector_commute_r (pj, mesh, bnd, dim, idir, ik, psi, cpsi) |
| This function calculates |cpsi> += [x, V_nl] |psi> More... | |
| subroutine, public | zprojector_commute_r_allatoms_alldir (pj, ions, mesh, dim, bnd, ik, psi, cpsi) |
| This function calculates |cpsi> += [x, V_nl] |psi> More... | |
Variables | |
| integer, parameter | max_nprojections = 4 |
| integer, parameter | max_l = 5 |
| logical elemental function, public projector_oct_m::projector_is_null | ( | type(projector_t), intent(in) | p | ) |
Definition at line 196 of file projector.F90.
| logical elemental function, public projector_oct_m::projector_is | ( | type(projector_t), intent(in) | p, |
| integer, intent(in) | type | ||
| ) |
Definition at line 203 of file projector.F90.
| logical elemental function, public projector_oct_m::projector_has_augmentation | ( | type(projector_t), intent(in) | p | ) |
Whether the projector carries an augmentation contribution (charge augmentation Q_ij and a generalized overlap S).
Definition at line 212 of file projector.F90.
| subroutine, public projector_oct_m::projector_init | ( | type(projector_t), intent(inout) | p, |
| type(pseudopotential_t), intent(in), target | pseudo, | ||
| type(namespace_t), intent(in) | namespace, | ||
| integer, intent(in) | dim, | ||
| integer, intent(in) | reltype | ||
| ) |
Definition at line 218 of file projector.F90.
| subroutine, public projector_oct_m::projector_init_phases | ( | type(projector_t), intent(inout) | this, |
| integer, intent(in) | dim, | ||
| type(states_elec_dim_t), intent(in) | std, | ||
| type(boundaries_t), intent(in) | bnd, | ||
| type(kpoints_t), intent(in) | kpoints, | ||
| real(real64), dimension(:), intent(in), optional, allocatable | vec_pot, | ||
| real(real64), dimension(:, :), intent(in), optional, allocatable | vec_pot_var | ||
| ) |
| [in] | vec_pot | (dim) |
| [in] | vec_pot_var | (1:dim, 1:ns) |
Definition at line 275 of file projector.F90.
| subroutine, public projector_oct_m::projector_build | ( | type(projector_t), intent(inout) | p, |
| class(pseudopotential_t), intent(in) | ps, | ||
| real(real64), intent(in) | so_strength, | ||
| type(double_grid_t), intent(in) | dgrid, | ||
| type(namespace_t), intent(in) | namespace, | ||
| integer, intent(in) | nspin, | ||
| type(mpi_grp_t), intent(in), optional | kpt_st_grp, | ||
| logical, intent(in), optional | fill_values, | ||
| type(augmentation_species_t), intent(in), optional, target | aug_species | ||
| ) |
| [in] | nspin | PAW one-center spin channels (1 or 2); 0 disables the one-center engine (e.g. spinors) |
| [in] | kpt_st_grp | distribute the augmentation transforms over this plane |
| [in] | fill_values | Evaluate the KB projector values (default). Atom-distributed builds pass .false. on non-owning ranks and broadcast them afterwards with projector_bcast_fill. |
Definition at line 354 of file projector.F90.
| subroutine, public projector_oct_m::projector_check_discretization | ( | class(pseudopotential_t), intent(in), target | pseudo, |
| type(submesh_t), intent(in) | sm, | ||
| type(namespace_t), intent(in) | namespace | ||
| ) |
Check how well the nonlocal projectors are resolved on the real-space grid.
For each projector, the norm evaluated on the submesh is compared with the norm computed from the radial grid of the pseudopotential. A large deviation means that the grid spacing is too coarse to sample the projectors, which typically produces spurious states that silently corrupt the results.
Warn when a projector norm on the grid deviates by more than this from its radial-grid value
Definition at line 486 of file projector.F90.
| subroutine, public projector_oct_m::projector_bcast_fill | ( | type(projector_t), intent(inout) | p, |
| type(mpi_grp_t), intent(in) | grp, | ||
| integer, intent(in) | root | ||
| ) |
Broadcast the projector values built by the owning rank of an atom-distributed projector build.
Definition at line 555 of file projector.F90.
|
private |
Build the effective (double-grid transformed) ultrasoft augmentation.
The transform does not commute with the radial x angular factorization used by aug_qfunc/aug_ylm, so the full localized functions Q_ij^L(r) Y_LM(x) are transformed and stored as combined columns, one per symmetric beta pair (i <= j; Q_ij^L = Q_ji^L) and Gaunt-live (L, M). aug_qflm_map sends (pair_index, lm) of both pair orders to the column, so the consumers keep their pair/Gaunt loop structure unchanged.
Definition at line 586 of file projector.F90.
| subroutine, public projector_oct_m::projector_aug_pair_to_columns | ( | type(projector_t), intent(in) | proj, |
| type(projector_matrix_t), intent(in) | pmat, | ||
| integer, intent(in) | ncomp, | ||
| real(real64), dimension(:, :, :), intent(in) | pairw, | ||
| real(real64), dimension(:, :), intent(inout) | wcol | ||
| ) |
Apply the Gaunt coupling between projection pairs and the combined augmentation columns: wcol(col, c) += sum_{(i,j) -> col} gaunt * pairw(i, j, c). This is the common kernel of every scatter-side augmentation consumer (augmentation density, forces, current); the grid work then reduces to acc = aug_qflm . wcol (one gemv per component). Zero-weight pairs are skipped.
| [in] | pairw | (nprojs, nprojs, ncomp) |
| [in,out] | wcol | (aug_qflm_ncombo, ncomp) |
Definition at line 739 of file projector.F90.
| subroutine, public projector_oct_m::projector_aug_columns_to_pairs | ( | type(projector_t), intent(in) | proj, |
| type(projector_matrix_t), intent(in) | pmat, | ||
| integer, intent(in) | ncomp, | ||
| real(real64), dimension(:, :), intent(in) | wq, | ||
| real(real64), dimension(:, :, :), intent(out) | pairm | ||
| ) |
Contract combined-column values back to the projection-pair matrix: pairm(i, j, c) = sum_{(i,j) -> col} gaunt * wq(col, c). This is the common kernel of every dot-product-side augmentation consumer (D_ij screening, augmentation moments, forces), applied after the grid reduction wq = aug_qflm^T . (gathered field) (one gemv per component).
| [in] | wq | (aug_qflm_ncombo, ncomp) |
| [out] | pairm | (nprojs, nprojs, ncomp) |
Definition at line 785 of file projector.F90.
| subroutine, public projector_oct_m::projector_end | ( | type(projector_t), intent(inout) | p | ) |
Definition at line 822 of file projector.F90.
| subroutine, public projector_oct_m::dproject_psi | ( | class(mesh_t), intent(in) | mesh, |
| type(boundaries_t), intent(in) | bnd, | ||
| type(projector_t), dimension(:), intent(in), contiguous | pj, | ||
| integer, intent(in) | npj, | ||
| integer, intent(in) | dim, | ||
| real(real64), dimension(:, :), intent(inout), contiguous | psi, | ||
| real(real64), dimension(:, :), intent(inout), contiguous | ppsi, | ||
| integer, intent(in) | ik | ||
| ) |
dproject_psi calculates the action of a projector on the psi wavefunction. The result is summed up to ppsi
| [in,out] | psi | (1:meshnp, dim) |
| [in,out] | ppsi | (1:meshnp, dim) |
Definition at line 944 of file projector.F90.
| subroutine, public projector_oct_m::dproject_psi_batch | ( | class(mesh_t), intent(in) | mesh, |
| type(boundaries_t), intent(in) | bnd, | ||
| type(projector_t), dimension(:), intent(in), contiguous | pj, | ||
| integer, intent(in) | npj, | ||
| integer, intent(in) | dim, | ||
| type(wfs_elec_t), intent(in) | psib, | ||
| type(wfs_elec_t), intent(inout) | ppsib | ||
| ) |
To optimize the application of the non-local operator in parallel, the projectors are applied in steps.
First the <p|psi> is calculated for all projectors and the result is stored on an array (reduce_buffer). Then the array is reduced (as it is contiguous only one reduction is required). Finally |ppsi> += |p><p|psi> is calculated.
| [in] | npj | Number of atoms |
Definition at line 979 of file projector.F90.
| real(real64) function, public projector_oct_m::dprojector_matrix_element | ( | type(projector_t), intent(in), target | pj, |
| type(boundaries_t), intent(in) | bnd, | ||
| integer, intent(in) | dim, | ||
| integer, intent(in) | ik, | ||
| real(real64), dimension(:, :), intent(in) | psia, | ||
| real(real64), dimension(:, :), intent(in) | psib | ||
| ) |
dprojector_matrix_element calculates <psia|projector|psib>
| [in] | psia | psia(1:meshnp, dim) |
| [in] | psib | psib(1:meshnp, dim) |
Definition at line 1276 of file projector.F90.
|
private |
Definition at line 1353 of file projector.F90.
| subroutine, public projector_oct_m::dprojector_commute_r | ( | type(projector_t), intent(in), target | pj, |
| class(mesh_t), intent(in) | mesh, | ||
| type(boundaries_t), intent(in) | bnd, | ||
| integer, intent(in) | dim, | ||
| integer, intent(in) | idir, | ||
| integer, intent(in) | ik, | ||
| real(real64), dimension(:, :), intent(in), contiguous | psi, | ||
| real(real64), dimension(:,:), intent(inout), contiguous | cpsi | ||
| ) |
This function calculates |cpsi> += [x, V_nl] |psi>
Definition at line 1395 of file projector.F90.
| subroutine, public projector_oct_m::dprojector_commute_r_allatoms_alldir | ( | type(projector_t), dimension(:), intent(in), target, contiguous | pj, |
| type(ions_t), intent(in) | ions, | ||
| class(mesh_t), intent(in) | mesh, | ||
| integer, intent(in) | dim, | ||
| type(boundaries_t), intent(in) | bnd, | ||
| integer, intent(in) | ik, | ||
| real(real64), dimension(:, :), intent(in), contiguous | psi, | ||
| real(real64), dimension(:,:,:), intent(inout), contiguous | cpsi | ||
| ) |
This function calculates |cpsi> += [x, V_nl] |psi>
Definition at line 1480 of file projector.F90.
| subroutine, public projector_oct_m::zproject_psi | ( | class(mesh_t), intent(in) | mesh, |
| type(boundaries_t), intent(in) | bnd, | ||
| type(projector_t), dimension(:), intent(in), contiguous | pj, | ||
| integer, intent(in) | npj, | ||
| integer, intent(in) | dim, | ||
| complex(real64), dimension(:, :), intent(inout), contiguous | psi, | ||
| complex(real64), dimension(:, :), intent(inout), contiguous | ppsi, | ||
| integer, intent(in) | ik | ||
| ) |
zproject_psi calculates the action of a projector on the psi wavefunction. The result is summed up to ppsi
| [in,out] | psi | (1:meshnp, dim) |
| [in,out] | ppsi | (1:meshnp, dim) |
Definition at line 1652 of file projector.F90.
| subroutine, public projector_oct_m::zproject_psi_batch | ( | class(mesh_t), intent(in) | mesh, |
| type(boundaries_t), intent(in) | bnd, | ||
| type(projector_t), dimension(:), intent(in), contiguous | pj, | ||
| integer, intent(in) | npj, | ||
| integer, intent(in) | dim, | ||
| type(wfs_elec_t), intent(in) | psib, | ||
| type(wfs_elec_t), intent(inout) | ppsib | ||
| ) |
To optimize the application of the non-local operator in parallel, the projectors are applied in steps.
First the <p|psi> is calculated for all projectors and the result is stored on an array (reduce_buffer). Then the array is reduced (as it is contiguous only one reduction is required). Finally |ppsi> += |p><p|psi> is calculated.
| [in] | npj | Number of atoms |
Definition at line 1687 of file projector.F90.
| complex(real64) function, public projector_oct_m::zprojector_matrix_element | ( | type(projector_t), intent(in), target | pj, |
| type(boundaries_t), intent(in) | bnd, | ||
| integer, intent(in) | dim, | ||
| integer, intent(in) | ik, | ||
| complex(real64), dimension(:, :), intent(in) | psia, | ||
| complex(real64), dimension(:, :), intent(in) | psib | ||
| ) |
zprojector_matrix_element calculates <psia|projector|psib>
| [in] | psia | psia(1:meshnp, dim) |
| [in] | psib | psib(1:meshnp, dim) |
Definition at line 1984 of file projector.F90.
|
private |
Definition at line 2061 of file projector.F90.
| subroutine, public projector_oct_m::zprojector_commute_r | ( | type(projector_t), intent(in), target | pj, |
| class(mesh_t), intent(in) | mesh, | ||
| type(boundaries_t), intent(in) | bnd, | ||
| integer, intent(in) | dim, | ||
| integer, intent(in) | idir, | ||
| integer, intent(in) | ik, | ||
| complex(real64), dimension(:, :), intent(in), contiguous | psi, | ||
| complex(real64), dimension(:,:), intent(inout), contiguous | cpsi | ||
| ) |
This function calculates |cpsi> += [x, V_nl] |psi>
Definition at line 2103 of file projector.F90.
| subroutine, public projector_oct_m::zprojector_commute_r_allatoms_alldir | ( | type(projector_t), dimension(:), intent(in), target, contiguous | pj, |
| type(ions_t), intent(in) | ions, | ||
| class(mesh_t), intent(in) | mesh, | ||
| integer, intent(in) | dim, | ||
| type(boundaries_t), intent(in) | bnd, | ||
| integer, intent(in) | ik, | ||
| complex(real64), dimension(:, :), intent(in), contiguous | psi, | ||
| complex(real64), dimension(:,:,:), intent(inout), contiguous | cpsi | ||
| ) |
This function calculates |cpsi> += [x, V_nl] |psi>
Definition at line 2188 of file projector.F90.
|
private |
Definition at line 153 of file projector.F90.
|
private |
Definition at line 154 of file projector.F90.