49 use,
intrinsic :: iso_fortran_env
138 type(space_t),
private :: space
139 type(states_elec_dim_t) :: d
140 type(hamiltonian_elec_base_t) :: hm_base
141 type(phase_t) :: phase
142 type(energy_t),
allocatable :: energy
143 type(absorbing_boundaries_t) :: abs_boundaries
144 real(real64),
allocatable :: vhartree(:)
145 real(real64),
allocatable :: vxc(:,:)
146 real(real64),
allocatable :: vhxc(:,:)
147 real(real64),
allocatable :: vtau(:,:)
148 real(real64),
allocatable :: vberry(:,:)
150 type(derivatives_t),
pointer,
private :: der
152 type(nonlocal_pseudopotential_t) :: vnl
154 type(ions_t),
pointer :: ions
155 real(real64) :: exx_coef
157 type(poisson_t) :: psolver
160 logical :: self_induced_magnetic
161 real(real64),
allocatable :: a_ind(:, :)
162 real(real64),
allocatable :: b_ind(:, :)
164 integer :: theory_level
165 type(xc_t),
pointer :: xc
166 type(xc_photons_t),
pointer :: xc_photons
172 logical,
private :: adjoint
175 real(real64),
private :: mass
178 logical,
private :: inh_term
179 type(states_elec_t) :: inh_st
183 type(oct_exchange_t) :: oct_exchange
185 type(scissor_t) :: scissor
187 real(real64) :: current_time
188 logical,
private :: is_applied_packed
191 type(lda_u_t) :: lda_u
192 integer :: lda_u_level
194 logical,
public :: time_zero
196 type(exchange_operator_t),
public :: exxop
198 type(kpoints_t),
pointer,
public :: kpoints => null()
200 type(partner_list_t) :: external_potentials
201 real(real64),
allocatable,
public :: v_ext_pot(:)
202 real(real64),
allocatable,
public :: v_static(:)
204 type(ion_electron_local_potential_t) :: v_ie_loc
207 type(magnetic_constrain_t) :: magnetic_constrain
213 type(mxll_coupling_t) :: mxll
214 type(zora_t),
pointer :: zora
228 integer,
public,
parameter :: &
232 integer,
public,
parameter :: &
244 subroutine hamiltonian_elec_init(hm, namespace, space, gr, ions, ext_partners, st, theory_level, xc, &
245 mc, kpoints, need_exchange, xc_photons)
249 type(
grid_t),
target,
intent(inout) :: gr
250 type(
ions_t),
target,
intent(inout) :: ions
253 integer,
intent(in) :: theory_level
254 type(
xc_t),
target,
intent(in) :: xc
256 type(
kpoints_t),
target,
intent(in) :: kpoints
257 logical,
optional,
intent(in) :: need_exchange
261 logical :: need_exchange_
262 real(real64) :: rashba_coupling
269 hm%theory_level = theory_level
272 hm%kpoints => kpoints
298 if (space%dim /= 2)
then
299 write(
message(1),
'(a)')
'Rashba spin-orbit coupling can only be used for two-dimensional systems.'
305 call hm%hm_base%init(hm%d%nspin, hm%mass, rashba_coupling)
308 assert(
associated(gr%der%lapl))
309 hm%hm_base%kinetic => gr%der%lapl
311 safe_allocate(hm%energy)
318 if(
present(xc_photons))
then
319 hm%xc_photons => xc_photons
321 hm%xc_photons => null()
327 safe_allocate(hm%vhxc(1:gr%np, 1:hm%d%nspin))
328 hm%vhxc(1:gr%np, 1:hm%d%nspin) =
m_zero
332 safe_allocate(hm%vhartree(1:gr%np_part))
335 safe_allocate(hm%vxc(1:gr%np, 1:hm%d%nspin))
339 safe_allocate(hm%vtau(1:gr%np, 1:hm%d%nspin))
346 call poisson_init(hm%psolver, namespace, space, gr%der, mc, gr%stencil, st%qtot)
349 call epot_init(hm%ep, namespace, gr, hm%ions, hm%psolver, hm%d%ispin, hm%xc%family, hm%kpoints)
350 call kick_init(hm%kick, namespace, space, hm%kpoints, hm%d%ispin)
352 hm%zora =>
zora_t(namespace, hm%der, hm%d, hm%ep, hm%mass)
355 call hm%v_ie_loc%init(gr, hm%psolver, hm%ions, namespace)
357 call hm%nlcc%init(gr, hm%ions)
358 safe_allocate(st%rho_core(1:gr%np))
391 call parse_variable(namespace,
'CalculateSelfInducedMagneticField', .false., hm%self_induced_magnetic)
392 if (hm%self_induced_magnetic)
then
393 safe_allocate(hm%a_ind(1:gr%np_part, 1:space%dim))
394 safe_allocate(hm%b_ind(1:gr%np_part, 1:space%dim))
402 hm%inh_term = .false.
407 call hm%phase%init(gr, hm%d%kpt, hm%kpoints, st%d, space)
427 call lda_u_init(hm%lda_u, namespace, space, hm%lda_u_level, gr, ions, st, mc, &
428 hm%kpoints, hm%phase%is_allocated())
437 if(hm%lda_u_level /=
dft_u_none .and. hm%phase%is_allocated())
then
452 call parse_variable(namespace,
'HamiltonianApplyPacked', .
true., hm%is_applied_packed)
454 if (hm%theory_level ==
hartree_fock .and. st%parallel_in_states)
then
459 .and. st%parallel_in_states)
then
480 .or. hm%theory_level ==
rdmft .or. need_exchange_ .or. &
483 .or.
bitand(hm%xc%family, xc_family_oep) /= 0)
then
488 else if (
bitand(hm%xc%family, xc_family_oep) /= 0 .or. hm%theory_level ==
rdmft)
then
490 hm%kpoints, hm%xc%cam_omega, hm%xc%cam_alpha, hm%xc%cam_beta)
499 if (gr%use_curvilinear)
then
501 hm%is_applied_packed = .false.
502 call messages_write(
'Cannot use CUDA or OpenCL as curvilinear coordinates are used.')
505 call messages_write(
'Cannot use CUDA or OpenCL as curvilinear coordinates are used.', new_line = .
true.)
506 call messages_write(
'Calculation will not be continued. To force execution, set AllowCPUonly = yes.')
528 call magnetic_constrain_init(hm%magnetic_constrain, namespace, gr, st%d, st%rho, ions%natoms, ions%min_distance())
533 if (
associated(hm%xc_photons))
then
534 if (hm%xc_photons%wants_to_renormalize_mass())
then
536 call hm%set_mass(namespace, hm%xc_photons%get_renormalized_mass())
549 class(*),
pointer :: potential
554 safe_allocate(hm%v_ext_pot(1:gr%np))
555 hm%v_ext_pot(1:gr%np) =
m_zero
557 call iter%start(hm%external_potentials)
558 do while (iter%has_next())
559 potential => iter%get_next()
560 select type (potential)
563 call potential%allocate_memory(gr)
564 call potential%calculate(namespace, gr, hm%psolver)
567 select case (potential%type)
572 if (.not.
allocated(hm%ep%b_field))
then
573 safe_allocate(hm%ep%b_field(1:3))
574 hm%ep%b_field(1:3) =
m_zero
576 hm%ep%b_field(1:3) = hm%ep%b_field(1:3) + potential%b_field(1:3)
578 if (.not.
allocated(hm%ep%a_static))
then
579 safe_allocate(hm%ep%a_static(1:gr%np, 1:space%dim))
580 hm%ep%a_static(1:gr%np, 1:space%dim) =
m_zero
582 call lalg_axpy(gr%np, space%dim,
m_one, potential%a_static, hm%ep%a_static)
585 if (.not.
allocated(hm%ep%e_field))
then
586 safe_allocate(hm%ep%e_field(1:space%dim))
587 hm%ep%e_field(1:space%dim) =
m_zero
589 hm%ep%e_field(1:space%dim) = hm%ep%e_field(1:space%dim) + potential%e_field(1:space%dim)
592 if (space%periodic_dim < space%dim)
then
593 if (.not.
allocated(hm%v_static))
then
594 safe_allocate(hm%v_static(1:gr%np))
595 hm%v_static(1:gr%np) =
m_zero
597 if (.not.
allocated(hm%ep%v_ext))
then
598 safe_allocate(hm%ep%v_ext(1:gr%np_part))
599 hm%ep%v_ext(1:gr%np_part) =
m_zero
605 if (hm%kpoints%use_symmetries)
then
609 message(1) =
"The StaticElectricField breaks (at least) one of the symmetries used to reduce the k-points."
610 message(2) =
"Set SymmetryBreakDir equal to StaticElectricField."
617 call potential%deallocate_memory()
630 class(*),
pointer :: potential
634 call iter%start(hm%external_potentials)
635 do while (iter%has_next())
636 potential => iter%get_next()
637 select type (potential)
641 message(1) =
"Applying StaticElectricField in a periodic direction is only accurate for large supercells."
642 message(2) =
"Single-point Berry phase is not appropriate when k-point sampling is needed."
658 logical :: external_potentials_present
659 logical :: kick_present
663 if (
allocated(hm%ep%e_field) .and. space%is_periodic() .and. .not.
list_has_gauge_field(ext_partners))
then
666 if (any(abs(hm%ep%e_field(1:space%periodic_dim)) >
m_epsilon))
then
667 safe_allocate(hm%vberry(1:gr%np, 1:hm%d%nspin))
678 call pcm_init(hm%pcm, namespace, space, ions, gr, st%qtot, st%val_charge, external_potentials_present, kick_present)
679 if (hm%pcm%run_pcm)
then
700 call hm%hm_base%end()
705 safe_deallocate_a(hm%vhartree)
706 safe_deallocate_a(hm%vhxc)
707 safe_deallocate_a(hm%vxc)
708 safe_deallocate_a(hm%vberry)
709 safe_deallocate_a(hm%a_ind)
710 safe_deallocate_a(hm%b_ind)
711 safe_deallocate_a(hm%v_ext_pot)
713 safe_deallocate_p(hm%zora)
716 safe_deallocate_a(hm%vtau)
736 safe_deallocate_a(hm%energy)
738 if (hm%pcm%run_pcm)
call pcm_end(hm%pcm)
740 call hm%v_ie_loc%end()
743 call iter%start(hm%external_potentials)
744 do while (iter%has_next())
745 potential => iter%get_next()
746 safe_deallocate_p(potential)
748 call hm%external_potentials%empty()
749 safe_deallocate_a(hm%v_static)
775 real(real64),
intent(in) :: delta(:)
776 real(real64),
intent(in) :: emin
787 hm%spectral_middle_point = (emax + emin) /
m_two
788 hm%spectral_half_span = (emax - emin) /
m_two
823 if (hm%inh_term)
then
825 hm%inh_term = .false.
837 if (.not. hm%adjoint)
then
840 hm%abs_boundaries%mf = -hm%abs_boundaries%mf
857 hm%abs_boundaries%mf = -hm%abs_boundaries%mf
869 class(
mesh_t),
intent(in) :: mesh
871 class(
space_t),
intent(in) :: space
873 real(real64),
optional,
intent(in) :: time
875 integer :: ispin, ip, idir, iatom, ilaser
876 real(real64) :: aa(space%dim), time_
877 real(real64),
allocatable :: vp(:,:)
880 real(real64) :: am(space%dim)
885 this%current_time =
m_zero
886 if (
present(time)) this%current_time = time
891 call this%hm_base%clear(mesh%np)
898 if (
present(time) .or. this%time_zero)
then
901 if(
associated(lasers))
then
902 do ilaser = 1, lasers%no_lasers
903 select case (
laser_kind(lasers%lasers(ilaser)))
905 do ispin = 1, this%d%spin_channels
907 this%hm_base%potential(:, ispin), time_)
913 safe_allocate(vp(1:mesh%np, 1:space%dim))
914 vp(1:mesh%np, 1:space%dim) =
m_zero
918 do idir = 1, space%dim
919 this%hm_base%vector_potential(idir, ip) = this%hm_base%vector_potential(idir, ip) + vp(ip, idir)/
p_c
923 call laser_field(lasers%lasers(ilaser), this%hm_base%uniform_magnetic_field(1:space%dim), time_)
924 safe_deallocate_a(vp)
930 this%hm_base%uniform_vector_potential(1:space%dim) = this%hm_base%uniform_vector_potential(1:space%dim) - aa/
p_c
935 assert(
allocated(this%hm_base%uniform_vector_potential))
937 this%hm_base%uniform_vector_potential(1:space%dim) = this%hm_base%uniform_vector_potential(1:space%dim) - am/
p_c
943 if (
associated(gfield))
then
946 this%hm_base%uniform_vector_potential(1:space%dim) = this%hm_base%uniform_vector_potential(1:space%dim) - aa/
p_c
950 if (
allocated(this%ep%e_field) .and.
associated(gfield))
then
951 this%hm_base%uniform_vector_potential(1:space%periodic_dim) = &
952 this%hm_base%uniform_vector_potential(1:space%periodic_dim) - time_*this%ep%e_field(1:space%periodic_dim)
956 if (
associated(this%xc_photons))
then
957 if(this%xc_photons%lpfmf .and.
allocated(this%xc_photons%mf_vector_potential))
then
960 this%hm_base%uniform_vector_potential(1:space%dim) = &
961 this%hm_base%uniform_vector_potential(1:space%dim) - this%xc_photons%mf_vector_potential(1:space%dim)/
p_c
968 if (
allocated(this%ep%a_static))
then
973 do idir = 1, space%dim
974 this%hm_base%vector_potential(idir, ip) = this%hm_base%vector_potential(idir, ip) + this%ep%a_static(ip, idir)
984 call this%hm_base%accel_copy_pot(mesh, this%vtau)
986 call this%hm_base%accel_copy_pot(mesh)
990 if (
allocated(this%ep%b_field))
then
993 this%hm_base%uniform_magnetic_field(idir) = this%hm_base%uniform_magnetic_field(idir) + this%ep%b_field(idir)
998 call this%hm_base%update_magnetic_terms(mesh, this%ep%gyromagnetic_ratio, this%d%ispin)
1003 if (this%mxll%test_equad)
then
1015 integer :: ik, imat, nmat, max_npoints, offset
1017 integer :: iphase, nphase
1021 if ((.not. this%kpoints%gamma_only()) .or.
allocated(this%hm_base%uniform_vector_potential))
then
1025 do iatom = 1, this%ep%natoms
1026 call projector_init_phases(this%ep%proj(iatom), space%dim, this%d, this%der%boundaries, this%kpoints, &
1027 vec_pot = this%hm_base%uniform_vector_potential, vec_pot_var = this%hm_base%vector_potential)
1033 if (
allocated(this%hm_base%uniform_vector_potential))
then
1035 call this%phase%update(mesh, this%d%kpt, this%kpoints, this%d, space, this%hm_base%uniform_vector_potential)
1040 vec_pot = this%hm_base%uniform_vector_potential, vec_pot_var = this%hm_base%vector_potential)
1044 max_npoints = this%vnl%max_npoints
1045 nmat = this%vnl%nprojector_matrices
1048 if (this%phase%is_allocated() .and.
allocated(this%vnl%projector_matrices))
then
1051 if (this%der%boundaries%spiralBC) nphase = 3
1053 if (.not.
allocated(this%vnl%projector_phases))
then
1054 safe_allocate(this%vnl%projector_phases(1:max_npoints, 1:nphase, nmat, this%d%kpt%start:this%d%kpt%end))
1057 type_cmplx, this%vnl%total_points*nphase*this%d%kpt%nlocal)
1060 this%vnl%nphase = nphase
1065 do ik = this%d%kpt%start, this%d%kpt%end
1066 do imat = 1, this%vnl%nprojector_matrices
1067 iatom = this%vnl%projector_to_atom(imat)
1068 do iphase = 1, nphase
1070 do ip = 1, this%vnl%projector_matrices(imat)%npoints
1071 this%vnl%projector_phases(ip, iphase, imat, ik) = this%ep%proj(iatom)%phase(ip, iphase, ik)
1074 if (
accel_is_enabled() .and. this%vnl%projector_matrices(imat)%npoints > 0)
then
1076 this%vnl%projector_matrices(imat)%npoints, this%vnl%projector_phases(1:, iphase, imat, ik), &
1077 offset = offset, async=.
true.)
1079 offset = offset + this%vnl%projector_matrices(imat)%npoints
1100 class(
mesh_t),
intent(in) :: mesh
1101 logical,
optional,
intent(in) :: accumulate
1103 integer :: ispin, ip
1110 do ispin = 1, this%d%nspin
1113 this%hm_base%potential(ip, ispin) =
m_zero
1120 do ispin = 1, this%d%nspin
1121 if (ispin <= 2)
then
1125 this%hm_base%potential(ip, ispin) = this%hm_base%potential(ip, ispin) + this%ep%vpsl(ip) + this%v_ext_pot(ip)
1129 if (this%pcm%run_pcm)
then
1130 if (this%pcm%solute)
then
1133 this%hm_base%potential(ip, ispin) = this%hm_base%potential(ip, ispin) + &
1134 this%pcm%v_e_rs(ip) + this%pcm%v_n_rs(ip)
1138 if (this%pcm%localf)
then
1141 this%hm_base%potential(ip, ispin) = this%hm_base%potential(ip, ispin) + &
1142 this%pcm%v_ext_rs(ip)
1152 this%hm_base%Impotential(ip, ispin) = this%hm_base%Impotential(ip, ispin) + this%abs_boundaries%mf(ip)
1163 call this%zora%update(this%der, this%hm_base%potential)
1167 do ispin = 1, this%d%nspin
1172 this%hm_base%potential(ip, ispin) = this%hm_base%potential(ip, ispin) + this%magnetic_constrain%pot(ip, ispin)
1178 if (
allocated(this%hm_base%zeeman_pot))
then
1181 this%hm_base%potential(ip, ispin) = this%hm_base%potential(ip, ispin) + this%hm_base%zeeman_pot(ip, ispin)
1187 if (this%mxll%test_equad)
then
1190 this%hm_base%potential(ip, ispin) = this%hm_base%potential(ip, ispin) + this%mxll%e_quadrupole_pot(ip)
1199 do ispin = 1, this%d%nspin
1202 this%hm_base%potential(ip, ispin) = this%hm_base%potential(ip, ispin) + this%vhxc(ip, ispin)
1209 call this%hm_base%accel_copy_pot(mesh, this%vtau)
1211 call this%hm_base%accel_copy_pot(mesh)
1222 type(
grid_t),
intent(in) :: gr
1223 type(
ions_t),
target,
intent(inout) :: ions
1226 real(real64),
optional,
intent(in) :: time
1231 call epot_generate(this%ep, namespace, gr, this%ions, this%d)
1236 if (
allocated(this%ep%e_field) .and. space%periodic_dim < space%dim)
then
1242 this%v_ie_loc%atoms_dist => ions%atoms_dist
1243 this%v_ie_loc%atom => ions%atom
1244 call this%v_ie_loc%calculate()
1247 call lalg_axpy(gr%np,
m_one, this%v_ie_loc%potential(:,1), this%ep%vpsl)
1251 if (this%ep%nlcc)
then
1252 this%nlcc%atoms_dist => ions%atoms_dist
1253 this%nlcc%atom => ions%atom
1254 call this%nlcc%calculate()
1255 call lalg_copy(gr%np, this%nlcc%density(:,1), st%rho_core)
1258 call this%vnl%build(space, gr, this%ep)
1263 if (this%ep%non_local .and. .not. this%vnl%apply_projector_matrices)
then
1265 call messages_write(
'Relativistic pseudopotentials have not been fully implemented for CUDA or OpenCL.')
1268 call messages_write(
'Relativistic pseudopotentials have not been fully implemented for CUDA or OpenCL.',&
1270 call messages_write(
'Calculation will not be continued. To force execution, set AllowCPUonly = yes.')
1277 if (this%pcm%run_pcm)
then
1280 if (this%pcm%solute)
then
1287 if (this%pcm%localf .and.
allocated(this%v_static))
then
1288 call pcm_calc_pot_rs(this%pcm, gr, this%psolver, v_ext = this%ep%v_ext(1:gr%np_part))
1293 call lda_u_update_basis(this%lda_u, space, gr, ions, st, this%psolver, namespace, this%kpoints, &
1294 this%phase%is_allocated())
1304 time = this%current_time
1312 apply = this%is_applied_packed
1320 type(namespace_t),
intent(in) :: namespace
1321 class(space_t),
intent(in) :: space
1322 type(lattice_vectors_t),
intent(in) :: latt
1323 class(species_t),
intent(in) :: species
1324 real(real64),
intent(in) :: pos(1:space%dim)
1325 integer,
intent(in) :: ia
1326 class(mesh_t),
intent(in) :: mesh
1327 complex(real64),
intent(in) :: psi(:,:)
1328 complex(real64),
intent(out) :: vpsi(:,:)
1331 real(real64),
allocatable :: vlocal(:)
1334 safe_allocate(vlocal(1:mesh%np_part))
1336 call epot_local_potential(hm%ep, namespace, space, latt, mesh, species, pos, ia, vlocal)
1338 do idim = 1, hm%d%dim
1339 vpsi(1:mesh%np, idim) = vlocal(1:mesh%np) * psi(1:mesh%np, idim)
1342 safe_deallocate_a(vlocal)
1349 type(restart_t),
intent(in) :: restart
1351 class(space_t),
intent(in) :: space
1352 class(mesh_t),
intent(in) :: mesh
1353 integer,
intent(out) :: ierr
1355 integer :: iunit, err, err2(2), isp
1356 character(len=12) :: filename
1357 character(len=100) :: lines(2)
1368 message(1) =
"Debug: Writing Vhxc restart."
1369 call messages_info(1, debug_only=.
true.)
1372 iunit = restart_open(restart,
'vhxc')
1373 lines(1) =
'# #spin #nspin filename'
1375 call restart_write(restart, iunit, lines, 2, err)
1376 if (err /= 0) ierr = ierr + 1
1379 do isp = 1, hm%d%nspin
1380 if (hm%d%nspin == 1)
then
1381 write(filename, fmt=
'(a)')
'vhxc'
1383 write(filename, fmt=
'(a,i1)')
'vhxc-sp', isp
1385 write(lines(1),
'(i8,a,i8,a)') isp,
' | ', hm%d%nspin,
' | "'//trim(adjustl(filename))//
'"'
1386 call restart_write(restart, iunit, lines, 1, err)
1387 if (err /= 0) err2(1) = err2(1) + 1
1389 call restart_write_mesh_function(restart, space, filename, mesh, hm%vhxc(:,isp), err)
1390 if (err /= 0) err2(2) = err2(2) + 1
1393 if (err2(1) /= 0) ierr = ierr + 2
1394 if (err2(2) /= 0) ierr = ierr + 4
1397 call restart_write(restart, iunit, lines, 1, err)
1398 if (err /= 0) ierr = ierr + 4
1401 if (family_is_mgga_with_exc(hm%xc))
then
1402 lines(1) =
'# #spin #nspin filename'
1404 call restart_write(restart, iunit, lines, 2, err)
1405 if (err /= 0) ierr = ierr + 8
1408 do isp = 1, hm%d%nspin
1409 if (hm%d%nspin == 1)
then
1410 write(filename, fmt=
'(a)')
'vtau'
1412 write(filename, fmt=
'(a,i1)')
'vtau-sp', isp
1414 write(lines(1),
'(i8,a,i8,a)') isp,
' | ', hm%d%nspin,
' | "'//trim(adjustl(filename))//
'"'
1415 call restart_write(restart, iunit, lines, 1, err)
1416 if (err /= 0) err2(1) = err2(1) + 16
1418 call restart_write_mesh_function(restart, space, filename, mesh, hm%vtau(:,isp), err)
1419 if (err /= 0) err2(1) = err2(1) + 1
1422 if (err2(1) /= 0) ierr = ierr + 32
1423 if (err2(2) /= 0) ierr = ierr + 64
1426 call restart_write(restart, iunit, lines, 1, err)
1427 if (err /= 0) ierr = ierr + 128
1430 call restart_close(restart, iunit)
1432 message(1) =
"Debug: Writing Vhxc restart done."
1433 call messages_info(1, debug_only=.
true.)
1441 type(restart_t),
intent(in) :: restart
1443 class(space_t),
intent(in) :: space
1444 class(mesh_t),
intent(in) :: mesh
1445 integer,
intent(out) :: ierr
1447 integer :: err, err2, isp
1448 character(len=12) :: filename
1460 message(1) =
"Debug: Reading Vhxc restart."
1461 call messages_info(1, debug_only=.
true.)
1464 do isp = 1, hm%d%nspin
1465 if (hm%d%nspin == 1)
then
1466 write(filename, fmt=
'(a)')
'vhxc'
1468 write(filename, fmt=
'(a,i1)')
'vhxc-sp', isp
1471 call restart_read_mesh_function(restart, space, filename, mesh, hm%vhxc(:,isp), err)
1472 if (err /= 0) err2 = err2 + 1
1475 if (err2 /= 0) ierr = ierr + 1
1479 if (family_is_mgga_with_exc(hm%xc))
then
1480 do isp = 1, hm%d%nspin
1481 if (hm%d%nspin == 1)
then
1482 write(filename, fmt=
'(a)')
'vtau'
1484 write(filename, fmt=
'(a,i1)')
'vtau-sp', isp
1487 call restart_read_mesh_function(restart, space, filename, mesh, hm%vtau(:,isp), err)
1488 if (err /= 0) err2 = err2 + 1
1492 if (err2 /= 0) ierr = ierr + 2
1495 message(1) =
"Debug: Reading Vhxc restart done."
1496 call messages_info(1, debug_only=.
true.)
1508 class(space_t),
intent(in) :: space
1509 class(mesh_t),
intent(in) :: mesh
1510 type(partner_list_t),
intent(in) :: ext_partners
1511 real(real64),
intent(in) :: time(1:2)
1512 real(real64),
intent(in) :: mu(1:2)
1514 integer :: ispin, ip, idir, iatom, ilaser, itime
1515 real(real64) :: aa(space%dim), time_
1516 real(real64),
allocatable :: vp(:,:)
1517 real(real64),
allocatable :: velectric(:)
1518 type(lasers_t),
pointer :: lasers
1519 type(gauge_field_t),
pointer :: gfield
1522 call profiling_in(
"HAMILTONIAN_ELEC_UPDATE_EXT_POT")
1524 this%current_time = m_zero
1525 this%current_time = time(1)
1528 call this%hm_base%clear(mesh%np)
1531 call this%hm_base%allocate_field(mesh, field_potential, &
1532 complex_potential = this%abs_boundaries%abtype == imaginary_absorbing)
1537 lasers => list_get_lasers(ext_partners)
1538 if(
associated(lasers))
then
1539 do ilaser = 1, lasers%no_lasers
1540 select case (laser_kind(lasers%lasers(ilaser)))
1541 case (e_field_scalar_potential, e_field_electric)
1542 safe_allocate(velectric(1:mesh%np))
1543 do ispin = 1, this%d%spin_channels
1545 call laser_potential(lasers%lasers(ilaser), mesh, velectric, time_)
1548 this%hm_base%potential(ip, ispin) = this%hm_base%potential(ip, ispin) + mu(itime) * velectric(ip)
1551 safe_deallocate_a(velectric)
1552 case (e_field_magnetic)
1553 call this%hm_base%allocate_field(mesh, field_vector_potential + field_uniform_magnetic_field, .false.)
1555 safe_allocate(vp(1:mesh%np, 1:space%dim))
1556 vp(1:mesh%np, 1:space%dim) = m_zero
1557 call laser_vector_potential(lasers%lasers(ilaser), mesh, vp, time_)
1558 do idir = 1, space%dim
1561 this%hm_base%vector_potential(idir, ip) = this%hm_base%vector_potential(idir, ip) &
1562 - mu(itime) * vp(ip, idir)/p_c
1566 call laser_field(lasers%lasers(ilaser), this%hm_base%uniform_magnetic_field(1:space%dim), time_)
1567 safe_deallocate_a(vp)
1568 case (e_field_vector_potential)
1569 call this%hm_base%allocate_field(mesh, field_uniform_vector_potential, .false.)
1572 call laser_field(lasers%lasers(ilaser), aa, time_)
1573 this%hm_base%uniform_vector_potential(1:space%dim) = this%hm_base%uniform_vector_potential(1:space%dim) &
1574 - mu(itime) * aa/p_c
1580 gfield => list_get_gauge_field(ext_partners)
1581 if (
associated(gfield))
then
1582 call this%hm_base%allocate_field(mesh, field_uniform_vector_potential, .false.)
1583 call gauge_field_get_vec_pot(gfield, aa)
1584 this%hm_base%uniform_vector_potential(1:space%dim) = this%hm_base%uniform_vector_potential(1:space%dim) - aa/p_c
1591 if (
allocated(this%ep%e_field) .and.
associated(gfield))
then
1592 this%hm_base%uniform_vector_potential(1:space%periodic_dim) = &
1593 this%hm_base%uniform_vector_potential(1:space%periodic_dim) - time_*this%ep%e_field(1:space%periodic_dim)
1599 if (
allocated(this%ep%a_static))
then
1600 call this%hm_base%allocate_field(mesh, field_vector_potential, .false.)
1604 do idir = 1, space%dim
1605 this%hm_base%vector_potential(idir, ip) = this%hm_base%vector_potential(idir, ip) + this%ep%a_static(ip, idir)
1611 if (family_is_mgga_with_exc(this%xc))
then
1612 call this%hm_base%accel_copy_pot(mesh, this%vtau)
1614 call this%hm_base%accel_copy_pot(mesh)
1618 if (
allocated(this%ep%b_field))
then
1619 call this%hm_base%allocate_field(mesh, field_uniform_magnetic_field, .false.)
1621 this%hm_base%uniform_magnetic_field(idir) = this%hm_base%uniform_magnetic_field(idir) + this%ep%b_field(idir)
1625 call this%hm_base%update_magnetic_terms(mesh, this%ep%gyromagnetic_ratio, this%d%ispin)
1631 call profiling_out(
"HAMILTONIAN_ELEC_UPDATE_EXT_POT")
1637 integer :: ik, imat, nmat, max_npoints, offset, iphase, nphase
1641 if ((.not. this%kpoints%gamma_only()) .or.
allocated(this%hm_base%uniform_vector_potential))
then
1643 call profiling_in(
'UPDATE_PHASES')
1645 do iatom = 1, this%ep%natoms
1646 call projector_init_phases(this%ep%proj(iatom), space%dim, this%d, this%der%boundaries, this%kpoints, &
1647 vec_pot = this%hm_base%uniform_vector_potential, vec_pot_var = this%hm_base%vector_potential)
1650 call profiling_out(
'UPDATE_PHASES')
1653 if (
allocated(this%hm_base%uniform_vector_potential))
then
1654 call this%phase%update(mesh, this%d%kpt, this%kpoints, this%d, space, this%hm_base%uniform_vector_potential)
1657 max_npoints = this%vnl%max_npoints
1658 nmat = this%vnl%nprojector_matrices
1661 if (this%phase%is_allocated() .and.
allocated(this%vnl%projector_matrices))
then
1664 if (this%der%boundaries%spiralBC) nphase = 3
1666 if (.not.
allocated(this%vnl%projector_phases))
then
1667 safe_allocate(this%vnl%projector_phases(1:max_npoints, nphase, nmat, this%d%kpt%start:this%d%kpt%end))
1668 if (accel_is_enabled())
then
1669 call accel_create_buffer(this%vnl%buff_projector_phases, accel_mem_read_only, &
1670 type_cmplx, this%vnl%total_points*nphase*this%d%kpt%nlocal)
1675 do ik = this%d%kpt%start, this%d%kpt%end
1676 do imat = 1, this%vnl%nprojector_matrices
1677 iatom = this%vnl%projector_to_atom(imat)
1678 do iphase = 1, nphase
1680 do ip = 1, this%vnl%projector_matrices(imat)%npoints
1681 this%vnl%projector_phases(ip, imat, iphase, ik) = this%ep%proj(iatom)%phase(ip, iphase, ik)
1684 if (accel_is_enabled() .and. this%vnl%projector_matrices(imat)%npoints > 0)
then
1685 call accel_write_buffer(this%vnl%buff_projector_phases, &
1686 this%vnl%projector_matrices(imat)%npoints, this%vnl%projector_phases(1:, iphase, imat, ik), &
1689 offset = offset + this%vnl%projector_matrices(imat)%npoints
1704 class(mesh_t),
intent(in) :: mesh
1705 real(real64),
contiguous,
intent(in) :: vold(:, :)
1706 real(real64),
contiguous,
optional,
intent(in) :: vold_tau(:, :)
1710 call lalg_copy(mesh%np, hm%d%nspin, vold, hm%vhxc)
1711 if (
present(vold_tau))
then
1712 call lalg_copy(mesh%np, hm%d%nspin, vold_tau, hm%vtau)
1720 logical,
intent(in) :: states_are_real
1724 if (hm%self_induced_magnetic)
then
1725 if (.not. states_are_real)
then
1728 message(1) =
'No current density for real states since it is identically zero.'
1729 call messages_warning(1)
1738 type(namespace_t),
intent(in) :: namespace
1739 class(mesh_t),
intent(in) :: mesh
1740 type(states_elec_t),
intent(inout) :: st
1741 type(states_elec_t),
intent(inout) :: hst
1743 integer :: ik, ib, ist
1744 complex(real64),
allocatable :: psi(:, :)
1745 complex(real64),
allocatable :: psiall(:, :, :, :)
1749 do ik = st%d%kpt%start, st%d%kpt%end
1750 do ib = st%group%block_start, st%group%block_end
1755 if (oct_exchange_enabled(hm%oct_exchange))
then
1757 safe_allocate(psiall(mesh%np_part, 1:hst%d%dim, st%st_start:st%st_end, st%d%kpt%start:st%d%kpt%end))
1759 call states_elec_get_state(st, mesh, psiall)
1761 call oct_exchange_prepare(hm%oct_exchange, mesh, psiall, hm%xc, hm%psolver, namespace)
1763 safe_deallocate_a(psiall)
1765 safe_allocate(psi(mesh%np_part, 1:hst%d%dim))
1769 call states_elec_get_state(hst, mesh, ist, ik, psi)
1770 call oct_exchange_operator(hm%oct_exchange, namespace, mesh, psi, ist, ik)
1771 call states_elec_set_state(hst, mesh, ist, ik, psi)
1775 safe_deallocate_a(psi)
1785 subroutine magnus(hm, namespace, mesh, psi, hpsi, ik, vmagnus, set_phase)
1787 type(namespace_t),
intent(in) :: namespace
1788 class(mesh_t),
intent(in) :: mesh
1789 complex(real64),
intent(inout) :: psi(:,:)
1790 complex(real64),
intent(out) :: hpsi(:,:)
1791 integer,
intent(in) :: ik
1792 real(real64),
intent(in) :: vmagnus(:, :, :)
1793 logical,
optional,
intent(in) :: set_phase
1795 complex(real64),
allocatable :: auxpsi(:, :), aux2psi(:, :)
1796 integer :: idim, ispin
1801 if (hm%d%dim /= 1)
then
1802 call messages_not_implemented(
"Magnus with spinors", namespace=namespace)
1805 safe_allocate( auxpsi(1:mesh%np_part, 1:hm%d%dim))
1806 safe_allocate(aux2psi(1:mesh%np, 1:hm%d%dim))
1808 ispin = hm%d%get_spin_index(ik)
1812 terms = term_kinetic + term_non_local_potential, set_phase = set_phase)
1815 do idim = 1, hm%d%dim
1816 call lalg_copy(mesh%np, auxpsi(:, idim), hpsi(:, idim))
1817 hpsi(1:mesh%np, idim) = hpsi(1:mesh%np, idim) + hm%ep%Vpsl(1:mesh%np)*psi(1:mesh%np,idim)
1818 call vborders(mesh, hm, psi(:, idim), hpsi(:, idim))
1820 hpsi(1:mesh%np, 1) = hpsi(1:mesh%np, 1) + vmagnus(1:mesh%np, ispin, 2)*psi(1:mesh%np, 1)
1823 hpsi(1:mesh%np, 1) = hpsi(1:mesh%np, 1) - m_zi*vmagnus(1:mesh%np, ispin, 1)*auxpsi(1:mesh%np, 1)
1826 auxpsi(1:mesh%np, 1) = vmagnus(1:mesh%np, ispin, 1)*psi(1:mesh%np, 1)
1828 terms = term_kinetic + term_non_local_potential, set_phase = set_phase)
1829 hpsi(1:mesh%np, 1) = hpsi(1:mesh%np, 1) + m_zi*aux2psi(1:mesh%np, 1)
1831 safe_deallocate_a(auxpsi)
1832 safe_deallocate_a(aux2psi)
1837 subroutine vborders (mesh, hm, psi, hpsi)
1838 class(mesh_t),
intent(in) :: mesh
1840 complex(real64),
intent(in) :: psi(:)
1841 complex(real64),
intent(inout) :: hpsi(:)
1847 if (hm%abs_boundaries%abtype == imaginary_absorbing)
then
1849 hpsi(ip) = hpsi(ip) + m_zi*hm%abs_boundaries%mf(ip)*psi(ip)
1871 type(namespace_t),
intent(in) :: namespace
1872 real(real64),
intent(in) :: mass
1876 if (parse_is_defined(namespace,
'ParticleMass'))
then
1877 message(1) =
'Attempting to redefine a non-unit electron mass'
1878 call messages_fatal(1)
1895 type(grid_t),
intent(in) :: gr
1896 type(distributed_t),
intent(in) :: kpt
1897 type(wfs_elec_t),
intent(in) :: psib
1898 type(wfs_elec_t),
intent(out) :: psib_with_phase
1900 integer :: k_offset, n_boundary_points
1904 call psib%copy_to(psib_with_phase)
1905 if (hm%phase%is_allocated())
then
1906 call hm%phase%apply_to(gr, gr%np, conjugate = .false., psib = psib_with_phase, src = psib, async=.
true.)
1909 k_offset = psib%ik - kpt%start
1910 n_boundary_points = int(gr%np_part - gr%np)
1911 call boundaries_set(gr%der%boundaries, gr, psib_with_phase, phase_correction = hm%phase%phase_corr(:, psib%ik), &
1912 buff_phase_corr = hm%phase%buff_phase_corr, offset=k_offset*n_boundary_points, async=.
true.)
1914 call psib%copy_data_to(gr%np, psib_with_phase)
1915 call boundaries_set(gr%der%boundaries, gr, psib_with_phase)
1918 call psib_with_phase%do_pack(copy = .
true.)
1925#include "hamiltonian_elec_inc.F90"
1928#include "complex.F90"
1929#include "hamiltonian_elec_inc.F90"
subroutine build_external_potentials()
subroutine external_potentials_checks()
subroutine build_interactions()
constant times a vector plus a vector
Copies a vector x, to a vector y.
integer, parameter, public imaginary_absorbing
subroutine, public absorbing_boundaries_end(this)
subroutine, public absorbing_boundaries_init(this, namespace, space, gr)
pure logical function, public accel_allow_cpu_only()
subroutine, public accel_finish()
pure logical function, public accel_is_enabled()
integer, parameter, public accel_mem_read_only
This module implements batches of mesh functions.
This module implements common operations on batches of mesh functions.
Module implementing boundary conditions in Octopus.
This module calculates the derivatives (gradients, Laplacians, etc.) of a function.
real(real64) function, public derivatives_lapl_get_max_eigenvalue(this)
Get maximum eigenvalue of discrete Laplacian. For the star and star_general stencils,...
logical function, public epot_have_external_potentials(ep)
integer, parameter, public scalar_relativistic_zora
subroutine, public epot_end(ep)
integer, parameter, public fully_relativistic_zora
subroutine, public epot_init(ep, namespace, gr, ions, psolver, ispin, xc_family, kpoints)
subroutine, public epot_generate(ep, namespace, mesh, ions, st_d)
subroutine, public exchange_operator_init(this, namespace, space, st, der, mc, stencil, kpoints, omega, alpha, beta)
subroutine, public exchange_operator_end(this)
logical function, public list_has_gauge_field(partners)
type(gauge_field_t) function, pointer, public list_get_gauge_field(partners)
logical function, public list_has_lasers(partners)
type(lasers_t) function, pointer, public list_get_lasers(partners)
integer, parameter, public external_pot_from_file
potential, defined in a file
subroutine, public load_external_potentials(external_potentials, namespace)
integer, parameter, public external_pot_charge_density
user-defined function for charge density
integer, parameter, public external_pot_usdef
user-defined function for local potential
integer, parameter, public external_pot_static_efield
Static electric field.
integer, parameter, public external_pot_static_bfield
Static magnetic field.
subroutine, public gauge_field_get_vec_pot(this, vec_pot)
real(real64), parameter, public m_two
real(real64), parameter, public m_zero
real(real64), parameter, public m_epsilon
real(real64), parameter, public p_c
Electron gyromagnetic ratio, see Phys. Rev. Lett. 130, 071801 (2023)
real(real64), parameter, public m_one
This module implements the underlying real-space grid.
This module defines an abstract class for Hamiltonians.
integer, parameter, public field_uniform_magnetic_field
integer, parameter, public field_uniform_vector_potential
integer, parameter, public field_vector_potential
integer, parameter, public field_potential
integer, parameter, public generalized_kohn_sham_dft
subroutine vborders(mesh, hm, psi, hpsi)
pure logical function, public hamiltonian_elec_apply_packed(this)
subroutine, public hamiltonian_elec_set_inh(hm, st)
subroutine, public zvmask(mesh, hm, st)
integer, parameter, public rdmft
subroutine, public zhamiltonian_elec_apply_batch(hm, namespace, mesh, psib, hpsib, terms, set_bc)
subroutine, public hamiltonian_elec_adjoint(hm)
subroutine, public hamiltonian_elec_set_vhxc(hm, mesh, vold, vold_tau)
subroutine, public hamiltonian_elec_end(hm)
subroutine, public hamiltonian_elec_copy_and_set_phase(hm, gr, kpt, psib, psib_with_phase)
Copy a batch to another batch and apply the Bloch phase to it.
subroutine, public zhamiltonian_elec_apply_single(hm, namespace, mesh, psi, hpsi, ist, ik, terms, set_bc, set_phase)
integer, parameter, public hartree
logical function, public hamiltonian_elec_has_kick(hm)
integer, parameter, public hartree_fock
integer, parameter, public independent_particles
subroutine, public magnus(hm, namespace, mesh, psi, hpsi, ik, vmagnus, set_phase)
logical function hamiltonian_elec_hermitian(hm)
subroutine, public dhamiltonian_elec_apply_single(hm, namespace, mesh, psi, hpsi, ist, ik, terms, set_bc, set_phase)
subroutine, public hamiltonian_elec_epot_generate(this, namespace, space, gr, ions, ext_partners, st, time)
real(real64) function, public hamiltonian_elec_get_time(this)
subroutine, public zhamiltonian_elec_apply_all(hm, namespace, mesh, st, hst)
subroutine, public hamiltonian_elec_dump_vhxc(restart, hm, space, mesh, ierr)
subroutine, public zhamiltonian_elec_diagonal(hm, mesh, diag, ik)
subroutine, public dvmask(mesh, hm, st)
logical function, public hamiltonian_elec_needs_current(hm, states_are_real)
subroutine, public hamiltonian_elec_remove_inh(hm)
subroutine zhamiltonian_elec_magnus_apply(hm, namespace, mesh, psib, hpsib, vmagnus)
subroutine, public zhamiltonian_elec_apply_atom(hm, namespace, space, latt, species, pos, ia, mesh, psi, vpsi)
subroutine, public hamiltonian_elec_update_pot(this, mesh, accumulate)
Update the KS potential of the electronic Hamiltonian.
integer, parameter, public velocity
subroutine dhamiltonian_elec_magnus_apply(hm, namespace, mesh, psib, hpsib, vmagnus)
subroutine hamiltonian_elec_update(this, mesh, namespace, space, ext_partners, time)
(re-)build the Hamiltonian for the next application:
subroutine hamiltonian_elec_span(hm, delta, emin, namespace)
subroutine, public hamiltonian_elec_init(hm, namespace, space, gr, ions, ext_partners, st, theory_level, xc, mc, kpoints, need_exchange, xc_photons)
subroutine dhamiltonian_elec_apply(hm, namespace, mesh, psib, hpsib, terms, set_bc)
subroutine, public hamiltonian_elec_load_vhxc(restart, hm, space, mesh, ierr)
pure logical function, public hamiltonian_elec_inh_term(hm)
subroutine hamiltonian_elec_set_mass(this, namespace, mass)
set the effective electron mass, checking whether it was previously redefined.
subroutine, public dhamiltonian_elec_diagonal(hm, mesh, diag, ik)
subroutine, public dhamiltonian_elec_apply_batch(hm, namespace, mesh, psib, hpsib, terms, set_bc)
integer, parameter, public kohn_sham_dft
subroutine, public hamiltonian_elec_update_with_ext_pot(this, mesh, space, ext_partners, time, mu)
This is an extension of "hamiltonian_elec_update_pot" to be used by the CFM4 propagator....
subroutine, public hamiltonian_elec_not_adjoint(hm)
subroutine zhamiltonian_elec_apply(hm, namespace, mesh, psib, hpsib, terms, set_bc)
This module defines classes and functions for interaction partners.
integer, parameter, public kick_magnon_mode
subroutine, public kick_end(kick)
subroutine, public kick_init(kick, namespace, space, kpoints, nspin)
pure integer function, public kick_get_type(kick)
subroutine, public laser_vector_potential(laser, mesh, aa, time)
subroutine, public lasers_nondipole_laser_field_step(this, field, time)
Retrieves the NDSFA vector_potential correction. The nondipole field is obtained for consecutive time...
logical function, public lasers_with_nondipole_field(lasers)
Check if a nondipole SFA correction should be computed for the given laser.
integer, parameter, public e_field_electric
integer, parameter, public e_field_vector_potential
subroutine, public laser_potential(laser, mesh, pot, time)
integer, parameter, public e_field_scalar_potential
integer pure elemental function, public laser_kind(laser)
subroutine, public laser_field(laser, field, time)
Retrieves the value of either the electric or the magnetic field. If the laser is given by a scalar p...
integer, parameter, public e_field_magnetic
integer, parameter, public dft_u_none
subroutine, public lda_u_update_basis(this, space, gr, ions, st, psolver, namespace, kpoints, has_phase)
subroutine, public lda_u_build_phase_correction(this, space, std, boundaries, namespace, kpoints, vec_pot, vec_pot_var)
Build the phase correction to the global phase for all orbitals.
subroutine, public lda_u_end(this)
subroutine, public lda_u_init(this, namespace, space, level, gr, ions, st, mc, kpoints, has_phase)
This module implements fully polymorphic linked lists, and some specializations thereof.
integer, parameter, public constrain_none
subroutine, public magnetic_constrain_end(this)
subroutine, public magnetic_constrain_init(this, namespace, mesh, std, rho, natoms, min_dist)
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)
subroutine, public messages_warning(no_lines, all_nodes, 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)
subroutine, public messages_experimental(name, namespace)
This module handles the communicators for the various parallelization strategies.
subroutine, public mxll_coupling_init(this, d, gr, namespace, mass)
Parse variables and initialize Maxwell coupling.
subroutine, public set_electric_quadrupole_pot(this, mesh)
Computes the electric quadrupole potential where .
subroutine, public mxll_coupling_end(this)
Finalize and deallocate Maxwell coupling arrays.
subroutine, public mxll_coupling_calc(this, hm_base, mesh, d, space)
Add the Maxwell coupling to the electronic Hamiltonian.
logical function, public oct_exchange_enabled(this)
subroutine, public oct_exchange_remove(this)
Some general things and nomenclature:
logical function, public parse_is_defined(namespace, name)
subroutine, public pcm_calc_pot_rs(pcm, mesh, psolver, ions, v_h, v_ext, kick, time_present, kick_time)
subroutine, public pcm_end(pcm)
subroutine, public pcm_init(pcm, namespace, space, ions, grid, qtot, val_charge, external_potentials_present, kick_present)
Initializes the PCM calculation: reads the VdW molecular cavity and generates the PCM response matrix...
subroutine, public poisson_init(this, namespace, space, der, mc, stencil, qtot, label, solver, verbose, force_serial, force_cmplx)
subroutine, public poisson_end(this)
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_init_phases(this, dim, std, bnd, kpoints, vec_pot, vec_pot_var)
subroutine, public scissor_end(this)
subroutine, public states_set_complex(st)
This module handles spin dimensions of the states and the k-point distribution.
subroutine, public states_elec_dim_copy(dout, din)
subroutine, public states_elec_dim_end(dim)
subroutine, public states_elec_end(st)
finalize the states_elec_t object
subroutine, public states_elec_copy(stout, stin, exclude_wfns, exclude_eigenval, special)
make a (selective) copy of a states_elec_t object
This module provides routines for communicating states when using states parallelization.
integer pure function, public symmetries_identity_index(this)
integer pure function, public symmetries_number(this)
type(type_t), public type_cmplx
brief This module defines the class unit_t which is used by the unit_systems_oct_m module.
This module defines the unit system, used for input and output.
type(unit_system_t), public units_inp
the units systems for reading and writing
integer, parameter, public xc_oep_x_slater
Slater approximation to the exact exchange.
integer, parameter, public func_x
logical pure function, public family_is_mgga_with_exc(xcs)
Is the xc function part of the mGGA family with an energy functional.
logical pure function, public family_is_hybrid(xcs)
Returns true if the functional is an hybrid functional.
This module implements the "photon-free" electron-photon exchange-correlation functional.
This module implements the ZORA terms for the Hamoiltonian.
Extension of space that contains the knowledge of the spin dimension.
Description of the grid, containing information on derivatives, stencil, and symmetries.
The abstract Hamiltonian class defines a skeleton for specific implementations.
abstract class for general interaction partners
iterator for the list of partners
Describes mesh distribution to nodes.
Stores all communicators and groups.
The states_elec_t class contains all electronic wave functions.
This class described the 'photon-exchange' electron-photon xc functionals, based on QEDFT.
This class is responsible for calculating and applying the ZORA.