Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:abacusmodeling/abacus-develop in…
Browse files Browse the repository at this point in the history
…to develop
  • Loading branch information
dyzheng committed May 13, 2022
2 parents adf258d + 6a33b67 commit 03d90d6
Show file tree
Hide file tree
Showing 14 changed files with 1,267 additions and 371 deletions.
34 changes: 33 additions & 1 deletion docs/examples/band-struc.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pw_diag_thr 1.0e-7
#Parameters (File)
init_chg file
out_band 1
out_proj_band 1
#Parameters (Smearing)
smearing_method gaussian
Expand Down Expand Up @@ -58,4 +59,35 @@ points.
Run the program, and you will see a file named BANDS_1.dat in the output directory. Plot it
to get energy band structure.

[back to top](#band-structure)
If "out_proj_band" set 1, it will also produce the projected band structure in a file called PBAND_1 in xml format.

The PBAND_1 file starts with number of atomic orbitals in the system, the text contents of element <band structure> is the same as data in the BANDS_1.dat file, such as:
```
<pband>
<nspin>1</nspin>
<norbitals>153</norbitals>
<band_structure nkpoints="96" nbands="50" units="eV">
...
```

The rest of the files arranged in sections, each section with a header such as below:

```
<orbital
index=" 1"
atom_index=" 1"
species="Si"
l=" 0"
m=" 0"
z=" 1"
>
<data>
...
</data>
```

The shape of text contents of element <data> is (Number of k-points, Number of bands)

[back to top](#band-structure)
8 changes: 7 additions & 1 deletion docs/input-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

- [Variables related to output information](#variables-related-to-output-information)

[out_force](#out_force) | [out_mul](#out_mul) | [out_freq_elec](#out_freq_elec) | [out_freq_ion](#out_freq_ion) | [out_chg](#out_chg) | [out_pot](#out_pot) | [out_dm](#out-dm) | [out_wfc_pw](#out_wfc_pw) | [out_wfc_r](#out_wfc_r) | [out_wfc_lcao](#out_wfc_lcao) | [out_dos](#out-dos) | [out_band](#out-band) | [out_stru](#out-stru) | [out_level](#out_level) | [out_alllog](#out-alllog) | [out_mat_hs](#out_mat_hs) | [out_mat_r](#out_mat_r) | [out_mat_hs2](#out_mat_hs2) | [out_element_info](#out-element-info) | [restart_save](#restart_save) | [restart_load](#restart_load)
[out_force](#out_force) | [out_mul](#out_mul) | [out_freq_elec](#out_freq_elec) | [out_freq_ion](#out_freq_ion) | [out_chg](#out_chg) | [out_pot](#out_pot) | [out_dm](#out-dm) | [out_wfc_pw](#out_wfc_pw) | [out_wfc_r](#out_wfc_r) | [out_wfc_lcao](#out_wfc_lcao) | [out_dos](#out-dos) | [out_band](#out-band) | [out_proj_band](#out-proj-band) | [out_stru](#out-stru) | [out_level](#out_level) | [out_alllog](#out-alllog) | [out_mat_hs](#out_mat_hs) | [out_mat_r](#out_mat_r) | [out_mat_hs2](#out_mat_hs2) | [out_element_info](#out-element-info) | [restart_save](#restart_save) | [restart_load](#restart_load)

- [Density of states](#density-of-states)

Expand Down Expand Up @@ -735,6 +735,12 @@ This part of variables are used to control the output of properties.
- **Description**: Controls whether to output the band structure. For mroe information, refer to the [worked example](examples/band-struc.md)
- **Default**: 0
#### out_proj_band
- **Type**: Integer
- **Description**: Controls whether to output the projected band structure. For mroe information, refer to the [worked example](examples/band-struc.md)
- **Default**: 0
#### out_stru
- **Type**: Boolean
Expand Down
8 changes: 8 additions & 0 deletions source/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ void Input::Default(void)
out_wfc_r = 0;
out_dos = 0;
out_band = 0;
out_proj_band = 0;
out_mat_hs = 0;
out_mat_hs2 = 0; // LiuXh add 2019-07-15
out_mat_r = 0; // jingan add 2019-8-14
Expand Down Expand Up @@ -995,6 +996,10 @@ bool Input::Read(const std::string &fn)
{
read_value(ifs, out_band);
}
else if (strcmp("out_proj_band", word) == 0)
{
read_value(ifs, out_proj_band);
}

else if (strcmp("out_mat_hs", word) == 0)
{
Expand Down Expand Up @@ -1941,6 +1946,7 @@ void Input::Bcast()
Parallel_Common::bcast_int(out_wfc_r);
Parallel_Common::bcast_int(out_dos);
Parallel_Common::bcast_int(out_band);
Parallel_Common::bcast_int(out_proj_band);
Parallel_Common::bcast_int(out_mat_hs);
Parallel_Common::bcast_int(out_mat_hs2); // LiuXh add 2019-07-15
Parallel_Common::bcast_int(out_mat_r); // jingan add 2019-8-14
Expand Down Expand Up @@ -2227,6 +2233,7 @@ void Input::Check(void)
out_stru = 0;
out_dos = 0;
out_band = 0;
out_proj_band = 0;
cal_force = 0;
init_wfc = "file";
init_chg = "atomic"; // useless,
Expand All @@ -2248,6 +2255,7 @@ void Input::Check(void)
out_stru = 0;
out_dos = 0;
out_band = 0;
out_proj_band = 0;
cal_force = 0;
init_wfc = "file";
init_chg = "atomic";
Expand Down
1 change: 1 addition & 0 deletions source/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ class Input
int out_wfc_r; // 0: no; 1: yes
int out_dos; // dos calculation. mohan add 20090909
int out_band; // band calculation pengfei 2014-10-13
int out_proj_band; // projected band structure calculation jiyy add 2022-05-11
int out_mat_hs; // output H matrix and S matrix in local basis.
int out_mat_hs2; // LiuXh add 2019-07-16, output H(R) matrix and S(R) matrix in local basis.
int out_mat_r; // jingan add 2019-8-14, output r(R) matrix.
Expand Down
1 change: 1 addition & 0 deletions source/input_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ void Input_Conv::Convert(void)
GlobalC::wf.out_wfc_r = INPUT.out_wfc_r;
GlobalC::en.out_dos = INPUT.out_dos;
GlobalC::en.out_band = INPUT.out_band;
GlobalC::en.out_proj_band = INPUT.out_proj_band;
#ifdef __LCAO
Local_Orbital_Charge::out_dm = INPUT.out_dm;
Pdiag_Double::out_mat_hs = INPUT.out_mat_hs;
Expand Down
Loading

0 comments on commit 03d90d6

Please sign in to comment.