19#include "./base/base_uses.f90"
29 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_electrons_utils'
30 REAL(KIND=
dp),
PARAMETER,
PRIVATE :: hartree_to_ev = 27.211386245988_dp
42 REAL(kind=
dp) :: force
44 cpassert(
ASSOCIATED(electrons))
45 IF (electrons%control_fermi)
THEN
51 force = (electrons%target_fermi_level - electrons%current_fermi_level_eV)/hartree_to_ev
53 force = (electrons%current_workfunction - electrons%target_workfunction)/hartree_to_ev
65 REAL(kind=
dp),
INTENT(IN) :: dt
67 cpassert(
ASSOCIATED(electrons))
70 IF (electrons%lambda_is_fixed)
RETURN
82 REAL(kind=
dp),
INTENT(IN) :: dt
84 cpassert(
ASSOCIATED(electrons))
85 IF (electrons%lambda_is_fixed)
RETURN
86 electrons%q = electrons%q + electrons%p*dt/electrons%mass
98 REAL(kind=
dp),
INTENT(IN) :: dt
100 REAL(kind=
dp) :: alpha, kk, old_kinetic, sigma, taut
102 cpassert(
ASSOCIATED(electrons))
104 old_kinetic = 0.5_dp*electrons%p**2/electrons%mass
112 sigma = 0.5_dp*electrons%temp_potentiostat/
kelvin
132 electrons%p = electrons%p*alpha
133 electrons%thermostat_energy = electrons%thermostat_energy + &
134 old_kinetic - 0.5_dp*electrons%p**2/electrons%mass
real(kind=dp) function, public rescaling_factor(kk, sigma, ndeg, taut, rng_stream)
Stochastic velocity rescale, as described in Bussi, Donadio and Parrinello, J. Chem....
Defines the basic variable types.
integer, parameter, public dp
Definition of physical constants:
real(kind=dp), parameter, public femtoseconds
real(kind=dp), parameter, public kelvin
State of the fictitious electronic degree of freedom (electron number q, its momentum,...
Propagation of the electronic degree of freedom in constant-potential MD: generalized force,...
real(kind=dp) function, public qs_electrons_force(electrons)
Generalized electronic force: deviation of the current work function from the target,...
subroutine, public qs_electrons_drift(electrons, dt)
Drift of the electronic coordinate (total electron number).
subroutine, public qs_electrons_thermostat_step(electrons, dt)
Stochastic velocity rescaling ("O" step) of the electronic momentum, reusing CP2K's own CSVR rescalin...
subroutine, public qs_electrons_kick(electrons, dt)
Half-kick of the electronic momentum from the current generalized force.