101 type(states_elec_t),
intent(inout) :: st
102 type(namespace_t),
intent(in) :: namespace
103 class(mesh_t),
intent(in) :: mesh
109 do ik = st%d%kpt%start, st%d%kpt%end
124 type(grid_t),
intent(in) :: grid
125 type(kpoints_t),
intent(in) :: kpoints
126 type(states_elec_t),
intent(in) :: st
127 real(real64),
contiguous,
intent(out) :: norm_ks(:, :)
129 integer :: ik_ispin, iblock, minst, maxst
137 do ik_ispin = st%d%kpt%start, st%d%kpt%end
138 do iblock = st%group%block_start, st%group%block_end
142 call mesh_batch_nrm2(grid, st%group%psib(iblock, ik_ispin), norm_ks(minst:maxst, ik_ispin), reduce=.false.)
147 if (grid%parallel_in_domains)
then
149 call grid%allreduce(norm_ks)
150 norm_ks =
sqrt(norm_ks)
163#include "states_elec_calc_inc.F90"
166#include "complex.F90"
167#include "states_elec_calc_inc.F90"
double sqrt(double __x) __attribute__((__nothrow__
This module implements batches of mesh functions.
This module implements common operations on batches of mesh functions.
This module contains interfaces for BLACS routines Interfaces are from http:
This module contains interfaces for BLAS routines You should not use these routines directly....
This module calculates the derivatives (gradients, Laplacians, etc.) of a function.
real(real64), parameter, public m_zero
This module implements the underlying real-space grid.
This module is intended to contain "only mathematical" functions and procedures.
This module defines functions over batches of mesh functions.
subroutine, public mesh_batch_nrm2(mesh, aa, nrm2, reduce)
Calculate the norms (norm2, not the square!) of a batch of mesh functions.
This module defines various routines, operating on mesh functions.
This module defines the meshes, which are used in Octopus.
This module contains some common usage patterns of MPI routines.
Some general things and nomenclature:
This module contains interfaces for ScaLAPACK routines Interfaces are from http:
pure logical function, public states_are_real(st)
subroutine, public zstates_elec_matrix(st1, st2, mesh, aa)
subroutine, public states_elec_orthogonalize(st, namespace, mesh)
Orthogonalize electronic states.
subroutine, public zstates_elec_orthogonalize_single(st, mesh, nst, iqn, phi, normalize, mask, overlap, norm, Theta_fi, beta_ij, against_all)
ofthogonalize a single wave function against a set of states
subroutine, public dstates_elec_matrix(st1, st2, mesh, aa)
subroutine, public zstates_elec_calc_projections(st, gs_st, namespace, mesh, ik, proj, gs_nst)
This routine computes the projection between two set of states.
subroutine, public dstates_elec_orthogonalization_full(st, namespace, mesh, ik)
Orthonormalizes nst orbitals in mesh (honours state parallelization).
subroutine, public dstates_elec_rrqr_decomposition(st, namespace, mesh, nst, root, ik, jpvt)
Perform RRQR on the transpose states stored in the states object and return the pivot vector.
real(real64) function, public zstates_elec_residue(mesh, dim, hf, ee, ff)
subroutine, public zstates_elec_calc_orth_test(st, namespace, mesh, kpoints)
subroutine, public dstates_elec_orthogonalize_single_batch(st, mesh, nst, iqn, phi, normalize, mask, overlap, norm, Theta_fi, beta_ij, against_all)
orthogonalize a single wave function against a set of states
subroutine, public zstates_elec_rrqr_decomposition(st, namespace, mesh, nst, root, ik, jpvt)
Perform RRQR on the transpose states stored in the states object and return the pivot vector.
subroutine, public states_elec_calc_norms(grid, kpoints, st, norm_ks)
Compute the norms of the Kohn-Sham orbitals.
subroutine, public dstates_elec_calc_projections(st, gs_st, namespace, mesh, ik, proj, gs_nst)
This routine computes the projection between two set of states.
subroutine dstates_elec_rotate(st, mesh, uu, ik)
subroutine, public zstates_elec_orthogonalization(mesh, nst, dim, psi, phi, normalize, mask, overlap, norm, Theta_fi, beta_ij, gs_scheme)
Orthonormalizes phi to the nst orbitals psi.
subroutine, public dstates_elec_calc_orth_test(st, namespace, mesh, kpoints)
subroutine, public zstates_elec_calc_overlap(st, mesh, ik, overlap)
Computes the overlap matrix of the Kohn-Sham states with k-point ik.
subroutine, public dstates_elec_orthogonalization(mesh, nst, dim, psi, phi, normalize, mask, overlap, norm, Theta_fi, beta_ij, gs_scheme)
Orthonormalizes phi to the nst orbitals psi.
subroutine, public dstates_elec_orthogonalize_single(st, mesh, nst, iqn, phi, normalize, mask, overlap, norm, Theta_fi, beta_ij, against_all)
ofthogonalize a single wave function against a set of states
subroutine, public zstates_elec_orthogonalize_single_batch(st, mesh, nst, iqn, phi, normalize, mask, overlap, norm, Theta_fi, beta_ij, against_all)
orthogonalize a single wave function against a set of states
subroutine, public zstates_elec_orthogonalization_full(st, namespace, mesh, ik)
Orthonormalizes nst orbitals in mesh (honours state parallelization).
subroutine zstates_elec_rotate(st, mesh, uu, ik)
real(real64) function, public dstates_elec_residue(mesh, dim, hf, ee, ff)
subroutine, public dstates_elec_calc_overlap(st, mesh, ik, overlap)
Computes the overlap matrix of the Kohn-Sham states with k-point ik.
This module handles spin dimensions of the states and the k-point distribution.
integer pure function, public states_elec_block_max(st, ib)
return index of last state in block ib
integer pure function, public states_elec_block_min(st, ib)
return index of first state in block ib
This module provides routines for communicating states when using states parallelization.