diff --git a/source/module_hamilt_pw/hamilt_pwdft/module_exx_helper/exx_helper.h b/source/module_hamilt_pw/hamilt_pwdft/module_exx_helper/exx_helper.h index 4464bdab0a..59b242d623 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/module_exx_helper/exx_helper.h +++ b/source/module_hamilt_pw/hamilt_pwdft/module_exx_helper/exx_helper.h @@ -16,7 +16,7 @@ struct Exx_Helper public: Exx_Helper() = default; - OperatorEXX *op_exx; + OperatorEXX *op_exx = nullptr; void set_firstiter() { first_iter = true; } void set_wg(const ModuleBase::matrix *wg_) { wg = wg_; } @@ -35,9 +35,8 @@ struct Exx_Helper private: bool first_iter; - psi::Psi *psi; - const ModuleBase::matrix *wg; - + psi::Psi *psi = nullptr; + const ModuleBase::matrix *wg = nullptr; }; #endif // EXX_HELPER_H diff --git a/tests/integrate/190_PW_PBE0/INPUT b/tests/integrate/190_PW_PBE0/INPUT new file mode 100644 index 0000000000..97adff25ef --- /dev/null +++ b/tests/integrate/190_PW_PBE0/INPUT @@ -0,0 +1,22 @@ +INPUT_PARAMETERS +#Parameters (System) +suffix autotest + +nbands 2 +stru_file STRU +kpoint_file KPT +pseudo_dir ../../PP_ORB +pw_seed 1 +calculation scf +#Parameters (PW) +ecutwfc 10.0 # Rydberg +#Parameters (electronic) +basis_type pw +scf_thr 1e-3 +smearing_method fixed + +cal_force 0 +cal_stress 1 + +dft_functional pbe0 +symmetry -1 diff --git a/tests/integrate/190_PW_PBE0/KPT b/tests/integrate/190_PW_PBE0/KPT new file mode 100644 index 0000000000..c289c0158a --- /dev/null +++ b/tests/integrate/190_PW_PBE0/KPT @@ -0,0 +1,4 @@ +K_POINTS +0 +Gamma +1 1 1 0 0 0 diff --git a/tests/integrate/190_PW_PBE0/STRU b/tests/integrate/190_PW_PBE0/STRU new file mode 100644 index 0000000000..c48d5b0745 --- /dev/null +++ b/tests/integrate/190_PW_PBE0/STRU @@ -0,0 +1,24 @@ +ATOMIC_SPECIES +H 1 H_ONCV_PBE-1.0.upf #Pseudopotentials are downloaded from http://www.quantum-simulation.org/potentials/sg15_oncv/upf/ + +NUMERICAL_ORBITAL +orb_Si.dat + +LATTICE_CONSTANT +1.889766 + +LATTICE_VECTORS +0.0 2.708337 2.708337 +2.708337 0.0 2.708337 +2.708337 2.708337 0.0 + + + +ATOMIC_POSITIONS +Direct + +H +0 +2 +0.125 0.125 0.125 0 0 0 +0.875 0.875 0.875 0 0 0 diff --git a/tests/integrate/190_PW_PBE0/jd b/tests/integrate/190_PW_PBE0/jd new file mode 100644 index 0000000000..d42d5ef29a --- /dev/null +++ b/tests/integrate/190_PW_PBE0/jd @@ -0,0 +1 @@ +hybrid functionals for pw basis. note that this calculation is not physically correct, only for testing purpose. diff --git a/tests/integrate/190_PW_PBE0/result.ref b/tests/integrate/190_PW_PBE0/result.ref new file mode 100644 index 0000000000..a5359e7124 --- /dev/null +++ b/tests/integrate/190_PW_PBE0/result.ref @@ -0,0 +1,4 @@ +etotref -30.5936375896797834 +etotperatomref -15.2968187948 +totalstressref 935.890087 +totaltimeref 12.91 diff --git a/tests/integrate/CASES_CPU.txt b/tests/integrate/CASES_CPU.txt index ab8cc70ddc..c8fd89af4e 100644 --- a/tests/integrate/CASES_CPU.txt +++ b/tests/integrate/CASES_CPU.txt @@ -136,6 +136,7 @@ 186_PW_SKG_10D10S 186_PW_SKG_ALL 186_PW_SNLKG_10D10S +190_PW_PBE0 201_NO_15_f_pseudopots 201_NO_15_pseudopots 201_NO_15_pseudopots_kpar