![]() |
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, 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_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_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 222 of file ks_potential.F90.
|
private |
Releases the memory for the KS potentials.
Definition at line 263 of file ks_potential.F90.
|
private |
Set vtau and update the corresponding GPU buffer.
Definition at line 281 of file ks_potential.F90.
|
private |
Update vtau GPU buffer.
Definition at line 297 of file ks_potential.F90.
|
private |
Adds vHxc to the potential.
[in,out] | pot | On exit, vHxc has been added |
Definition at line 318 of file ks_potential.F90.
|
private |
Dumps the vhxc potentials.
Definition at line 341 of file ks_potential.F90.
|
private |
Loads the vhxc potentials.
Definition at line 430 of file ks_potential.F90.
|
private |
Initialize the potential interpolation.
Definition at line 488 of file ks_potential.F90.
|
private |
Run zero iter for the interpolation.
Definition at line 501 of file ks_potential.F90.
|
private |
New interpolation point for the interpolation.
Definition at line 513 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 529 of file ks_potential.F90.
|
private |
Set the interpolated potentials to history.
Definition at line 559 of file ks_potential.F90.
|
private |
Interpolate potentials to a new time.
Definition at line 579 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 604 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 616 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 628 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 642 of file ks_potential.F90.
|
private |
Copy the potentials to a storage object.
Definition at line 677 of file ks_potential.F90.
|
private |
Copy the potentials to a storage object.
Definition at line 696 of file ks_potential.F90.
|
private |
Copy the potentials from a storage object.
Definition at line 714 of file ks_potential.F90.
|
private |
Copy the vhxc potential to a gpu buffer.
Definition at line 733 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 752 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 765 of file ks_potential.F90.
|
private |
Perform a time interpolation of the potentials.
Definition at line 799 of file ks_potential.F90.
|
private |
Replace vold potentials by 0.5*dt(vold + vhxc)
Definition at line 818 of file ks_potential.F90.
|
private |
Multiply a mesh function by vHxc.
[in,out] | mf | On exit, vHxc has been added |
Definition at line 917 of file ks_potential.F90.
|
private |
Wrapper to hamiltonian_elec_base_local_sub to hide the data of vtau.
Definition at line 937 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 958 of file ks_potential.F90.
|
private |
Multiply a mesh function by vHxc.
[in,out] | mf | On exit, vHxc has been added |
Definition at line 1061 of file ks_potential.F90.
|
private |
Wrapper to hamiltonian_elec_base_local_sub to hide the data of vtau.
Definition at line 1081 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 1102 of file ks_potential.F90.
integer, parameter, public ks_potential_oct_m::independent_particles = 2 |
Definition at line 157 of file ks_potential.F90.
integer, parameter, public ks_potential_oct_m::hartree = 1 |
Definition at line 157 of file ks_potential.F90.
integer, parameter, public ks_potential_oct_m::hartree_fock = 3 |
Definition at line 157 of file ks_potential.F90.
integer, parameter, public ks_potential_oct_m::kohn_sham_dft = 4 |
Definition at line 157 of file ks_potential.F90.
integer, parameter, public ks_potential_oct_m::generalized_kohn_sham_dft = 5 |
Definition at line 157 of file ks_potential.F90.
integer, parameter, public ks_potential_oct_m::rdmft = 7 |
Definition at line 157 of file ks_potential.F90.