![]() |
(git:27c966b)
|
Ne-electrode core-charge correction for constant-potential MD: adjusts the Ne pseudopotential core charge to follow the fluctuating total electron number. More...
Functions/Subroutines | |
| subroutine, public | apply_ne_core_correction (force_env, target_nelect, neutral_electrons_ref) |
| Apply Ne core correction update from the current total electron number. | |
Ne-electrode core-charge correction for constant-potential MD: adjusts the Ne pseudopotential core charge to follow the fluctuating total electron number.
| subroutine, public qs_electrons_ne_electrode::apply_ne_core_correction | ( | type(force_env_type), pointer | force_env, |
| real(kind=dp), intent(in) | target_nelect, | ||
| real(kind=dp), intent(in) | neutral_electrons_ref ) |
Apply Ne core correction update from the current total electron number.
It is called directly on force_env once per MD step, right after qs_electrons_drift updates electronsq, and before the SCF call, since it changes the Ne pseudopotential and must be in effect for the SCF that immediately follows.
Receives the target total electron number and converts it to a per-Ne core correction using core_corr_ne = (target_nelect - neutral_electrons_ref)/N_ne. It applies the resulting value to all Ne atomic kinds in the QS subsystem by updating the underlying all-electron or GTH/SGP potential zeff_correction field. This effectively corresponds to adjusting the CORE_CORRECTION keyword for Ne.
The implementation traverses the QS environment, obtains the atomic kind and QS kind arrays, and for each kind whose element symbol is 'Ne' it updates zeff_correction := core_corr_ne and keeps the associated effective charge parameters consistent with a statically parsed CORE_CORRECTION input. The resulting change is reflected in the subsequent charge and electron counts through the existing zeff_correction usage in QS routines.
| force_env | ... |
| target_nelect | ... |
| neutral_electrons_ref | ... |
Definition at line 67 of file qs_electrons_ne_electrode.F.