28 REAL(kind=
dp) :: q = 0.0_dp
29 REAL(kind=
dp) :: p = 0.0_dp
30 REAL(kind=
dp) :: mass = 1.0_dp
31 REAL(kind=
dp) :: neutral_electrons = 0.0_dp
32 REAL(kind=
dp) :: target_workfunction = 0.0_dp
33 REAL(kind=
dp) :: target_fermi_level = 0.0_dp
38 LOGICAL :: control_fermi = .false.
45 REAL(kind=
dp) :: lambda_fixed = 0.0_dp
46 LOGICAL :: lambda_is_fixed = .false.
50 LOGICAL :: charge_mixing_inplace = .false.
59 LOGICAL :: report_only = .false.
60 REAL(kind=
dp) :: tau_potentiostat = 0.0_dp
61 REAL(kind=
dp) :: temp_potentiostat = 0.0_dp
62 REAL(kind=
dp) :: thermostat_energy = 0.0_dp
63 REAL(kind=
dp) :: current_workfunction = 0.0_dp
64 REAL(kind=
dp) :: current_fermi_level_ev = 0.0_dp
65 INTEGER :: potential_average_axis = 3
66 INTEGER :: cpcont_unit = -1
67 REAL(kind=
dp) :: potential_average_min = 0.0_dp
68 REAL(kind=
dp) :: potential_average_max = 0.0_dp
69 INTEGER :: charge_mixing_span = 1
70 INTEGER :: charge_mixing_current_n_lo = -huge(0)
71 INTEGER :: charge_mixing_current_n_hi = -huge(0)
72 LOGICAL :: charge_mixing_enabled = .false.
105 target_workfunction, tau_potentiostat, temp_potentiostat, &
106 potential_average_axis, potential_average_min, potential_average_max, &
107 charge_mixing_span, target_fermi_level, control_fermi, &
108 lambda_fixed, lambda_is_fixed, charge_mixing_inplace, &
111 REAL(kind=
dp),
INTENT(IN) :: q_init, p_init, mass, neutral_electrons, &
112 target_workfunction, tau_potentiostat, &
114 INTEGER,
INTENT(IN) :: potential_average_axis
115 REAL(kind=
dp),
INTENT(IN) :: potential_average_min, &
116 potential_average_max
117 INTEGER,
INTENT(IN),
OPTIONAL :: charge_mixing_span
118 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: target_fermi_level
119 LOGICAL,
INTENT(IN),
OPTIONAL :: control_fermi
120 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: lambda_fixed
121 LOGICAL,
INTENT(IN),
OPTIONAL :: lambda_is_fixed, charge_mixing_inplace, &
124 cpassert(.NOT.
ASSOCIATED(electrons))
128 electrons%mass = mass
129 electrons%neutral_electrons = neutral_electrons
130 electrons%target_workfunction = target_workfunction
131 IF (
PRESENT(target_fermi_level)) electrons%target_fermi_level = target_fermi_level
132 IF (
PRESENT(control_fermi)) electrons%control_fermi = control_fermi
133 IF (
PRESENT(lambda_fixed)) electrons%lambda_fixed = lambda_fixed
134 IF (
PRESENT(lambda_is_fixed)) electrons%lambda_is_fixed = lambda_is_fixed
135 IF (
PRESENT(charge_mixing_inplace)) electrons%charge_mixing_inplace = charge_mixing_inplace
136 IF (
PRESENT(report_only)) electrons%report_only = report_only
137 electrons%tau_potentiostat = tau_potentiostat
138 electrons%temp_potentiostat = temp_potentiostat
139 electrons%thermostat_energy = 0.0_dp
140 electrons%potential_average_axis = potential_average_axis
141 electrons%potential_average_min = potential_average_min
142 electrons%potential_average_max = potential_average_max
154 name=
"Wiener process for e-potentiostat", &
156 extended_precision=.true., &
159 IF (
PRESENT(charge_mixing_span))
THEN
160 electrons%charge_mixing_span = charge_mixing_span
161 electrons%charge_mixing_enabled = .true.
subroutine, public qs_electrons_init(electrons, q_init, p_init, mass, neutral_electrons, target_workfunction, tau_potentiostat, temp_potentiostat, potential_average_axis, potential_average_min, potential_average_max, charge_mixing_span, target_fermi_level, control_fermi, lambda_fixed, lambda_is_fixed, charge_mixing_inplace, report_only)
Initialize the electronic coordinate/potentiostat state for constant-potential MD.