![]() |
Octopus
|
A module to handle KS potential, without the external potential. More...
A module to handle KS potential, without the external potential.
The object knows how to dump, load, and interpolate its potentials. The main motivation is to hide the data behind some getters/setters, to avoid data getting out of scope
Data Types | |
type | ks_potential_t |
type | xc_copied_potentials_t |
Functions/Subroutines | |
subroutine | ks_potential_init (this, der, np, np_part, nspin, theory_level, needs_vtau) |
Allocate the memory for the KS potentials. More... | |
subroutine | ks_potential_end (this) |
Releases the memory for the KS potentials. More... | |
subroutine | ks_potential_set_vtau (this, vtau) |
Set vtau and update the corresponding GPU buffer. More... | |
subroutine | ks_potential_update_vtau_buffer (this) |
Update vtau GPU buffer. More... | |
subroutine | ks_potential_add_vhxc (this, pot, nspin) |
Adds vHxc to the potential. More... | |
subroutine | ks_potential_dump_vhxc (this, restart, space, mesh, ierr) |
Dumps the vhxc potentials. More... | |
subroutine | ks_potential_load_vhxc (this, restart, space, mesh, ierr) |
Loads the vhxc potentials. More... | |
subroutine | ks_potential_init_interpolation (this, vksold, order) |
Initialize the potential interpolation. More... | |
subroutine | ks_potential_run_zero_iter (this, vksold) |
Run zero iter for the interpolation. More... | |
subroutine | ks_potential_interpolation_new (this, vksold, current_time, dt) |
New interpolation point for the interpolation. More... | |
subroutine | ks_potential_get_interpolated_potentials (this, vksold, history, storage) |
Get the interpolated potentials from history. More... | |
subroutine | ks_potential_set_interpolated_potentials (this, vksold, history) |
Set the interpolated potentials to history. More... | |
subroutine | ks_potential_interpolate_potentials (this, vksold, order, current_time, dt, interpolation_time) |
Interpolate potentials to a new time. More... | |
subroutine, public | vtau_set_vout (field, this) |
subroutine, public | vtau_set_vin (field, this) |
subroutine, public | vtau_get_vnew (field, this) |
subroutine | ks_potential_output_potentials (this, namespace, how, dir, space, mesh, pos, atoms, grp) |
Outputs vh, vxc, and vtau potentials. More... | |
subroutine | ks_potential_storage_allocate (this, copy) |
Copy the potentials to a storage object. More... | |
subroutine | ks_potential_store_copy (this, copy) |
Copy the potentials to a storage object. More... | |
subroutine | ks_potential_restore_copy (this, copy) |
Copy the potentials from a storage object. More... | |
subroutine | xc_copied_potentials_copy_vhxc_to_buffer (this, np, nspin, pnp, buffer) |
Copy the vhxc potential to a gpu buffer. More... | |
subroutine, public | xc_copied_potentials_end (this) |
Finalizer for the copied potentials. More... | |
real(real64) function | ks_potential_check_convergence (this, copy, mesh, rho, qtot) |
Check the convergence of a vhxc for predictor-corrector. More... | |
subroutine | ks_potential_perform_interpolation (this, vksold, times, current_time) |
Perform a time interpolation of the potentials. More... | |
subroutine | ks_potential_mix_potentials (this, vold, dt) |
Replace vold potentials by 0.5*dt(vold + vhxc) More... | |
subroutine | zks_potential_mult_vhxc (this, mf, ispin) |
Multiply a mesh function by vHxc. More... | |
subroutine | zks_potential_apply_vtau_psi (this, mesh, d, ispin, psib, vpsib) |
Wrapper to hamiltonian_elec_base_local_sub to hide the data of vtau. More... | |
subroutine | zks_potential_apply_lapl_vtau_psi (this, mesh, d, ispin, psib, vpsib) |
Wrapper to hamiltonian_elec_base_local_sub to hide the data of lapl_vtau. More... | |
subroutine | zks_potential_current_mass_renormalization (this, gpsi, space_dim, ndim, ispin) |
Nonlocal contribution of vtau for the current. More... | |
subroutine | dks_potential_mult_vhxc (this, mf, ispin) |
Multiply a mesh function by vHxc. More... | |
subroutine | dks_potential_apply_vtau_psi (this, mesh, d, ispin, psib, vpsib) |
Wrapper to hamiltonian_elec_base_local_sub to hide the data of vtau. More... | |
subroutine | dks_potential_apply_lapl_vtau_psi (this, mesh, d, ispin, psib, vpsib) |
Wrapper to hamiltonian_elec_base_local_sub to hide the data of lapl_vtau. More... | |
subroutine | dks_potential_current_mass_renormalization (this, gpsi, space_dim, ndim, ispin) |
Nonlocal contribution of vtau for the current. More... | |
Variables | |
integer, parameter, public | independent_particles = 2 |
integer, parameter, public | hartree = 1 |
integer, parameter, public | hartree_fock = 3 |
integer, parameter, public | kohn_sham_dft = 4 |
integer, parameter, public | generalized_kohn_sham_dft = 5 |
integer, parameter, public | rdmft = 7 |
|
private |
Allocate the memory for the KS potentials.
Definition at line 230 of file ks_potential.F90.
|
private |
Releases the memory for the KS potentials.
Definition at line 278 of file ks_potential.F90.
|
private |
Set vtau and update the corresponding GPU buffer.
Definition at line 298 of file ks_potential.F90.
|
private |
Update vtau GPU buffer.
Definition at line 314 of file ks_potential.F90.
|
private |
Adds vHxc to the potential.
[in,out] | pot | On exit, vHxc has been added |
Definition at line 340 of file ks_potential.F90.
|
private |
Dumps the vhxc potentials.
Definition at line 363 of file ks_potential.F90.
|
private |
Loads the vhxc potentials.
Definition at line 452 of file ks_potential.F90.
|
private |
Initialize the potential interpolation.
Definition at line 510 of file ks_potential.F90.
|
private |
Run zero iter for the interpolation.
Definition at line 523 of file ks_potential.F90.
|
private |
New interpolation point for the interpolation.
Definition at line 535 of file ks_potential.F90.
|
private |
Get the interpolated potentials from history.
If the optional argument storage is present, the data are copied to this one instead
Definition at line 551 of file ks_potential.F90.
|
private |
Set the interpolated potentials to history.
Definition at line 581 of file ks_potential.F90.
|
private |
Interpolate potentials to a new time.
Definition at line 601 of file ks_potential.F90.
subroutine, public ks_potential_oct_m::vtau_set_vout | ( | type(mixfield_t), intent(inout) | field, |
type(ks_potential_t), intent(in) | this | ||
) |
Definition at line 626 of file ks_potential.F90.
subroutine, public ks_potential_oct_m::vtau_set_vin | ( | type(mixfield_t), intent(inout) | field, |
type(ks_potential_t), intent(in) | this | ||
) |
Definition at line 638 of file ks_potential.F90.
subroutine, public ks_potential_oct_m::vtau_get_vnew | ( | type(mixfield_t), intent(in) | field, |
type(ks_potential_t), intent(inout) | this | ||
) |
Definition at line 650 of file ks_potential.F90.
|
private |
Outputs vh, vxc, and vtau potentials.
[in] | grp | the group that shares the same data, must contain the domains group |
Definition at line 664 of file ks_potential.F90.
|
private |
Copy the potentials to a storage object.
Definition at line 699 of file ks_potential.F90.
|
private |
Copy the potentials to a storage object.
Definition at line 718 of file ks_potential.F90.
|
private |
Copy the potentials from a storage object.
Definition at line 736 of file ks_potential.F90.
|
private |
Copy the vhxc potential to a gpu buffer.
Definition at line 755 of file ks_potential.F90.
subroutine, public ks_potential_oct_m::xc_copied_potentials_end | ( | type(xc_copied_potentials_t), intent(inout) | this | ) |
Finalizer for the copied potentials.
Definition at line 774 of file ks_potential.F90.
|
private |
Check the convergence of a vhxc for predictor-corrector.
now check how much the potential changed We multiply by the density to compute the first moment This avoids spurious effects for post-LDA functionals when at the border of the box for isolated systems.
Definition at line 787 of file ks_potential.F90.
|
private |
Perform a time interpolation of the potentials.
Definition at line 821 of file ks_potential.F90.
|
private |
Replace vold potentials by 0.5*dt(vold + vhxc)
Definition at line 840 of file ks_potential.F90.
|
private |
Multiply a mesh function by vHxc.
[in,out] | mf | On exit, vHxc has been added |
Definition at line 939 of file ks_potential.F90.
|
private |
Wrapper to hamiltonian_elec_base_local_sub to hide the data of vtau.
Definition at line 959 of file ks_potential.F90.
|
private |
Wrapper to hamiltonian_elec_base_local_sub to hide the data of lapl_vtau.
Definition at line 976 of file ks_potential.F90.
|
private |
Nonlocal contribution of vtau for the current.
A nonlocal contribution from the MGGA potential must be included This must be done first, as this is like a position-dependent mass as a renormalization of the gradient
[in,out] | gpsi | Gradient of psi (np, spacedim, ndim) |
Definition at line 998 of file ks_potential.F90.
|
private |
Multiply a mesh function by vHxc.
[in,out] | mf | On exit, vHxc has been added |
Definition at line 1101 of file ks_potential.F90.
|
private |
Wrapper to hamiltonian_elec_base_local_sub to hide the data of vtau.
Definition at line 1121 of file ks_potential.F90.
|
private |
Wrapper to hamiltonian_elec_base_local_sub to hide the data of lapl_vtau.
Definition at line 1138 of file ks_potential.F90.
|
private |
Nonlocal contribution of vtau for the current.
A nonlocal contribution from the MGGA potential must be included This must be done first, as this is like a position-dependent mass as a renormalization of the gradient
[in,out] | gpsi | Gradient of psi (np, spacedim, ndim) |
Definition at line 1160 of file ks_potential.F90.
integer, parameter, public ks_potential_oct_m::independent_particles = 2 |
Definition at line 158 of file ks_potential.F90.
integer, parameter, public ks_potential_oct_m::hartree = 1 |
Definition at line 158 of file ks_potential.F90.
integer, parameter, public ks_potential_oct_m::hartree_fock = 3 |
Definition at line 158 of file ks_potential.F90.
integer, parameter, public ks_potential_oct_m::kohn_sham_dft = 4 |
Definition at line 158 of file ks_potential.F90.
integer, parameter, public ks_potential_oct_m::generalized_kohn_sham_dft = 5 |
Definition at line 158 of file ks_potential.F90.
integer, parameter, public ks_potential_oct_m::rdmft = 7 |
Definition at line 158 of file ks_potential.F90.