129 type(electron_space_t) :: space
130 class(ions_t),
pointer :: ions => null()
131 type(photons_t),
pointer :: photons => null()
133 type(states_elec_t) :: st
135 type(output_t) :: outp
136 type(multicomm_t) :: mc
137 type(hamiltonian_elec_t) :: hm
139 type(current_t) :: current_calculator
140 type(dipole_t) :: dipole
144 type(kpoints_t) :: kpoints
146 logical :: generate_epot
148 type(states_elec_t) :: st_copy
151 class(lasers_t),
pointer :: lasers => null()
152 class(gauge_field_t),
pointer :: gfield => null()
156 type(partner_list_t) :: ext_partners
159 type(xc_interaction_t),
pointer :: xc_interaction => null()
163 logical :: ions_propagated = .false.
166 type(wannier_t) :: wannier
190 procedure electrons_constructor
200 class(electrons_t),
pointer :: sys
201 type(namespace_t),
intent(in) :: namespace
202 type(mpi_grp_t),
intent(in) :: grp
203 integer,
optional,
intent(in) :: calc_mode_id
206 integer(int64) :: go_type
207 type(lattice_vectors_t) :: latt_inp
208 logical :: has_photons, variable_cell, cell_dynamics
214 sys%namespace = namespace
216 call sys%init_parallelization(grp)
221 call sys%space%write_info(sys%namespace)
222 if (sys%space%has_mixed_periodicity())
then
226 sys%ions =>
ions_t(sys%namespace, grp=sys%grp, latt_inp=latt_inp, shared_namespace=.
true.)
230 variable_cell = .false.
231 if (
present(calc_mode_id))
then
232 if (calc_mode_id == option__calculationmode__go)
then
233 call parse_variable(sys%namespace,
'GOType', option__gotype__ion_positions, go_type)
234 variable_cell =
bitand(go_type, option__gotype__cell_shape) /= 0 &
235 .or.
bitand(go_type, option__gotype__cell_volume) /= 0
238 call parse_variable(sys%namespace,
'CellDynamics', .false., cell_dynamics)
239 variable_cell = variable_cell .or. cell_dynamics
242 sys%ions%symm, latt_inp, sys%ions%natoms, sys%ions%pos, variable_cell)
244 if (sys%space%is_periodic())
then
245 call sys%ions%latt%write_info(sys%namespace)
249 do iatom = 1, sys%ions%natoms
252 if (.not. sys%gr%box%contains_point(sys%ions%pos(:, iatom), tol=1.0e-6_real64))
then
253 if (sys%space%periodic_dim /= sys%space%dim)
then
254 write(
message(1),
'(a,i5,a)')
"Atom ", iatom,
" is outside the box."
261 if (sys%space%dim == 3)
then
266 call kpoints_init(sys%kpoints, sys%namespace, sys%gr%symm, sys%space%dim, sys%space%periodic_dim, sys%ions%latt, &
269 call states_elec_init(sys%st, sys%namespace, sys%space, sys%ions%val_charge(), sys%kpoints, calc_mode_id)
270 call sys%st%write_info(sys%namespace)
274 call sys%st%modelmbparticles%copy_masses(sys%gr%der%masses)
278 if (
present(calc_mode_id))
then
279 sys%generate_epot = calc_mode_id /= option__calculationmode__dummy
284 call sys%dipole%init(sys%space)
288 call sys%quantities%add(
quantity_t(
"wavefunctions", updated_on_demand = .false.))
289 call sys%quantities%add(
quantity_t(
"current", updated_on_demand = .
true., parents=[
"wavefunctions"]))
290 call sys%quantities%add(
quantity_t(
"dipole", updated_on_demand = .
true., parents=[
"wavefunctions"]))
291 call current_init(sys%current_calculator, sys%namespace)
306 call parse_variable(namespace,
'EnablePhotons', .false., has_photons)
307 if (has_photons)
then
309 sys%photons =>
photons_t(sys%namespace, sys%grp)
314 call sys%wannier%init_from_input(sys%namespace, sys%kpoints, sys%ions, sys%space, sys%st, sys%gr)
327 integer :: rankmin, depth
328 logical :: mxll_interaction_present
329 logical :: calc_dipole
331 push_sub(electrons_init_interactions)
333 mxll_interaction_present = .false.
334 select type (interaction)
336 call interaction%init(this%gr, 3)
337 mxll_interaction_present = .
true.
340 call interaction%init(this%gr, 3)
341 mxll_interaction_present = .
true.
343 call interaction%init(this%gr, 3)
344 mxll_interaction_present = .
true.
346 message(1) =
"Trying to initialize an unsupported interaction by the electrons."
350 if (mxll_interaction_present)
then
351 calc_dipole = any(this%hm%mxll%coupling_mode == &
354 if (calc_dipole)
then
355 assert(this%space%periodic_dim == 0)
356 this%hm%mxll%calc_field_dip = .
true.
357 this%hm%mxll%center_of_mass(1:3) = this%ions%center_of_mass()
358 this%hm%mxll%center_of_mass_ip =
mesh_nearest_point(this%gr, this%hm%mxll%center_of_mass, dmin, rankmin)
359 this%hm%mxll%center_of_mass_rankmin = rankmin
364 select type (interaction)
367 select type (algo => this%algo)
375 message(1) =
"The chosen algorithm does not yet support interaction interpolation"
379 call interaction%init_interpolation(depth, interaction%label)
382 pop_sub(electrons_init_interactions)
389 integer(int64) :: index_range(4)
390 real(real64) :: mesh_global, mesh_local, wfns
392 real(real64) :: spiral_q(3), spiral_q_red(3)
399 index_range(1) = this%gr%np_global
400 index_range(2) = this%st%nst
401 index_range(3) = this%st%nik
402 index_range(4) = 100000
406 this%grp%size, index_range, (/ 5000, 1, 1, 1 /))
408 call this%ions%partition(this%mc)
416 if (
parse_block(this%namespace,
'TDMomentumTransfer', blk) == 0)
then
417 do idir = 1, this%space%dim
420 else if(
parse_block(this%namespace,
'TDReducedMomentumTransfer', blk) == 0)
then
421 do idir = 1, this%space%dim
424 call kpoints_to_absolute(this%kpoints%latt, spiral_q_red(1:this%space%dim), spiral_q(1:this%space%dim))
432 if (this%st%symmetrize_density)
then
436 call output_init(this%outp, this%namespace, this%space, this%st, this%gr, this%st%nst, this%ks)
440 if (
associated(this%photons))
then
441 call this%ks%v_ks_photons%set_active(.
true.)
444 call v_ks_init(this%ks, this%namespace, this%gr, this%st, this%ions, this%mc, this%space, &
451 if (this%ks%v_ks_photons%active())
then
452 call this%ks%v_ks_photons%setup(this%namespace, this%photons%modes, this%gr, this%st, this%ions, &
453 this%mc, this%space, this%ks%xc, this%ks%xc_family, this%ks%oep%level)
458 this%lasers =>
lasers_t(this%namespace)
461 if(this%lasers%no_lasers > 0)
then
462 call this%ext_partners%add(this%lasers)
465 deallocate(this%lasers)
469 this%gfield =>
gauge_field_t(this%namespace, this%ions%latt%rcell_volume)
471 call this%ext_partners%add(this%gfield)
474 deallocate(this%gfield)
477 call hamiltonian_elec_init(this%hm, this%namespace, this%space, this%gr, this%ions, this%ext_partners, &
478 this%st, this%ks%theory_level, this%ks%xc, this%mc, this%kpoints, &
480 xc_photons = this%ks%v_ks_photons%get_xc_photons() )
520 if (this%generate_epot)
then
521 message(1) =
"Info: Generating external potential"
524 this%ext_partners, this%st)
538 allocate(this%supported_interactions(0))
539 select case (this%hm%mxll%coupling_mode)
544 if (this%hm%mxll%add_zeeman)
then
548 if (this%hm%mxll%add_electric_dip .or. this%hm%mxll%add_electric_quad)
then
551 if (this%hm%mxll%add_magnetic_dip)
then
557 message(1) =
"Unknown maxwell-matter coupling"
561 call this%wannier%init_parallelization(this%namespace, this%st, this%ions, this%kpoints)
575 select type (algo => this%algo)
578 call td_init(this%td, this%namespace, this%space, this%gr, this%ions, this%st, this%ks, &
579 this%hm, this%ext_partners, this%outp, this%dmp)
584 call td_init_gaugefield(this%td, this%namespace, this%gr, this%st, this%ks, this%hm, &
585 this%ext_partners, this%space)
605 if (
associated(this%ions))
call this%ions%initialize()
607 select type (algo => this%algo)
611 this%ext_partners, this%st, this%ks, this%hm)
612 call this%wannier%init_data_from_file(this%kpoints)
617 this%hm, this%ions, this%ks, this%space, this%ext_partners, fromscratch=.
true.)
633 select type (algo => this%algo)
638 this%ext_partners, this%st, this%ks, this%hm, this%outp, this%dmp,
td_get_from_scratch(this%td))
649 character(len=:),
allocatable,
intent(out) :: updated_quantities(:)
651 logical :: update_energy_
657 call profiling_in(trim(this%namespace%get())//
":"//trim(operation%id))
659 update_energy_ = .
true.
664 select type (algo => this%algo)
666 time = algo%iteration%value()
667 select case (operation%id)
672 this%hm, this%ext_partners, time)
678 call this%hm%ks_pot%interpolation_new(this%td%tr%vks_old, time+algo%dt, algo%dt)
688 this%st, this%namespace, this%space, this%td%ions_dyn, this%ions, this%ext_partners, &
689 this%mc, time+algo%dt, algo%dt)
693 if(
associated(gfield))
then
695 algo%dt, time+algo%dt)
701 this%hm, this%ext_partners, time+algo%dt)
706 this%gr, this%hm,
m_half*algo%dt)
708 updated_quantities = [
"wavefunctions"]
713 if(
associated(gfield))
then
719 call this%hm%ks_pot%interpolation_new(this%td%tr%vks_old, time+algo%dt, algo%dt)
722 call this%hm%ks_pot%interpolate_potentials(this%td%tr%vks_old, 3, time+algo%dt, algo%dt, time + algo%dt/
m_two)
728 this%namespace, this%space, this%td%ions_dyn, this%ions, this%ext_partners, &
733 this%hm, this%ext_partners, time +
m_half*algo%dt)
738 this%gr, this%hm, algo%dt)
743 updated_quantities = [
"wavefunctions"]
746 call scf_init(this%scf, this%namespace, this%gr, this%ions, this%st, this%mc, this%hm, this%space)
748 this%ions_propagated = .
true.
753 this%td%ions_dyn, this%ions, this%mc, time+algo%dt, algo%dt)
757 this%ext_partners, this%st, time = time+algo%dt)
759 call scf_run(this%scf, this%namespace, this%space, this%mc, this%gr, this%ions, &
760 this%ext_partners, this%st, this%ks, this%hm, verbosity =
verb_compact)
763 this%ext_partners, this%st, time = time+algo%dt)
766 call v_ks_calc(this%ks, this%namespace, this%space, this%hm, this%st, this%ions, this%ext_partners, &
767 calc_eigenval = .
true., time = time+algo%dt, calc_energy = .
true.)
770 call energy_calc_total(this%namespace, this%space, this%hm, this%gr, this%st, this%ext_partners, iunit = -1)
772 updated_quantities = [
"wavefunctions"]
776 if (this%td%ions_dyn%cell_relax())
then
777 assert(this%scf%calc_stress)
778 call this%td%ions_dyn%update_stress(this%ions%space, this%st%stress_tensors%total, &
779 this%ions%latt%rlattice, this%ions%latt%rcell_volume)
786 this%ext_partners, this%st, time = time+algo%dt)
787 call this%ions%update_kinetic_energy()
790 this%ions_propagated = .false.
794 this%ions_propagated = .
true.
811 iter = nint(this%iteration%value()) + 1
813 select case(operation%id)
815 call scf_start(this%scf, this%namespace, this%gr, this%ions, this%st, this%ks, this%hm, this%outp)
819 call scf_iter(this%scf, this%namespace, this%space, this%mc, this%gr, this%ions, &
820 this%ext_partners, this%st, this%ks, this%hm, iter, outp = this%outp, &
821 restart_dump=this%scf%restart_dump)
823 algo%converged =
scf_iter_finish(this%scf, this%namespace, this%space, this%gr, this%ions,&
824 this%st, this%ks, this%hm, iter, outp = this%outp)
826 updated_quantities = [
"wavefunctions"]
831 call scf_finish(this%scf, this%namespace, this%space, this%gr, this%ions, &
832 this%ext_partners, this%st, this%ks, this%hm, iter-1, outp = this%outp)
841 call profiling_out(trim(this%namespace%get())//
":"//trim(operation%id))
848 real(real64),
intent(in) :: tol
860 character(len=*),
intent(in) :: label
865 call profiling_in(trim(this%namespace%get())//
":"//
"UPDATE_QUANTITY")
867 quantity => this%quantities%get(label)
868 if(
associated(quantity))
then
869 assert(quantity%updated_on_demand)
876 this%hm, this%space, this%st)
878 call this%dipole%calculate(this%gr, this%ions, this%st)
880 message(1) =
"Incompatible quantity: "//trim(label)//
"."
884 call profiling_out(trim(this%namespace%get())//
":"//
"UPDATE_QUANTITY")
895 select type (interaction)
897 call interaction%init_from_partner(partner%gr, partner%space, partner%namespace)
899 message(1) =
"Unsupported interaction."
912 call profiling_in(trim(partner%namespace%get())//
":"//
"COPY_QUANTITY_INTER")
914 select type (interaction)
916 assert(
allocated(partner%st%current))
917 interaction%partner_field(:,:) = partner%st%current(1:partner%gr%np,:,1)
918 call interaction%do_mapping()
920 message(1) =
"Unsupported interaction."
924 call profiling_out(trim(partner%namespace%get())//
":"//
"COPY_QUANTITY_INTER")
944 call profiling_in(trim(this%namespace%get())//
":"//
"OUTPUT_WRITE")
946 select type (algo => this%algo)
948 iter = this%iteration%counter()
950 call td_write_iter(this%td%write_handler, this%namespace, this%space, this%outp, this%gr, &
951 this%st, this%hm, this%ions, this%ext_partners, this%hm%kick, this%ks, algo%dt, iter, this%mc, &
952 this%td%recalculate_gs, this%dmp%adiabatic_st)
954 if (this%outp%anything_now(iter))
then
955 call td_write_output(this%namespace, this%space, this%gr, this%st, this%hm, this%ks, &
956 this%outp, this%ions, this%ext_partners, iter, algo%dt)
960 call this%wannier%write_iter(this%namespace, this%outp, this%ions, this%kpoints)
963 call profiling_out(trim(this%namespace%get())//
":"//
"OUTPUT_WRITE")
994 logical :: update_energy_
1000 call profiling_in(trim(this%namespace%get())//
":"//
"END_OF_TIMESTEP")
1007 update_energy_ = .
true.
1013 if (this%td%pesv%calc_spm .or. this%td%pesv%calc_mask .or. this%td%pesv%calc_flux)
then
1014 call pes_calc(this%td%pesv, this%namespace, this%space, this%gr, this%st, &
1015 prop%dt, nt, this%gr%der, this%hm%kpoints, this%ext_partners, stopping)
1021 call profiling_out(trim(this%namespace%get())//
":"//
"END_OF_TIMESTEP")
1029 if (this%td%ions_dyn%is_active())
then
1030 if (.not. this%ions_propagated)
then
1032 this%td%ions_dyn, this%ions, this%mc, abs(nt*prop%dt), this%td%ions_dyn%ionic_scale*prop%dt)
1038 if(
associated(gfield))
then
1044 if (generate .or. this%ions%has_time_dependent_species())
then
1046 this%ext_partners, this%st, time = abs(nt*prop%dt))
1049 call v_ks_calc(this%ks, this%namespace, this%space, this%hm, this%st, this%ions, this%ext_partners, &
1050 calc_eigenval = update_energy_, time = abs(nt*prop%dt), calc_energy = update_energy_)
1052 if (update_energy_)
then
1053 call energy_calc_total(this%namespace, this%space, this%hm, this%gr, this%st, this%ext_partners, iunit = -1)
1057 if (this%td%ions_dyn%ions_move() .or. this%outp%what(option__output__forces) &
1059 call forces_calculate(this%gr, this%namespace, this%ions, this%hm, this%ext_partners, &
1060 this%st, this%ks, t = abs(nt*prop%dt), dt = prop%dt)
1063 if (this%td%ions_dyn%cell_relax() .or. this%outp%what(option__output__stress))
then
1064 call stress_calculate(this%namespace, this%gr, this%hm, this%st, this%ions, this%ks, this%ext_partners)
1067 if(this%td%ions_dyn%is_active())
then
1069 call this%ions%update_kinetic_energy()
1072 if(
associated(gfield))
then
1074 call gauge_field_get_force(gfield, this%gr, this%st%d%spin_channels, this%st%current, this%ks%xc%lrc)
1083 call this%wannier%update_matrices(nt, this%namespace, this%gr, this%space, this%st, this%kpoints, &
1087 this%td%iter = this%td%iter + 1
1089 call profiling_out(trim(this%namespace%get())//
":"//
"END_OF_TIMESTEP")
1100 call profiling_in(trim(this%namespace%get())//
":"//
"RESTART_WRITE")
1102 select type (algo => this%algo)
1105 call td_dump(this%td, this%namespace, this%space, this%gr, this%st, this%hm, &
1106 this%ks, this%ext_partners, this%iteration%counter(), ierr)
1108 message(1) =
"Unable to write time-dependent restart information."
1113 call pes_output(this%td%pesv, this%namespace, this%space, this%gr, this%st, this%iteration%counter(), &
1114 this%outp, algo%dt, this%ions)
1117 call this%wannier%restart_write_data(this%namespace, this%mc, this%gr)
1121 call profiling_out(trim(this%namespace%get())//
":"//
"RESTART_WRITE")
1130 logical :: from_scratch
1133 call profiling_in(trim(this%namespace%get())//
":"//
"RESTART_READ")
1135 select type (algo => this%algo)
1137 from_scratch = .false.
1139 this%ext_partners, this%st, this%ks, this%hm, from_scratch)
1142 call this%wannier%restart_read_data(this%namespace, this%mc, this%gr)
1148 from_scratch = .false.
1150 this%ks, this%space, this%ions, this%ext_partners,from_scratch)
1156 if (from_scratch)
then
1164 call profiling_out(trim(this%namespace%get())//
":"//
"RESTART_READ")
1187 real(real64),
intent(in) :: time
1190 real(real64),
allocatable :: field_tmp(:, :)
1199 assert(this%gr%box%dim == 3)
1201 safe_allocate(field_tmp(1:this%gr%np, 1:this%gr%box%dim))
1202 this%hm%mxll%e_field =
m_zero
1203 this%hm%mxll%b_field =
m_zero
1204 this%hm%mxll%vec_pot =
m_zero
1207 call iter%start(this%interactions)
1208 do while (iter%has_next())
1209 select type (interaction => iter%get_next())
1211 call interaction%interpolate(time, field_tmp)
1212 call lalg_axpy(this%gr%np, 3,
m_one, field_tmp, this%hm%mxll%e_field)
1214 call interaction%interpolate(time, field_tmp)
1215 call lalg_axpy(this%gr%np, 3,
m_one, field_tmp, this%hm%mxll%vec_pot)
1217 call interaction%interpolate(time, field_tmp)
1218 call lalg_axpy(this%gr%np, 3,
m_one, field_tmp, this%hm%mxll%b_field)
1222 safe_deallocate_a(field_tmp)
1231 logical,
intent(inout) :: from_scratch
1236 sys%ext_partners, sys%st, sys%ks, sys%hm, sys%outp, sys%space, from_scratch)
1251 if (
associated(sys%algo))
then
1252 select type (algo => sys%algo)
1254 call td_end_run(sys%td, sys%st, sys%hm, sys%dmp)
1265 call iter%start(sys%ext_partners)
1266 do while (iter%has_next())
1267 partner => iter%get_next()
1268 safe_deallocate_p(partner)
1270 call sys%ext_partners%empty()
1272 safe_deallocate_p(sys%xc_interaction)
1281 call sys%dipole%end()
1287 deallocate(sys%ions)
1288 safe_deallocate_p(sys%photons)
constant times a vector plus a vector
integer, parameter, public mask_absorbing
This module defines the abstract interfact for algorithm factories.
This module implements the basic elements defining algorithms.
character(len=algo_label_len), parameter, public iteration_done
This module handles the calculation mode.
type(calc_mode_par_t), public calc_mode_par
Singleton instance of parallel calculation mode.
integer, parameter, public p_strategy_serial
single domain, all states, k-points on a single processor
integer, parameter, public p_strategy_states
parallelization in states
subroutine, public current_calculate(this, namespace, gr, hm, space, st)
Compute total electronic current density.
subroutine, public current_init(this, namespace)
This module implements a calculator for the density and defines related functions.
This modules implements the dipole moment of the matter system.
A set of subroutines for performing the parts of a ground state calculation with an electrons system....
subroutine, public electrons_ground_state_run(namespace, mc, gr, ions, ext_partners, st, ks, hm, outp, space, fromScratch)
Run a ground state calculation for a system of electrons.
subroutine, public electrons_gs_allocate_wavefunctions(namespace, gr, st, hm, scf, ks, ions)
subroutine, public electrons_gs_initialize(namespace, scf, rdm, gr, mc, st, hm, ions, ks, space, ext_partners, fromScratch)
subroutine, public electrons_gs_load_from_restart(namespace, scf, gr, mc, st, hm, ks, space, ions, ext_partners, fromScratch)
subroutine, public electrons_gs_cleanup(ks, scf, rdm, st, hm)
subroutine electrons_initialize(this)
logical function electrons_restart_read_data(this)
logical function electrons_process_is_slave(this)
subroutine electrons_init_interaction(this, interaction)
subroutine electrons_finalize(sys)
subroutine electrons_exec_end_of_timestep_tasks(this, prop)
logical function electrons_do_algorithmic_operation(this, operation, updated_quantities)
subroutine electrons_new_algorithm(this, factory)
subroutine electrons_output_write(this)
subroutine get_fields_from_interaction(this, time)
subroutine electrons_algorithm_start(this)
subroutine electrons_output_finish(this)
subroutine electrons_output_start(this)
subroutine electrons_init_parallelization(this)
subroutine electrons_init_interaction_as_partner(partner, interaction)
subroutine electrons_ground_state_run_system(sys, from_scratch)
Run a ground state calculation for a system of electrons.
subroutine electrons_update_kinetic_energy(this)
logical function electrons_is_tolerance_reached(this, tol)
class(electrons_t) function, pointer electrons_constructor(namespace, grp, calc_mode_id)
@ brief Instantiate an instance of an electrons system
subroutine electrons_copy_quantities_to_interaction(partner, interaction)
subroutine electrons_restart_write_data(this)
subroutine electrons_update_quantity(this, label)
subroutine, public elf_init(namespace)
subroutine, public energy_calc_total(namespace, space, hm, gr, st, ext_partners, iunit, full)
This subroutine calculates the total energy of the system. Basically, it adds up the KS eigenvalues,...
real(real64) function, public zenergy_calc_electronic(namespace, hm, der, st, terms)
real(real64) function, public denergy_calc_electronic(namespace, hm, der, st, terms)
type(gauge_field_t) function, pointer, public list_get_gauge_field(partners)
This module implements the field transfer.
subroutine, public forces_calculate(gr, namespace, ions, hm, ext_partners, st, ks, vhxc_old, t, dt)
subroutine, public gauge_field_get_force(this, gr, spin_channels, current, lrc)
subroutine, public gauge_field_do_algorithmic_operation(this, operation, dt, time)
subroutine, public gauge_field_check_symmetries(this, kpoints)
logical pure function, public gauge_field_is_propagated(this)
logical pure function, public gauge_field_is_used(this)
real(real64), parameter, public m_two
real(real64), parameter, public m_zero
integer, parameter, public independent_particles
Theory level.
integer, parameter, public generalized_kohn_sham_dft
integer, parameter, public kohn_sham_dft
real(real64), parameter, public m_half
real(real64), parameter, public m_one
This module implements the underlying real-space grid.
subroutine, public grid_init_stage_1(gr, namespace, space, grp, symm, latt, n_sites, site_position, variable_cell)
First stage of the grid initialization.
subroutine, public grid_init_stage_2(gr, namespace, space, mc, qvector)
Second stage of the grid initialization.
subroutine, public grid_end(gr)
finalize a grid object
integer, parameter, public term_kinetic
subroutine, public zvmask(mesh, hm, st)
subroutine, public hamiltonian_elec_end(hm)
subroutine, public hamiltonian_elec_epot_generate(this, namespace, space, gr, ions, ext_partners, st, time)
subroutine, public hamiltonian_elec_init(hm, namespace, space, gr, ions, ext_partners, st, theory_level, xc, mc, kpoints, need_exchange, xc_photons)
integer, parameter, public mxll_vec_pot_to_matter
integer, parameter, public mxll_b_field_to_matter
integer, parameter, public mxll_e_field_to_matter
integer, parameter, public current_to_mxll_field
This module defines the abstract interaction_t class, and some auxiliary classes for interactions.
This module defines classes and functions for interaction partners.
subroutine, public ion_dynamics_propagate_vel(this, ions, atoms_moved)
subroutine, public kpoints_end(this)
subroutine, public kpoints_init(this, namespace, symm, dim, periodic_dim, latt, grp)
subroutine, public kpoints_to_absolute(latt, kin, kout)
A module to handle KS potential, without the external potential.
subroutine, public lasers_check_symmetries(this, kpoints)
subroutine, public lasers_parse_external_fields(this)
subroutine, public lasers_generate_potentials(this, mesh, space, latt)
subroutine, public lda_u_update_occ_matrices(this, namespace, mesh, st, phase, energy)
System information (time, memory, sysname)
This module defines the meshes, which are used in Octopus.
subroutine, public mesh_check_symmetries(mesh, symm, periodic_dim)
integer function, public mesh_nearest_point(mesh, pos, dmin, rankmin)
Returns the index of the point which is nearest to a given vector position pos.
real(real64) pure function, public mesh_global_memory(mesh)
real(real64) pure function, public mesh_local_memory(mesh)
subroutine, public messages_print_with_emphasis(msg, iunit, namespace)
character(len=512), private msg
subroutine, public messages_warning(no_lines, all_nodes, namespace)
subroutine, public messages_obsolete_variable(namespace, name, rep)
subroutine, public messages_new_line()
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)
subroutine, public messages_info(no_lines, iunit, debug_only, stress, all_nodes, namespace)
This module implements the basic minimizer framework.
character(len=algo_label_len), parameter, public gs_scf_start
character(len=algo_label_len), parameter, public gs_scf_finish
character(len=algo_label_len), parameter, public gs_scf_iteration
general module for modelmb particles
This module handles the communicators for the various parallelization strategies.
subroutine, public multicomm_end(mc)
subroutine, public multicomm_init(mc, namespace, base_grp, mode_para, n_processes, index_range, min_range)
create index and domain communicators
logical pure function, public multicomm_is_slave(this)
integer, parameter, public length_gauge_dipole
integer, parameter, public no_maxwell_coupling
integer, parameter, public velocity_gauge_dipole
integer, parameter, public multipolar_expansion
integer, parameter, public full_minimal_coupling
Maxwell-field-to-matter interactions.
integer, parameter, public mxll_field_trans
this module contains the low-level part of the output system
this module contains the output system
logical function, public output_need_exchange(outp)
subroutine, public output_init(outp, namespace, space, st, gr, nst, ks)
logical function, public parse_is_defined(namespace, name)
integer function, public parse_block(namespace, name, blk, check_varinfo_)
subroutine, public pes_calc(pes, namespace, space, mesh, st, dt, iter, der, kpoints, ext_partners, stopping)
subroutine, public pes_output(pes, namespace, space, gr, st, iter, outp, dt, ions)
subroutine, public poisson_async_init(this, mc)
subroutine, public poisson_slave_work(this, namespace)
subroutine, public poisson_async_end(this, mc)
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 propagation_ops_elec_restore_ions(wo, ions_dyn, ions)
subroutine, public propagation_ops_elec_propagate_gauge_field(wo, gfield, dt, time, save_gf)
subroutine, public propagation_ops_elec_propagate_ions_and_cell(gr, hm, st, namespace, space, ions_dyn, ions, mc, time, dt_ions)
subroutine, public propagation_ops_elec_update_hamiltonian(namespace, space, st, mesh, hm, ext_partners, time)
subroutine, public propagation_ops_elec_fuse_density_exp_apply(te, namespace, st, gr, hm, dt, dt2, op, st_td)
Apply to all states, and accumulate the density in the same pass.
subroutine, public propagation_ops_elec_interpolate_get(hm, vks_old)
subroutine, public propagation_ops_elec_move_ions(wo, gr, hm, st, namespace, space, ions_dyn, ions, ext_partners, mc, time, dt, save_pos)
subroutine, public propagation_ops_elec_exp_apply(te, namespace, st, mesh, hm, dt, op)
character(len=algo_label_len), parameter, public aetrs_start
character(len=algo_label_len), parameter, public aetrs_finish
character(len=algo_label_len), parameter, public aetrs_extrapolate
character(len=algo_label_len), parameter, public aetrs_first_half
character(len=algo_label_len), parameter, public aetrs_second_half
character(len=algo_label_len), parameter, public bomd_start
character(len=algo_label_len), parameter, public bomd_elec_scf
character(len=algo_label_len), parameter, public bomd_finish
character(len=algo_label_len), parameter, public expmid_extrapolate
character(len=algo_label_len), parameter, public expmid_finish
character(len=algo_label_len), parameter, public expmid_start
character(len=algo_label_len), parameter, public expmid_propagate
This module implements the basic propagator framework.
character(len=30), parameter, public verlet_compute_acc
type(algorithmic_operation_t), parameter, public op_verlet_compute_acc
character(len=30), parameter, public verlet_update_pos
type(algorithmic_operation_t), parameter, public op_verlet_compute_vel
character(len=30), parameter, public verlet_compute_vel
This module defines the quantity_t class and the IDs for quantities, which can be exposed by a system...
Implementation details for regridding.
subroutine, public scf_finish(scf, namespace, space, gr, ions, ext_partners, st, ks, hm, iter, outp)
subroutine, public scf_start(scf, namespace, gr, ions, st, ks, hm, outp, verbosity)
Preparation of the SCF cycle.
integer, parameter, public verb_compact
subroutine, public scf_init(scf, namespace, gr, ions, st, mc, hm, space)
subroutine, public scf_end(scf)
subroutine, public scf_run(scf, namespace, space, mc, gr, ions, ext_partners, st, ks, hm, outp, verbosity, iters_done, restart_dump)
Legacy version of the SCF code.
subroutine, public scf_iter(scf, namespace, space, mc, gr, ions, ext_partners, st, ks, hm, iter, outp, restart_dump)
logical function, public scf_iter_finish(scf, namespace, space, gr, ions, st, ks, hm, iter, outp, iters_done)
This module is intended to contain "only mathematical" functions and procedures.
pure logical function, public states_are_real(st)
This module handles spin dimensions of the states and the k-point distribution.
real(real64) function, public states_elec_wfns_memory(st, mesh)
return the memory usage of a states_elec_t object
subroutine, public states_elec_distribute_nodes(st, namespace, mc)
Distribute states over the processes for states parallelization.
subroutine, public states_elec_densities_init(st, gr)
subroutine, public states_elec_end(st)
finalize the states_elec_t object
subroutine, public kpoints_distribute(this, mc)
distribute k-points over the nodes in the corresponding communicator
subroutine, public states_elec_exec_init(st, namespace, mc)
Further initializations.
subroutine, public states_elec_init(st, namespace, space, valence_charge, kpoints, calc_mode_id)
Initialize a new states_elec_t object.
subroutine, public states_elec_allocate_current(st, space, mesh)
This module implements the calculation of the stress tensor.
subroutine, public stress_calculate(namespace, gr, hm, st, ions, ks, ext_partners)
This computes the total stress on the lattice.
subroutine, public symmetries_use_compatible_nonsymmorphic(this, ll, namespace)
Detect if some non-symmorphic operations are compatible with the real-space grid If yes,...
This module implements the abstract system type.
subroutine, public system_algorithm_start(this)
subroutine, public system_end(this)
subroutine, public system_new_algorithm(this, factory)
subroutine, public td_init_with_wavefunctions(td, namespace, space, mc, gr, ions, ext_partners, st, ks, hm, outp, dmp, from_scratch)
subroutine, public td_end(td)
subroutine, public td_load_restart_from_gs(td, namespace, space, mc, gr, ext_partners, st, ks, hm)
subroutine, public td_allocate_wavefunctions(td, namespace, mc, gr, ions, st, hm, space)
subroutine, public td_init(td, namespace, space, gr, ions, st, ks, hm, ext_partners, outp, dmp)
logical function, public td_get_from_scratch(td)
subroutine, public td_set_from_scratch(td, from_scratch)
subroutine, public td_dump(td, namespace, space, gr, st, hm, ks, ext_partners, iter, ierr)
subroutine, public td_init_gaugefield(td, namespace, gr, st, ks, hm, ext_partners, space)
subroutine, public td_load_restart_from_td(td, namespace, space, mc, gr, ext_partners, st, ks, hm, from_scratch)
subroutine, public td_end_run(td, st, hm, dmp)
subroutine, public td_write_output(namespace, space, gr, st, hm, ks, outp, ions, ext_partners, iter, dt)
subroutine, public td_write_iter(writ, namespace, space, outp, gr, st, hm, ions, ext_partners, kick, ks, dt, iter, mc, recalculate_gs, dmp_st)
subroutine, public td_write_data(writ)
integer, parameter, public out_separate_forces
This module defines the unit system, used for input and output.
type(unit_t), public unit_megabytes
For large amounts of data (natural code units are bytes)
subroutine, public v_ks_end(ks)
subroutine, public v_ks_calc(ks, namespace, space, hm, st, ions, ext_partners, calc_eigenval, time, calc_energy, calc_current, force_semilocal)
subroutine, public v_ks_init(ks, namespace, gr, st, ions, mc, space, kpoints)
integer, parameter, public td_wannier_method_none
integer, parameter, public oep_level_none
the OEP levels
Abstract class for the algorithm factories.
Descriptor of one algorithmic operation.
Class to transfer a current to a Maxwell field.
Extension of space that contains the knowledge of the spin dimension.
Class describing the electron system.
class defining the field_transfer interaction
These class extend the list and list iterator to make an interaction list.
abstract interaction class
abstract class for general interaction partners
iterator for the list of partners
surrogate interaction class to avoid circular dependencies between modules.
Abstract class implementing minimizers.
class to transfer a Maxwell B field to a matter system
class to transfer a Maxwell electric field to a medium
class to transfer a Maxwell vector potential to a medium
Implements a propagator for Approximate ETRS.
Implements a propagator for Born-Oppenheimer molecular dynamics.
Implements the explicit exponential midpoint propagator (without predictor-corrector)
Abstract class implementing propagators.
Systems (system_t) can expose quantities that can be used to calculate interactions with other system...
Abstract class for systems.
Main object containing all Wannier-related data and methods.