58 character(len=100) function kdotp_wfs_tag(dir, dir2)
result(str)
59 integer,
intent(in) :: dir
60 integer,
optional,
intent(in) :: dir2
65 if (
present(dir2)) str = trim(str) //
"_" //
index2axis(dir2)
81 type(namespace_t),
intent(in) :: namespace
82 class(space_t),
intent(in) :: space
83 type(grid_t),
intent(in) :: gr
84 type(states_elec_t),
intent(in) :: st
85 type(hamiltonian_elec_t),
intent(inout) :: hm
86 class(perturbation_t),
intent(inout) :: pert
87 real(real64),
intent(out) :: velocity(:,:,:)
89 integer :: ik, ist, idir, ib, ind
90 type(wfs_elec_t) :: pert_psib
91 complex(real64) :: dot(st%block_size)
93 push_sub(kdotp_calc_band_velocity)
97 pop_sub(kdotp_calc_band_velocity)
103 do ik = st%d%kpt%start, st%d%kpt%end
104 do ib = st%group%block_start, st%group%block_end
106 call st%group%psib(ib, ik)%copy_to(pert_psib)
108 do idir = 1, space%periodic_dim
109 call pert%setup_dir(idir)
110 call pert%apply_batch(namespace, space, gr, hm, st%group%psib(ib, ik), pert_psib)
114 do ind = 1, pert_psib%nst
115 ist = st%group%psib(ib, ik)%ist(ind)
116 velocity(idir, ist, ik) = -aimag(dot(ind))
123 if (st%parallel_in_states .or. st%d%kpt%parallel)
then
129 pop_sub(kdotp_calc_band_velocity)
134#include "kdotp_calc_inc.F90"
137#include "complex.F90"
138#include "kdotp_calc_inc.F90"
real(real64), parameter, public m_zero
This module implements the underlying real-space grid.
subroutine, public calc_band_velocity(namespace, space, gr, st, hm, pert, velocity)
Computes the k-point and band-resolved velocity.
subroutine, public dkdotp_add_occ(namespace, space, gr, st, hm, pert, kdotp_lr, degen_thres)
add projection onto occupied states, by sum over states
subroutine, public zkdotp_add_occ(namespace, space, gr, st, hm, pert, kdotp_lr, degen_thres)
add projection onto occupied states, by sum over states
subroutine, public dcalc_eff_mass_inv(namespace, space, gr, st, hm, lr, pert, eff_mass_inv, degen_thres)
Computes the effective mass tensor.
character(len=100) function, public kdotp_wfs_tag(dir, dir2)
subroutine, public zcalc_eff_mass_inv(namespace, space, gr, st, hm, lr, pert, eff_mass_inv, degen_thres)
Computes the effective mass tensor.
This module defines functions over batches of mesh functions.
subroutine, public zmesh_batch_dotp_vector(mesh, aa, bb, dot, reduce, cproduct)
calculate the vector of dot-products of mesh functions between two batches
This module defines various routines, operating on mesh functions.
This module defines the meshes, which are used in Octopus.
subroutine, public profiling_out(label)
Increment out counter and sum up difference between entry and exit time.
subroutine, public profiling_in(label, exclude)
Increment in counter and save entry time.
pure logical function, public states_are_real(st)
This module is intended to contain simple general-purpose utility functions and procedures.
character pure function, public index2axis(idir)