diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index 4e7c4d4a9a..642c297901 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -1625,16 +1625,15 @@ These variables are used to control the output of properties. - **Type**: Integer - **Description**: - 1: Output the **total local potential** (i.e., local pseudopotential + Hartree potential + XC potential + external electric field (if exists) + dipole correction potential (if exists) + ...) on real space grids (in Ry) into files in the folder `OUT.${suffix}`. The files are named as: - - nspin = 1: SPIN1_POT.cube; - - nspin = 2: SPIN1_POT.cube, and SPIN2_POT.cube; - - nspin = 4: SPIN1_POT.cube, SPIN2_POT.cube, SPIN3_POT.cube, and SPIN4_POT.cube. - - 2: Output the **electrostatic potential** on real space grids into `OUT.${suffix}/ElecStaticPot.cube`. The Python script named `tools/average_pot/aveElecStatPot.py` can be used to calculate the average electrostatic potential along the z-axis and outputs it into ElecStaticPot_AVE. - + - nspin = 1: `pots1.cube`; + - nspin = 2: `pots1.cube` and `pots2.cube`; + - nspin = 4: `pots1.cube`, `pots2.cube`, `pots3.cube`, and `pots4.cube` + - 2: Output the **electrostatic potential** on real space grids into `OUT.${suffix}/pot_es.cube`. The Python script named `tools/average_pot/aveElecStatPot.py` can be used to calculate the average electrostatic potential along the z-axis and outputs it into ElecStaticPot_AVE. Please note that the total local potential refers to the local component of the self-consistent potential, excluding the non-local pseudopotential. The distinction between the local potential and the electrostatic potential is as follows: local potential = electrostatic potential + XC potential. - 3: Apart from 1, also output the **total local potential** of the initial charge density. The files are named as: - - nspin = 1: SPIN1_POT_INI.cube; - - nspin = 2: SPIN1_POT_INI.cube, and SPIN2_POT_INI.cube; - - nspin = 4: SPIN1_POT_INI.cube, SPIN2_POT_INI.cube, SPIN3_POT_INI.cube, and SPIN4_POT_INI.cube. + - nspin = 1: `pots1_ini.cube`; + - nspin = 2: `pots1_ini.cube` and `pots2_ini.cube`; + - nspin = 4: `pots1_ini.cube`, `pots2_ini.cube`, `pots3_ini.cube`, and `pots4_ini.cube` In molecular dynamics calculations, the output frequency is controlled by [out_interval](#out_interval). - **Default**: 0 @@ -1656,7 +1655,7 @@ These variables are used to control the output of properties. - **Type**: Boolean - **Availability**: Numerical atomic orbital basis (multi-k points) -- **Description**: Whether to output the density matrix with Bravias lattice vector R, labelled as DM(R), into files in the folder `OUT.${suffix}`. The files are named as `dmr{s}{spin index}{g}{geometry index}{_nao} + {".csr"}`. Here, 's' refers to spin, where s1 means spin up channel while s2 means spin down channel, and the sparse matrix format 'csr' is mentioned in [out_mat_hs2](#out_mat_hs2). Finally, if [out_app_flag](#out_app_flag) is set to false, the file name contains the optinal 'g' index for each ionic step that may have different geometries, and if [out_app_flag](#out_app_flag) is set to true, the density matrix with respect to Bravias lattice vector R accumulates during ionic steps: +- **Description**: Whether to output the density matrix with Bravias lattice vector R index into files in the folder `OUT.${suffix}`. The files are named as `dmr{s}{spin index}{g}{geometry index}{_nao} + {".csr"}`. Here, 's' refers to spin, where s1 means spin up channel while s2 means spin down channel, and the sparse matrix format 'csr' is mentioned in [out_mat_hs2](#out_mat_hs2). Finally, if [out_app_flag](#out_app_flag) is set to false, the file name contains the optinal 'g' index for each ionic step that may have different geometries, and if [out_app_flag](#out_app_flag) is set to true, the density matrix with respect to Bravias lattice vector R accumulates during ionic steps: - nspin = 1: `dmrs1_nao.csr`; - nspin = 2: `dmrs1_nao.csr` and `dmrs2_nao.csr` for the two spin channels. - **Default**: False diff --git a/source/module_esolver/esolver_fp.cpp b/source/module_esolver/esolver_fp.cpp index 6cbf9f3cfd..95d0d11081 100644 --- a/source/module_esolver/esolver_fp.cpp +++ b/source/module_esolver/esolver_fp.cpp @@ -196,7 +196,7 @@ void ESolver_FP::after_scf(UnitCell& ucell, const int istep, const bool conv_eso { for (int is = 0; is < PARAM.inp.nspin; is++) { - std::string fn =PARAM.globalv.global_out_dir + "/SPIN" + std::to_string(is + 1) + "_POT.cube"; + std::string fn =PARAM.globalv.global_out_dir + "/pots" + std::to_string(is + 1) + ".cube"; ModuleIO::write_vdata_palgrid(Pgrid, this->pelec->pot->get_effective_v(is), @@ -212,7 +212,7 @@ void ESolver_FP::after_scf(UnitCell& ucell, const int istep, const bool conv_eso } else if (PARAM.inp.out_pot == 2) { - std::string fn =PARAM.globalv.global_out_dir + "/ElecStaticPot.cube"; + std::string fn =PARAM.globalv.global_out_dir + "/pot_es.cube"; ModuleIO::write_elecstat_pot( #ifdef __MPI this->pw_big->bz, @@ -359,7 +359,7 @@ void ESolver_FP::before_scf(UnitCell& ucell, const int istep) for (int is = 0; is < PARAM.inp.nspin; is++) { std::stringstream ss; - ss << PARAM.globalv.global_out_dir << "SPIN" << is + 1 << "_POT_INI.cube"; + ss << PARAM.globalv.global_out_dir << "pots" << is + 1 << "_ini.cube"; ModuleIO::write_vdata_palgrid(this->Pgrid, this->pelec->pot->get_effective_v(is), is, diff --git a/tests/01_PW/087_PW_OP/refSPIN1_POT.cube b/tests/01_PW/087_PW_OP/pots1.cube.ref similarity index 100% rename from tests/01_PW/087_PW_OP/refSPIN1_POT.cube rename to tests/01_PW/087_PW_OP/pots1.cube.ref diff --git a/tests/01_PW/088_PW_OP_nscf/refSPIN1_POT.cube b/tests/01_PW/088_PW_OP_nscf/pots1.cube.ref similarity index 100% rename from tests/01_PW/088_PW_OP_nscf/refSPIN1_POT.cube rename to tests/01_PW/088_PW_OP_nscf/pots1.cube.ref diff --git a/tests/03_NAO_multik/01_NO_KP_15f_ODM/refElecStaticPot.cube b/tests/03_NAO_multik/01_NO_KP_15f_ODM/pot_es.cube.ref similarity index 100% rename from tests/03_NAO_multik/01_NO_KP_15f_ODM/refElecStaticPot.cube rename to tests/03_NAO_multik/01_NO_KP_15f_ODM/pot_es.cube.ref diff --git a/tests/03_NAO_multik/38_NO_OP/INPUT b/tests/03_NAO_multik/38_NO_OP3/INPUT similarity index 97% rename from tests/03_NAO_multik/38_NO_OP/INPUT rename to tests/03_NAO_multik/38_NO_OP3/INPUT index 4be2d520ed..e7502406b4 100644 --- a/tests/03_NAO_multik/38_NO_OP/INPUT +++ b/tests/03_NAO_multik/38_NO_OP3/INPUT @@ -7,7 +7,7 @@ nbands 6 symmetry 1 pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB -out_pot 1 +out_pot 3 #Parameters (2.Iteration) ecutwfc 5 diff --git a/tests/03_NAO_multik/38_NO_OP/KPT b/tests/03_NAO_multik/38_NO_OP3/KPT similarity index 100% rename from tests/03_NAO_multik/38_NO_OP/KPT rename to tests/03_NAO_multik/38_NO_OP3/KPT diff --git a/tests/03_NAO_multik/38_NO_OP/README b/tests/03_NAO_multik/38_NO_OP3/README similarity index 100% rename from tests/03_NAO_multik/38_NO_OP/README rename to tests/03_NAO_multik/38_NO_OP3/README diff --git a/tests/03_NAO_multik/38_NO_OP/STRU b/tests/03_NAO_multik/38_NO_OP3/STRU similarity index 100% rename from tests/03_NAO_multik/38_NO_OP/STRU rename to tests/03_NAO_multik/38_NO_OP3/STRU diff --git a/tests/03_NAO_multik/38_NO_OP/refSPIN1_POT.cube b/tests/03_NAO_multik/38_NO_OP3/pots1.cube.ref similarity index 100% rename from tests/03_NAO_multik/38_NO_OP/refSPIN1_POT.cube rename to tests/03_NAO_multik/38_NO_OP3/pots1.cube.ref diff --git a/tests/03_NAO_multik/38_NO_OP/result.ref b/tests/03_NAO_multik/38_NO_OP3/result.ref similarity index 100% rename from tests/03_NAO_multik/38_NO_OP/result.ref rename to tests/03_NAO_multik/38_NO_OP3/result.ref diff --git a/tests/03_NAO_multik/39_NO_OP_nscf/refSPIN1_POT.cube b/tests/03_NAO_multik/39_NO_OP_nscf/pots1.cube.ref similarity index 100% rename from tests/03_NAO_multik/39_NO_OP_nscf/refSPIN1_POT.cube rename to tests/03_NAO_multik/39_NO_OP_nscf/pots1.cube.ref diff --git a/tests/03_NAO_multik/CASES_CPU.txt b/tests/03_NAO_multik/CASES_CPU.txt index 926d27191a..d820ed8bab 100644 --- a/tests/03_NAO_multik/CASES_CPU.txt +++ b/tests/03_NAO_multik/CASES_CPU.txt @@ -35,7 +35,7 @@ 35_NO_KP_MU_nscf 36_NO_KP_sol_H2 37_NO_KP_restart -38_NO_OP +38_NO_OP3 39_NO_OP_nscf 40_NO_ELF 41_NO_KP_MSST diff --git a/tests/integrate/tools/catch_properties.sh b/tests/integrate/tools/catch_properties.sh index f3384da50a..705f118890 100755 --- a/tests/integrate/tools/catch_properties.sh +++ b/tests/integrate/tools/catch_properties.sh @@ -167,8 +167,8 @@ fi # echo $out_pot1 #------------------------------- if ! test -z "$out_pot" && [ $out_pot == 1 ]; then - pot1ref=refSPIN1_POT.cube - pot1cal=OUT.autotest/SPIN1_POT.cube + pot1ref=pots1.cube.ref + pot1cal=OUT.autotest/pots1.cube python3 $COMPARE_SCRIPT $pot1ref $pot1cal 3 echo "ComparePot1_pass $?" >>$1 fi @@ -177,8 +177,8 @@ fi #echo $out_pot2 #------------------------------- if ! test -z "$out_pot" && [ $out_pot == 2 ]; then - pot1ref=refElecStaticPot.cube - pot1cal=OUT.autotest/ElecStaticPot.cube + pot1ref=pot_es.cube.ref + pot1cal=OUT.autotest/pot_es.cube python3 $COMPARE_SCRIPT $pot1ref $pot1cal 8 echo "ComparePot_pass $?" >>$1 fi