diff --git a/docs/advanced/elec_properties/Berry_phase.md b/docs/advanced/elec_properties/Berry_phase.md index 9dbe47ba90..7f85689a5f 100644 --- a/docs/advanced/elec_properties/Berry_phase.md +++ b/docs/advanced/elec_properties/Berry_phase.md @@ -23,7 +23,7 @@ pseudo_dir ../../../tests/PP_ORB //the path to locate the pesudopotential orbital_dir ../../../tests/PP_ORB //the path to locate the numerical orbital files ntype 3 ecutwfc 50 // Ry -symmetry 0 // turn off symmetry +symmetry -1 // turn off symmetry calculation nscf // non-self-consistent calculation basis_type lcao // atomic basis init_chg file // read charge from files @@ -70,4 +70,6 @@ The results are shown as follows: P = 0.8906925 (mod 2.1748536) ( 0.0000000, 0.0000000, 0.8906925) C/m^2 ``` -The electric polarization **P** is multivalued, which modulo a quantum e**R**/V~cell~. Note: the values in parentheses are the components of the **P** along the c axis in the x, y, z Cartesian coordinates when set gdir = 3 in INPUT file. \ No newline at end of file +The electric polarization **P** is multivalued, which modulo a quantum e**R**/V~cell~. + +Note: The vectors R1, R2, and R3 refer to the three lattice vectors of the unit cell. When gdir=3, the calculated polarization is along the R3 direction. The three values in parentheses represent the re-projection of the polarization along the R3 direction onto the Cartesian coordinate system (i.e., the xyz coordinate system). To obtain the full polarization components in the Cartesian system, you need to calculate the polarization for R1, R2, and R3 separately, and then sum their respective x, y, and z components. diff --git a/examples/berryphase/lcao_PbTiO3/INPUT-nscf-a b/examples/berryphase/lcao_PbTiO3/INPUT-nscf-a index 4fe797dada..97520e857e 100644 --- a/examples/berryphase/lcao_PbTiO3/INPUT-nscf-a +++ b/examples/berryphase/lcao_PbTiO3/INPUT-nscf-a @@ -3,7 +3,7 @@ pseudo_dir ../../../tests/PP_ORB orbital_dir ../../../tests/PP_ORB ntype 3 ecutwfc 50 -symmetry 0 +symmetry -1 calculation nscf basis_type lcao init_chg file diff --git a/examples/berryphase/lcao_PbTiO3/INPUT-nscf-b b/examples/berryphase/lcao_PbTiO3/INPUT-nscf-b index 637b9aa533..22e02eddba 100644 --- a/examples/berryphase/lcao_PbTiO3/INPUT-nscf-b +++ b/examples/berryphase/lcao_PbTiO3/INPUT-nscf-b @@ -3,7 +3,7 @@ pseudo_dir ../../../tests/PP_ORB orbital_dir ../../../tests/PP_ORB ntype 3 ecutwfc 50 -symmetry 0 +symmetry -1 calculation nscf basis_type lcao init_chg file diff --git a/examples/berryphase/lcao_PbTiO3/INPUT-nscf-c b/examples/berryphase/lcao_PbTiO3/INPUT-nscf-c index 426b111e61..b2cdf5958e 100644 --- a/examples/berryphase/lcao_PbTiO3/INPUT-nscf-c +++ b/examples/berryphase/lcao_PbTiO3/INPUT-nscf-c @@ -3,7 +3,7 @@ pseudo_dir ../../../tests/PP_ORB orbital_dir ../../../tests/PP_ORB ntype 3 ecutwfc 50 -symmetry 0 +symmetry -1 calculation nscf basis_type lcao init_chg file diff --git a/examples/berryphase/pw_PbTiO3/INPUT-nscf-a b/examples/berryphase/pw_PbTiO3/INPUT-nscf-a index 23fc9549fc..c344e9ff15 100644 --- a/examples/berryphase/pw_PbTiO3/INPUT-nscf-a +++ b/examples/berryphase/pw_PbTiO3/INPUT-nscf-a @@ -2,7 +2,7 @@ INPUT_PARAMETERS pseudo_dir ../../../tests/PP_ORB ntype 3 ecutwfc 50 -symmetry 0 +symmetry -1 pw_diag_thr 1e-10 calculation nscf basis_type pw diff --git a/examples/berryphase/pw_PbTiO3/INPUT-nscf-b b/examples/berryphase/pw_PbTiO3/INPUT-nscf-b index a59e92149c..ef6c1984c7 100644 --- a/examples/berryphase/pw_PbTiO3/INPUT-nscf-b +++ b/examples/berryphase/pw_PbTiO3/INPUT-nscf-b @@ -2,7 +2,7 @@ INPUT_PARAMETERS pseudo_dir ../../../tests/PP_ORB ntype 3 ecutwfc 50 -symmetry 0 +symmetry -1 pw_diag_thr 1e-10 calculation nscf basis_type pw diff --git a/examples/berryphase/pw_PbTiO3/INPUT-nscf-c b/examples/berryphase/pw_PbTiO3/INPUT-nscf-c index fdc68d69a3..2242ff889e 100644 --- a/examples/berryphase/pw_PbTiO3/INPUT-nscf-c +++ b/examples/berryphase/pw_PbTiO3/INPUT-nscf-c @@ -2,7 +2,7 @@ INPUT_PARAMETERS pseudo_dir ../../../tests/PP_ORB ntype 3 ecutwfc 50 -symmetry 0 +symmetry -1 pw_diag_thr 1e-10 calculation nscf basis_type pw diff --git a/source/module_io/read_input_item_postprocess.cpp b/source/module_io/read_input_item_postprocess.cpp index 411214fe6c..1087e24d95 100644 --- a/source/module_io/read_input_item_postprocess.cpp +++ b/source/module_io/read_input_item_postprocess.cpp @@ -130,6 +130,10 @@ void ReadInput::item_postprocess() { ModuleBase::WARNING_QUIT("ReadInput", "calculate berry phase, please set gdir = 1 or 2 or 3"); } + if (para.input.symmetry != "-1") + { + ModuleBase::WARNING_QUIT("ReadInput", "calculate berry phase, please set symmetry = -1"); + } } }; this->add_item(item);