Skip to content

Commit 1a11dac

Browse files
authored
Modify the berry phase document. (#5293)
1 parent 545d2ec commit 1a11dac

File tree

8 files changed

+14
-8
lines changed

8 files changed

+14
-8
lines changed

docs/advanced/elec_properties/Berry_phase.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pseudo_dir ../../../tests/PP_ORB //the path to locate the pesudopotential
2323
orbital_dir ../../../tests/PP_ORB //the path to locate the numerical orbital files
2424
ntype 3
2525
ecutwfc 50 // Ry
26-
symmetry 0 // turn off symmetry
26+
symmetry -1 // turn off symmetry
2727
calculation nscf // non-self-consistent calculation
2828
basis_type lcao // atomic basis
2929
init_chg file // read charge from files
@@ -70,4 +70,6 @@ The results are shown as follows:
7070
P = 0.8906925 (mod 2.1748536) ( 0.0000000, 0.0000000, 0.8906925) C/m^2
7171
```
7272

73-
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.
73+
The electric polarization **P** is multivalued, which modulo a quantum e**R**/V~cell~.
74+
75+
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.

examples/berryphase/lcao_PbTiO3/INPUT-nscf-a

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pseudo_dir ../../../tests/PP_ORB
33
orbital_dir ../../../tests/PP_ORB
44
ntype 3
55
ecutwfc 50
6-
symmetry 0
6+
symmetry -1
77
calculation nscf
88
basis_type lcao
99
init_chg file

examples/berryphase/lcao_PbTiO3/INPUT-nscf-b

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pseudo_dir ../../../tests/PP_ORB
33
orbital_dir ../../../tests/PP_ORB
44
ntype 3
55
ecutwfc 50
6-
symmetry 0
6+
symmetry -1
77
calculation nscf
88
basis_type lcao
99
init_chg file

examples/berryphase/lcao_PbTiO3/INPUT-nscf-c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pseudo_dir ../../../tests/PP_ORB
33
orbital_dir ../../../tests/PP_ORB
44
ntype 3
55
ecutwfc 50
6-
symmetry 0
6+
symmetry -1
77
calculation nscf
88
basis_type lcao
99
init_chg file

examples/berryphase/pw_PbTiO3/INPUT-nscf-a

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ INPUT_PARAMETERS
22
pseudo_dir ../../../tests/PP_ORB
33
ntype 3
44
ecutwfc 50
5-
symmetry 0
5+
symmetry -1
66
pw_diag_thr 1e-10
77
calculation nscf
88
basis_type pw

examples/berryphase/pw_PbTiO3/INPUT-nscf-b

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ INPUT_PARAMETERS
22
pseudo_dir ../../../tests/PP_ORB
33
ntype 3
44
ecutwfc 50
5-
symmetry 0
5+
symmetry -1
66
pw_diag_thr 1e-10
77
calculation nscf
88
basis_type pw

examples/berryphase/pw_PbTiO3/INPUT-nscf-c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ INPUT_PARAMETERS
22
pseudo_dir ../../../tests/PP_ORB
33
ntype 3
44
ecutwfc 50
5-
symmetry 0
5+
symmetry -1
66
pw_diag_thr 1e-10
77
calculation nscf
88
basis_type pw

source/module_io/read_input_item_postprocess.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ void ReadInput::item_postprocess()
130130
{
131131
ModuleBase::WARNING_QUIT("ReadInput", "calculate berry phase, please set gdir = 1 or 2 or 3");
132132
}
133+
if (para.input.symmetry != "-1")
134+
{
135+
ModuleBase::WARNING_QUIT("ReadInput", "calculate berry phase, please set symmetry = -1");
136+
}
133137
}
134138
};
135139
this->add_item(item);

0 commit comments

Comments
 (0)