Skip to content

Commit

Permalink
Modify the berry phase document. (deepmodeling#5293)
Browse files Browse the repository at this point in the history
  • Loading branch information
jingan-181 authored Oct 18, 2024
1 parent 545d2ec commit 1a11dac
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 8 deletions.
6 changes: 4 additions & 2 deletions docs/advanced/elec_properties/Berry_phase.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
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.
2 changes: 1 addition & 1 deletion examples/berryphase/lcao_PbTiO3/INPUT-nscf-a
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/berryphase/lcao_PbTiO3/INPUT-nscf-b
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/berryphase/lcao_PbTiO3/INPUT-nscf-c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/berryphase/pw_PbTiO3/INPUT-nscf-a
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/berryphase/pw_PbTiO3/INPUT-nscf-b
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/berryphase/pw_PbTiO3/INPUT-nscf-c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions source/module_io/read_input_item_postprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1a11dac

Please sign in to comment.