41 use,
intrinsic :: iso_fortran_env
87 real(real64),
contiguous,
pointer :: density(:, :)
89 type(states_elec_t),
pointer :: st => null()
90 type(grid_t),
pointer :: gr => null()
91 type(epot_t),
pointer :: ep => null()
92 type(nonlocal_pseudopotential_t),
pointer :: vnl => null()
93 type(phase_t),
pointer :: phase => null()
94 type(accel_mem_t) :: buff_density
107 type(density_calc_t),
intent(out) :: this
108 type(states_elec_t),
target,
intent(in) :: st
109 type(grid_t),
target,
intent(in) :: gr
110 real(real64),
contiguous,
target,
intent(out) :: density(:, :)
111 type(epot_t),
optional,
target,
intent(in) :: ep
112 type(nonlocal_pseudopotential_t),
optional,
target,
intent(inout) :: vnl
113 type(phase_t),
optional,
target,
intent(in) :: phase
116 logical :: correct_size
126 if (st%requires_generalized_overlap)
then
127 if (.not.
present(ep) .or. .not.
present(vnl))
then
132 if (
present(phase)) this%phase => phase
134 if (
allocated(this%vnl%onsite_density_matrix)) this%vnl%onsite_density_matrix =
m_zero
135 if (
allocated(this%vnl%onsite_current_matrix)) this%vnl%onsite_current_matrix =
m_zero
138 this%density => density
140 do ispin = 1, st%d%nspin
143 this%density(ip, ispin) =
m_zero
149 this%packed = .false.
151 correct_size = ubound(this%density, dim = 1) == this%gr%np .or. &
152 ubound(this%density, dim = 1) == this%gr%np_part
163 logical,
optional,
intent(in) :: async
185 integer,
intent(in) :: istin
187 integer :: ist, ip, ispin, istin_, bsize, gsize
188 complex(real64) :: term, psi1, psi2
189 real(real64),
allocatable :: weight(:)
196 ispin = this%st%d%get_spin_index(psib%ik)
200 safe_allocate(weight(1:psib%nst))
202 weight(ist) = this%st%kweights(psib%ik)*this%st%occ(psib%ist(ist), psib%ik)
203 if (psib%ist(ist) == istin) istin_ = ist
208 if (abs(weight(istin_)) <=
m_epsilon)
then
218 select case (psib%status())
220 select case (this%st%d%ispin)
224 do ip = 1, this%gr%np
225 this%density(ip, ispin) = this%density(ip, ispin) + weight(ist)*psib%dff(ip, 1, ist)**2
229 do ip = 1, this%gr%np
230 this%density(ip, ispin) = this%density(ip, ispin) + weight(ist)* &
231 real(conjg(psib%zff(ip, 1, ist))*psib%zff(ip, 1, ist), real64)
236 do ip = 1, this%gr%np
237 psi1 = psib%zff(ip, 1, ist)
238 psi2 = psib%zff(ip, 2, ist)
239 this%density(ip, 1) = this%density(ip, 1) + weight(ist)*real(conjg(psi1)*psi1, real64)
240 this%density(ip, 2) = this%density(ip, 2) + weight(ist)*real(conjg(psi2)*psi2, real64)
241 term = weight(ist)*psi1*conjg(psi2)
242 this%density(ip, 3) = this%density(ip, 3) + real(term, real64)
243 this%density(ip, 4) = this%density(ip, 4) + aimag(term)
249 select case (this%st%d%ispin)
253 do ip = 1, this%gr%np
254 this%density(ip, ispin) = this%density(ip, ispin) + weight(ist)*psib%dff_pack(ist, ip)**2
259 do ip = 1, this%gr%np
260 this%density(ip, ispin) = this%density(ip, ispin) + weight(ist)* &
261 real(conjg(psib%zff_pack(ist, ip))*psib%zff_pack(ist, ip), real64)
265 assert(mod(psib%nst_linear, 2) == 0)
267 do ip = 1, this%gr%np
268 psi1 = psib%zff_pack(2*ist - 1, ip)
269 psi2 = psib%zff_pack(2*ist, ip)
270 term = weight(ist)*psi1*conjg(psi2)
272 this%density(ip, 1) = this%density(ip, 1) + weight(ist)*real(conjg(psi1)*psi1, real64)
273 this%density(ip, 2) = this%density(ip, 2) + weight(ist)*real(conjg(psi2)*psi2, real64)
274 this%density(ip, 3) = this%density(ip, 3) + real(term, real64)
275 this%density(ip, 4) = this%density(ip, 4) + aimag(term)
285 select case (this%st%d%ispin)
323 if (this%st%requires_generalized_overlap)
then
327 safe_deallocate_a(weight)
340 logical,
optional,
intent(in) :: async
342 integer :: ist, ip, ispin, bsize, gsize
343 complex(real64) :: term, psi1, psi2
344 real(real64),
allocatable :: weight(:)
351 ispin = this%st%d%get_spin_index(psib%ik)
353 safe_allocate(weight(1:psib%nst))
355 weight(ist) = this%st%kweights(psib%ik)*this%st%occ(psib%ist(ist), psib%ik)
358 select case (psib%status())
360 select case (this%st%d%ispin)
366 do ip = 1, this%gr%np
367 this%density(ip, ispin) = this%density(ip, ispin) + weight(ist)*psib%dff(ip, 1, ist)**2
374 do ip = 1, this%gr%np
375 this%density(ip, ispin) = this%density(ip, ispin) + weight(ist)* &
376 real(conjg(psib%zff(ip, 1, ist))*psib%zff(ip, 1, ist), real64)
384 do ip = 1, this%gr%np
385 psi1 = psib%zff(ip, 1, ist)
386 psi2 = psib%zff(ip, 2, ist)
387 this%density(ip, 1) = this%density(ip, 1) + weight(ist)*real(conjg(psi1)*psi1, real64)
388 this%density(ip, 2) = this%density(ip, 2) + weight(ist)*real(conjg(psi2)*psi2, real64)
389 term = weight(ist)*psi1*conjg(psi2)
390 this%density(ip, 3) = this%density(ip, 3) + real(term, real64)
391 this%density(ip, 4) = this%density(ip, 4) + aimag(term)
398 select case (this%st%d%ispin)
402 do ip = 1, this%gr%np
404 this%density(ip, ispin) = this%density(ip, ispin) + weight(ist)*psib%dff_pack(ist, ip)**2
409 do ip = 1, this%gr%np
411 this%density(ip, ispin) = this%density(ip, ispin) + weight(ist)* &
412 real(conjg(psib%zff_pack(ist, ip))*psib%zff_pack(ist, ip), real64)
417 assert(mod(psib%nst_linear, 2) == 0)
419 do ip = 1, this%gr%np
421 psi1 = psib%zff_pack(2*ist - 1, ip)
422 psi2 = psib%zff_pack(2*ist, ip)
423 term = weight(ist)*psi1*conjg(psi2)
425 this%density(ip, 1) = this%density(ip, 1) + weight(ist)*real(conjg(psi1)*psi1, real64)
426 this%density(ip, 2) = this%density(ip, 2) + weight(ist)*real(conjg(psi2)*psi2, real64)
427 this%density(ip, 3) = this%density(ip, 3) + real(term, real64)
428 this%density(ip, 4) = this%density(ip, 4) + aimag(term)
439 select case (this%st%d%ispin)
482 if (this%st%requires_generalized_overlap)
then
486 safe_deallocate_a(weight)
489 if (this%st%d%ispin /=
spinors)
then
512 integer,
intent(in) :: ispin
513 real(real64),
intent(in) :: weight(:)
515 integer :: imat, iatom, is, ip, np
516 integer :: ncomp, icomp, comp_map(4)
517 real(real64),
allocatable :: beta_density(:, :, :, :)
518 real(real64),
allocatable :: beta_current(:, :, :, :)
519 complex(real64),
allocatable :: beta_density_cmplx(:, :, :, :, :)
520 real(real64),
allocatable :: acc(:, :), wcol(:, :)
528 assert(
associated(this%ep))
529 assert(
associated(this%vnl))
530 assert(.not. this%gr%use_curvilinear)
531 assert(this%vnl%apply_projector_matrices)
541 if (
associated(this%phase)) do_phase = this%phase%is_allocated()
548 if (this%st%d%ispin ==
spinors)
then
550 comp_map(1:4) = [1, 2, 3, 4]
557 if (do_phase .and. .not. psib%has_phase)
then
558 call psib%copy_to(phased_psib)
559 call this%phase%apply_to(this%gr, this%gr%np, .false., phased_psib, src = psib)
560 phased_psib%has_phase = .
true.
562 weight, beta_density_cmplx)
563 call phased_psib%end()
566 weight, beta_density_cmplx)
568 safe_allocate(beta_density(1:this%vnl%max_nprojs, 1:this%vnl%max_nprojs, 1:this%vnl%nprojector_matrices, 1:4))
571 beta_current = beta_current)
572 safe_deallocate_a(beta_density_cmplx)
573 else if (this%st%d%ispin ==
spinors)
then
576 if (do_phase .and. .not. psib%has_phase)
then
577 call psib%copy_to(phased_psib)
578 call this%phase%apply_to(this%gr, this%gr%np, .false., phased_psib, src = psib)
579 phased_psib%has_phase = .
true.
581 weight, beta_density, beta_current = beta_current)
582 call phased_psib%end()
585 weight, beta_density, beta_current = beta_current)
589 else if (do_phase .and. .not. psib%has_phase)
then
590 call psib%copy_to(phased_psib)
591 call this%phase%apply_to(this%gr, this%gr%np, .false., phased_psib, src = psib)
592 phased_psib%has_phase = .
true.
594 beta_density, beta_current = beta_current)
595 call phased_psib%end()
601 beta_density, beta_current = beta_current)
605 if (
allocated(this%vnl%onsite_density_matrix))
then
606 assert(
size(this%vnl%onsite_density_matrix, 4) ==
size(beta_density, 4))
607 this%vnl%onsite_density_matrix = this%vnl%onsite_density_matrix + beta_density
610 if (
allocated(this%vnl%onsite_current_matrix) .and.
allocated(beta_current))
then
611 assert(
size(this%vnl%onsite_current_matrix, 4) ==
size(beta_current, 4))
612 this%vnl%onsite_current_matrix = this%vnl%onsite_current_matrix + beta_current
615 do imat = 1, this%vnl%nprojector_matrices
616 pmat => this%vnl%projector_matrices(imat)
617 iatom = this%vnl%projector_to_atom(imat)
618 proj => this%ep%proj(iatom)
621 assert(
allocated(proj%aug%qflm))
622 assert(proj%aug%qfunc_nbeta > 0)
623 assert(proj%aug%qfunc_lmax >= 0)
632 safe_allocate(wcol(1:proj%aug%qflm_ncombo, 1:ncomp))
635 beta_density(:, :, imat, comp_map(1):comp_map(ncomp)), wcol)
638 safe_allocate(acc(1:np, 1:ncomp))
640 call blas_gemv(
'N', np, proj%aug%qflm_ncombo,
m_one, proj%aug%qflm(1, 1), np, &
641 wcol(1, icomp), 1,
m_zero, acc(1, icomp), 1)
648 this%density(ip, comp_map(icomp)) = this%density(ip, comp_map(icomp)) + acc(is, icomp)
651 safe_deallocate_a(acc)
654 safe_deallocate_a(wcol)
657 safe_deallocate_a(beta_density)
658 safe_deallocate_a(beta_current)
672 logical,
optional,
intent(in) :: allreduce
673 logical,
optional,
intent(in) :: symmetrize
674 type(
accel_mem_t),
optional,
intent(inout) :: buff_density
677 real(real64),
allocatable :: tmpdensity(:)
678 logical :: was_packed
680 logical:: allreduce_local, symmetrize_local
686 allreduce_local = (this%st%parallel_in_states .or. this%st%d%kpt%parallel) .and.
optional_default(allreduce, .
true.)
689 was_packed = this%packed
690 if (this%packed)
then
691 this%packed = .false.
693 safe_allocate(tmpdensity(1:this%gr%np))
696 do ispin = 1, this%st%d%nspin
697 call accel_read_buffer(this%buff_density, int(this%gr%np, int64), tmpdensity, offset = (ispin - 1)*this%pnp)
700 do ip = 1, this%gr%np
701 this%density(ip, ispin) = this%density(ip, ispin) + tmpdensity(ip)
705 safe_deallocate_a(tmpdensity)
708 if (.not.
present(buff_density))
then
714 if (allreduce_local)
then
716 call comm_allreduce(this%st%st_kpt_mpi_grp, this%density, dim = (/this%gr%np, this%st%d%nspin/))
720 if (
associated(this%vnl))
then
721 if (
allocated(this%vnl%onsite_density_matrix) .and. allreduce_local)
then
722 call comm_allreduce(this%st%st_kpt_mpi_grp, this%vnl%onsite_density_matrix)
724 if (
allocated(this%vnl%onsite_current_matrix) .and. allreduce_local)
then
725 call comm_allreduce(this%st%st_kpt_mpi_grp, this%vnl%onsite_current_matrix)
729 if (symmetrize_local)
then
730 do ispin = 1, this%st%d%nspin
734 if (
associated(this%vnl))
then
739 if (
present(buff_density) .and. was_packed)
then
740 if (allreduce_local .or. symmetrize_local)
then
741 do ispin = 1, this%st%d%nspin
743 this%density(1:this%gr%np, ispin), &
744 offset=int((ispin - 1)*this%pnp, int64))
766 subroutine density_calc(st, gr, density, istin, ep, vnl, phase)
768 type(
grid_t),
intent(in) :: gr
769 real(real64),
contiguous,
intent(out) :: density(:, :)
770 integer,
optional,
intent(in) :: istin
771 type(
epot_t),
optional,
target,
intent(in) :: ep
773 type(
phase_t),
optional,
target,
intent(in) :: phase
780 assert(ubound(density, dim = 1) == gr%np .or. ubound(density, dim = 1) == gr%np_part)
782 if (st%requires_generalized_overlap .and.
present(istin))
then
788 if (.not.
present(istin))
then
790 do ik = st%d%kpt%start, st%d%kpt%end
791 do ib = st%group%block_start, st%group%block_end
798 do ik = st%d%kpt%start, st%d%kpt%end
799 do ib = st%group%block_start, st%group%block_end
800 if (st%group%psib(ib, ik)%ist(1) <= istin .and. st%group%psib(ib, ik)%ist(st%group%psib(ib, ik)%nst) >= istin)
then
807 call density_calc_end(dens_calc, allreduce = .not.
present(istin), buff_density = st%buff_density)
817 class(
space_t),
intent(in) :: space
818 type(
grid_t),
intent(in) :: gr
821 integer,
intent(in) :: n
822 logical,
intent(in) :: family_is_mgga
824 integer :: ist, ik, ib, nblock
825 integer :: nodeto, nodefr
827 complex(real64),
allocatable :: psi(:, :, :), rec_buffer(:,:)
833 if (st%requires_generalized_overlap)
then
837 if (n >= st%nst)
then
838 write(
message(1),
'(a)')
'Attempting to freeze a number of orbitals which is larger or equal to'
839 write(
message(2),
'(a)')
'the total number. The program has to stop.'
845 if (.not.
allocated(st%frozen_rho))
then
846 safe_allocate(st%frozen_rho(1:gr%np, 1:st%d%nspin))
851 do ik = st%d%kpt%start, st%d%kpt%end
852 if (n < st%st_start) cycle
854 do ib = st%group%block_start, st%group%block_end
865 safe_allocate(psi(1:gr%np, 1:st%d%dim, 1:nblock))
874 safe_deallocate_a(psi)
885 if (family_is_mgga)
then
886 if (.not.
allocated(st%frozen_tau))
then
887 safe_allocate(st%frozen_tau(1:gr%np, 1:st%d%nspin))
889 if (.not.
allocated(st%frozen_gdens))
then
890 safe_allocate(st%frozen_gdens(1:gr%np, 1:space%dim, 1:st%d%nspin))
892 if (.not.
allocated(st%frozen_ldens))
then
893 safe_allocate(st%frozen_ldens(1:gr%np, 1:st%d%nspin))
897 density_gradient = st%frozen_gdens, density_laplacian = st%frozen_ldens, st_end = n)
905 safe_allocate(psi(1:gr%np, 1:st%d%dim, 1))
906 safe_allocate(rec_buffer(1:gr%np, 1:st%d%dim))
908 do ik = st%d%kpt%start, st%d%kpt%end
912 nodeto = st%node(ist)
914 nodefr = staux%node(ist+n)
916 if (st%mpi_grp%rank == nodeto .and. st%mpi_grp%rank == nodefr)
then
922 if (st%mpi_grp%rank == nodefr)
then
924 call st%mpi_grp%send(psi(1, 1, 1), gr%np*st%d%dim, mpi_double_complex, nodeto, ist)
926 if (st%mpi_grp%rank == nodeto)
then
927 call st%mpi_grp%recv(rec_buffer(1, 1), gr%np*st%d%dim, mpi_double_complex, nodefr, ist)
934 safe_deallocate_a(psi)
935 safe_deallocate_a(rec_buffer)
939 st%occ(ist, ik) = staux%occ(n+ist, ik)
940 st%eigenval(ist, ik) = staux%eigenval(n+ist, ik)
952 class(
mesh_t),
intent(in) :: mesh
954 integer,
intent(in) :: nn
964 safe_deallocate_a(st%eigenval)
965 safe_allocate(st%eigenval(1:st%nst, 1:st%nik))
966 st%eigenval = huge(st%eigenval)
968 safe_deallocate_a(st%occ)
969 safe_allocate(st%occ (1:st%nst, 1:st%nik))
991 do ik = st%d%kpt%start, st%d%kpt%end
992 do ist = st%st_start, st%st_end
993 st%qtot = st%qtot + st%occ(ist, ik) * st%kweights(ik)
997 if (st%parallel_in_states .or. st%d%kpt%parallel)
then
1018 class(
mesh_t),
intent(in) :: mesh
1019 real(real64),
contiguous,
intent(out) :: total_rho(:,:)
1025 call lalg_copy(mesh%np, st%d%nspin, st%rho, total_rho)
1027 if (
allocated(st%rho_core))
then
1028 do is = 1, st%d%spin_channels
1029 call lalg_axpy(mesh%np,
m_one/st%d%spin_channels, st%rho_core, total_rho(:, is))
1034 if (
allocated(st%frozen_rho))
then
1035 call lalg_axpy(mesh%np, st%d%nspin,
m_one, st%frozen_rho, total_rho)
1046 class(
mesh_t),
intent(in) :: mesh
1049 integer(int64) :: pnp
1055 do is = 1, st%d%nspin
1056 call accel_write_buffer(st%buff_density, int(mesh%np, int64), st%rho(1:mesh%np, is), &
1057 offset = (is - 1)*pnp)
1066#include "density_inc.F90"
1069#include "complex.F90"
1070#include "density_inc.F90"
--------------— gemv ---------------— SGEMV performs one of the matrix-vector operations
constant times a vector plus a vector
Copies a vector x, to a vector y.
type(accel_kernel_t), target, save, public kernel_density_real
integer function, public accel_kernel_block_size(kernel)
subroutine, public accel_free_buffer(this, async)
subroutine, public accel_finish()
subroutine, public accel_move_buffer(buffer_from, buffer_to)
Move the buffer memory from the first buffer to the second.
type(accel_kernel_t), target, save, public kernel_density_spinors
integer, parameter, public accel_mem_read_write
pure logical function, public accel_is_enabled()
type(accel_kernel_t), target, save, public kernel_density_complex
integer, parameter, public accel_mem_read_only
This module implements batches of mesh functions.
integer, parameter, public batch_not_packed
functions are stored in CPU memory, unpacked order
integer, parameter, public batch_device_packed
functions are stored in device memory in packed order
integer, parameter, public batch_packed
functions are stored in CPU memory, in transposed (packed) order
This module implements common operations on batches of mesh functions.
This module contains interfaces for BLAS routines You should not use these routines directly....
This module implements a calculator for the density and defines related functions.
subroutine density_calc_state(this, psib, istin)
Calculate contribution to the density from state istin.
subroutine, public density_calc_accumulate(this, psib, async)
Accumulate weighted orbital densities for a batch psib.
subroutine, public states_elec_freeze_adjust_qtot(st)
subroutine, public states_elec_freeze_redistribute_states(st, namespace, mesh, mc, nn)
subroutine density_calc_accumulate_aug(this, psib, ispin, weight)
Accumulate the real-space USPP augmentation density for one wavefunction batch.
subroutine, public density_calc(st, gr, density, istin, ep, vnl, phase)
Computes the density from the orbitals in st.
subroutine density_calc_pack(this, async)
prepare the density calculator for GPU use
subroutine, public states_elec_sync_buff_density(st, mesh)
Synchronize the GPU density buffer with the host density strho.
subroutine, public ddensity_accumulate_grad(space, mesh, st, psib, grad_psib, grad_rho)
Accumulate within a batch.
subroutine, public zdensity_accumulate_grad(space, mesh, st, psib, grad_psib, grad_rho)
Accumulate within a batch.
subroutine, public states_elec_total_density(st, mesh, total_rho)
This routine calculates the total electronic density.
subroutine, public density_calc_end(this, allreduce, symmetrize, buff_density)
Finalize the density calculation.
subroutine, public states_elec_freeze_orbitals(st, namespace, space, gr, mc, kpoints, n, family_is_mgga)
Calculate partial density for frozen orbitals.
subroutine, public density_calc_init(this, st, gr, density, ep, vnl, phase)
initialize the density calculator
This module calculates the derivatives (gradients, Laplacians, etc.) of a function.
integer, parameter, public unpolarized
Parameters...
integer, parameter, public spinors
integer, parameter, public spin_polarized
integer, parameter, public spin_orbit
real(real64), parameter, public m_zero
real(real64), parameter, public m_epsilon
real(real64), parameter, public m_one
This module implements the underlying real-space grid.
subroutine, public dgrid_symmetrize_scalar_field(gr, field, suppress_warning)
This module is intended to contain "only mathematical" functions and procedures.
This module defines various routines, operating on mesh functions.
This module defines the meshes, which are used in Octopus.
subroutine, public messages_not_implemented(feature, namespace)
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
subroutine, public messages_fatal(no_lines, only_root_writes, namespace)
This module handles the communicators for the various parallelization strategies.
subroutine, public dnonlocal_pseudopotential_density_matrix(this, mesh, std, spiral_bnd, psib, weight, beta_density, weight2, beta_density2, beta_current)
Accumulate occupation-weighted beta-projector density matrices for USPP density.
subroutine, public nonlocal_pseudopotential_soc_density_to_real(this, epot, rho_cmplx, beta_density, beta_current)
Rotate the complex-Y_lm projector density matrix to the real-Y_lm basis (SOC USPP).
subroutine, public znonlocal_pseudopotential_density_matrix(this, mesh, std, spiral_bnd, psib, weight, beta_density, weight2, beta_density2, beta_current)
Accumulate occupation-weighted beta-projector density matrices for USPP density.
subroutine, public nonlocal_pseudopotential_density_matrix_spinor(this, mesh, std, spiral_bnd, psib, weight, beta_density, beta_current)
Noncollinear (spinor) projector density matrix for the ultrasoft augmentation.
subroutine, public nonlocal_pseudopotential_symmetrize_onsite(this)
Symmetrize the PAW one-center density matrix rho_ij over the crystal symmetries.
subroutine, public nonlocal_pseudopotential_density_matrix_spinor_cmplx(this, mesh, std, spiral_bnd, psib, weight, beta_density)
Full COMPLEX spinor projector density matrix (fully-relativistic ultrasoft).
/* To use the profiling module, call profiling_in and profiling_out with the label of the region as a...
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.
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,...
logical elemental function, public projector_has_augmentation(p)
Whether the projector carries an augmentation contribution (charge augmentation Q_ij and a generalize...
integer, parameter, public proj_uspp
integer, parameter, public smear_fixed_occ
pure logical function, public states_are_complex(st)
pure logical function, public states_are_real(st)
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
subroutine, public states_elec_distribute_nodes(st, namespace, mc)
Distribute states over the processes for states parallelization.
subroutine, public states_elec_calc_quantities(gr, st, kpoints, nlcc, kinetic_energy_density, paramagnetic_current, density_gradient, density_laplacian, gi_kinetic_energy_density, st_end)
calculated selected quantities
subroutine, public states_elec_end(st)
finalize the states_elec_t object
subroutine, public states_elec_deallocate_wfns(st)
Deallocates the KS wavefunctions defined within a states_elec_t structure.
subroutine, public states_elec_allocate_wfns(st, mesh, wfs_type, skip, packed)
Allocates the KS wavefunctions defined within a states_elec_t structure.
subroutine, public states_elec_copy(stout, stin, exclude_wfns, exclude_eigenval, special, dest_type, copy_data)
make a (selective) copy of a states_elec_t object
integer pure function, public states_elec_block_min(st, ib)
return index of first state in block ib
type(type_t), parameter, public type_cmplx
type(type_t), parameter, public type_float
Description of the grid, containing information on derivatives, stencil, and symmetries.
Describes mesh distribution to nodes.
Stores all communicators and groups.
nonlocal part of the pseudopotential
A container for the phase.
A set of projectors defined on a submesh.
The projector data type is intended to hold the local and non-local parts of the pseudopotentials....
The states_elec_t class contains all electronic wave functions.
batches of electronic states