Skip to content

Commit 5a144d9

Browse files
committed
Merge branch 'get_wf' into develop
2 parents 3d64ed3 + 4c4552a commit 5a144d9

File tree

26 files changed

+250
-192
lines changed

26 files changed

+250
-192
lines changed

source/module_esolver/lcao_others.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,10 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
345345
else if (cal_type == "get_wf")
346346
{
347347
std::cout << FmtCore::format("\n * * * * * *\n << Start %s.\n", "getting wave function");
348-
IState_Envelope wavefunc(this->pelec);
348+
Get_wf_lcao get_wf(this->pelec);
349349
if (PARAM.globalv.gamma_only_local)
350350
{
351-
wavefunc.begin(ucell,
351+
get_wf.begin(ucell,
352352
this->psi,
353353
this->pw_rhod,
354354
this->pw_wfc,
@@ -370,7 +370,7 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
370370
}
371371
else
372372
{
373-
wavefunc.begin(ucell,
373+
get_wf.begin(ucell,
374374
this->psi,
375375
this->pw_rhod,
376376
this->pw_wfc,

source/module_io/get_wf_lcao.cpp

Lines changed: 97 additions & 75 deletions
Large diffs are not rendered by default.

source/module_io/get_wf_lcao.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef ISTATE_ENVELOPE_H
2-
#define ISTATE_ENVELOPE_H
1+
#ifndef GET_WF_LCAO_H
2+
#define GET_WF_LCAO_H
33
#include "module_basis/module_ao/parallel_orbitals.h"
44
#include "module_basis/module_pw/pw_basis_k.h"
55
#include "module_cell/klist.h"
@@ -10,11 +10,11 @@
1010
#include "module_psi/psi.h"
1111

1212
#include <stdexcept>
13-
class IState_Envelope
13+
class Get_wf_lcao
1414
{
1515
public:
16-
IState_Envelope(const elecstate::ElecState* pes);
17-
~IState_Envelope();
16+
Get_wf_lcao(const elecstate::ElecState* pes);
17+
~Get_wf_lcao();
1818

1919
/// For gamma_only
2020
void begin(const UnitCell& ucell,
@@ -107,6 +107,9 @@ class IState_Envelope
107107
};
108108

109109
private:
110+
111+
void prepare_get_wf(std::ofstream &ofs_running, const int nelec, int& fermi_band);
112+
110113
void select_bands(const int nbands_istate,
111114
const std::vector<int>& out_wfc_kb,
112115
const int nbands,
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
INPUT_PARAMETERS
2+
suffix autotest
3+
4+
#calculation scf
5+
#out_wfc_lcao 1
6+
7+
calculation get_wf
8+
symmetry 0
9+
nbands 4
10+
nspin 2
11+
stru_file STRU
12+
kpoint_file KPT
13+
pseudo_dir ../../PP_ORB
14+
orbital_dir ../../PP_ORB
15+
latname sc
16+
ecutwfc 25.0
17+
basis_type lcao
18+
scf_thr 1e-10
19+
read_file_dir ./
20+
21+
bx 2
22+
by 2
23+
bz 2
File renamed without changes.
File renamed without changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
1 (index of k points)
2+
0 0 0
3+
4 (number of bands)
4+
10 (number of orbitals)
5+
1 (band)
6+
-7.51325141e-01 (Ry)
7+
5.00000000e-01 (Occupations)
8+
-5.37247453e-01 0.00000000e+00 -3.61676512e-02 0.00000000e+00 -1.54181375e-02 0.00000000e+00 -9.27979655e-17 0.00000000e+00 -1.39891449e-17 0.00000000e+00
9+
-5.37247453e-01 0.00000000e+00 -3.61676512e-02 0.00000000e+00 1.54181375e-02 0.00000000e+00 2.54298206e-16 0.00000000e+00 1.81464533e-18 0.00000000e+00
10+
2 (band)
11+
4.36965965e-01 (Ry)
12+
0.00000000e+00 (Occupations)
13+
-1.75242648e+00 0.00000000e+00 4.89257413e-01 0.00000000e+00 -1.47268290e-02 0.00000000e+00 1.01726396e-15 0.00000000e+00 1.07895593e-16 0.00000000e+00
14+
1.75242648e+00 0.00000000e+00 -4.89257413e-01 0.00000000e+00 -1.47268290e-02 0.00000000e+00 -1.46102799e-15 0.00000000e+00 -5.47368185e-17 0.00000000e+00
15+
3 (band)
16+
7.56866983e-01 (Ry)
17+
0.00000000e+00 (Occupations)
18+
-3.66278998e-02 0.00000000e+00 -5.58494840e-01 0.00000000e+00 -2.64150632e-02 0.00000000e+00 4.34614755e-16 0.00000000e+00 2.92440902e-16 0.00000000e+00
19+
-3.66278998e-02 0.00000000e+00 -5.58494840e-01 0.00000000e+00 2.64150632e-02 0.00000000e+00 -4.47082736e-17 0.00000000e+00 1.25127501e-16 0.00000000e+00
20+
4 (band)
21+
1.96467115e+00 (Ry)
22+
0.00000000e+00 (Occupations)
23+
1.26621401e+00 0.00000000e+00 -9.09975463e-01 0.00000000e+00 6.18536795e-01 0.00000000e+00 -1.00843249e-15 0.00000000e+00 -5.04064978e-17 0.00000000e+00
24+
-1.26621401e+00 0.00000000e+00 9.09975463e-01 0.00000000e+00 6.18536795e-01 0.00000000e+00 1.15018663e-15 0.00000000e+00 1.72311373e-16 0.00000000e+00
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2 (index of k points)
2+
0.5 0 0
3+
4 (number of bands)
4+
10 (number of orbitals)
5+
1 (band)
6+
-7.50585916e-01 (Ry)
7+
5.00000000e-01 (Occupations)
8+
-5.37487238e-01 5.05781764e-33 -3.74221968e-02 3.77381751e-34 -1.53316097e-02 5.38384630e-33 -8.67933060e-17 1.92130429e-18 -1.25390046e-17 1.76234878e-33
9+
-5.37487238e-01 -1.03201544e-32 -3.74221968e-02 -1.54082613e-33 1.53316097e-02 4.11903470e-33 2.46028787e-16 3.16479002e-18 2.15534356e-18 1.82922083e-33
10+
2 (band)
11+
4.41930801e-01 (Ry)
12+
0.00000000e+00 (Occupations)
13+
-1.74401014e+00 3.05105466e-32 4.84524188e-01 5.84759402e-32 -8.13241541e-03 3.01592714e-32 1.12073822e-15 -5.47638575e-19 5.66182463e-17 6.04833703e-32
14+
1.74401014e+00 -2.25356989e-32 -4.84524188e-01 1.11774346e-32 -8.13241541e-03 2.38228105e-32 -1.37788616e-15 6.28592524e-19 -6.97506100e-17 4.22331490e-32
15+
3 (band)
16+
7.91841961e-01 (Ry)
17+
0.00000000e+00 (Occupations)
18+
-3.37586596e-02 7.16441059e-32 -5.61663517e-01 6.13782996e-32 -2.86668141e-02 3.28850921e-31 -1.21182629e-16 -1.99831926e-16 -3.51107529e-18 8.64232211e-31
19+
-3.37586596e-02 -1.65683043e-31 -5.61663517e-01 -4.20256005e-31 2.86668141e-02 1.11355041e-31 -3.40224221e-16 1.84099826e-17 4.19485823e-17 6.34165594e-31
20+
4 (band)
21+
2.03015341e+00 (Ry)
22+
0.00000000e+00 (Occupations)
23+
1.29894913e+00 -2.66180716e-30 -9.41645046e-01 3.03895524e-30 6.11115241e-01 -3.38752325e-31 3.18238411e-15 -2.81804799e-16 -1.29275589e-16 -2.70194291e-30
24+
-1.29894913e+00 2.31883836e-30 9.41645046e-01 -8.45316942e-31 6.11115241e-01 -1.40110471e-30 5.97831422e-15 5.59036615e-17 1.75670501e-16 -2.22425734e-30
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
3 (index of k points)
2+
0 0 0
3+
4 (number of bands)
4+
10 (number of orbitals)
5+
1 (band)
6+
-7.51325141e-01 (Ry)
7+
5.00000000e-01 (Occupations)
8+
-5.37247453e-01 0.00000000e+00 -3.61676512e-02 0.00000000e+00 -1.54181375e-02 0.00000000e+00 -1.15124593e-16 0.00000000e+00 3.79711771e-18 0.00000000e+00
9+
-5.37247453e-01 0.00000000e+00 -3.61676512e-02 0.00000000e+00 1.54181375e-02 0.00000000e+00 -5.16215703e-17 0.00000000e+00 -3.91086987e-17 0.00000000e+00
10+
2 (band)
11+
4.36965965e-01 (Ry)
12+
0.00000000e+00 (Occupations)
13+
-1.75242648e+00 0.00000000e+00 4.89257413e-01 0.00000000e+00 -1.47268290e-02 0.00000000e+00 -1.74777432e-16 0.00000000e+00 4.40331808e-17 0.00000000e+00
14+
1.75242648e+00 0.00000000e+00 -4.89257413e-01 0.00000000e+00 -1.47268290e-02 0.00000000e+00 4.77612332e-16 0.00000000e+00 4.58834870e-17 0.00000000e+00
15+
3 (band)
16+
7.56866983e-01 (Ry)
17+
0.00000000e+00 (Occupations)
18+
-3.66278998e-02 0.00000000e+00 -5.58494840e-01 0.00000000e+00 -2.64150632e-02 0.00000000e+00 -9.16920770e-16 0.00000000e+00 5.39575981e-16 0.00000000e+00
19+
-3.66278998e-02 0.00000000e+00 -5.58494840e-01 0.00000000e+00 2.64150632e-02 0.00000000e+00 -3.43628488e-16 0.00000000e+00 -1.76088507e-16 0.00000000e+00
20+
4 (band)
21+
1.96467115e+00 (Ry)
22+
0.00000000e+00 (Occupations)
23+
1.26621401e+00 0.00000000e+00 -9.09975463e-01 0.00000000e+00 6.18536795e-01 0.00000000e+00 -1.84507816e-16 0.00000000e+00 3.90037830e-16 0.00000000e+00
24+
-1.26621401e+00 0.00000000e+00 9.09975463e-01 0.00000000e+00 6.18536795e-01 0.00000000e+00 3.27448565e-16 0.00000000e+00 -2.50630162e-16 0.00000000e+00
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
4 (index of k points)
2+
0.5 0 0
3+
4 (number of bands)
4+
10 (number of orbitals)
5+
1 (band)
6+
-7.50585916e-01 (Ry)
7+
5.00000000e-01 (Occupations)
8+
-5.37487238e-01 9.12474831e-33 -3.74221968e-02 -7.07722422e-33 -1.53316097e-02 -2.70363717e-33 -1.13313111e-16 1.89940337e-18 4.03489393e-18 1.08316868e-34
9+
-5.37487238e-01 -2.78106354e-33 -3.74221968e-02 8.84577359e-33 1.53316097e-02 1.16303346e-33 -5.02652827e-17 3.14288910e-18 -3.90341293e-17 7.08680799e-34
10+
2 (band)
11+
4.41930801e-01 (Ry)
12+
0.00000000e+00 (Occupations)
13+
-1.74401014e+00 -4.39474061e-32 4.84524188e-01 -5.70332290e-32 -8.13241541e-03 -2.37510553e-32 -2.09138561e-16 -8.77960587e-19 5.50892923e-17 -3.18164793e-33
14+
1.74401014e+00 3.57043711e-32 -4.84524188e-01 -4.14453183e-32 -8.13241541e-03 -5.72071820e-33 4.55727273e-16 2.98270512e-19 4.91117515e-17 -1.28239050e-33
15+
3 (band)
16+
7.91841961e-01 (Ry)
17+
0.00000000e+00 (Occupations)
18+
-3.37586596e-02 -1.73803127e-32 -5.61663517e-01 -4.62830134e-31 -2.86668141e-02 -2.12952468e-31 -8.98361015e-16 -2.06337431e-16 5.26090671e-16 -1.36889712e-31
19+
-3.37586596e-02 1.37322218e-31 -5.61663517e-01 1.70759788e-31 2.86668141e-02 9.24468807e-33 -5.21378872e-16 1.19044780e-17 -1.43727548e-16 -2.10194608e-32
20+
4 (band)
21+
2.03015341e+00 (Ry)
22+
0.00000000e+00 (Occupations)
23+
1.29894913e+00 3.10874995e-31 -9.41645046e-01 -3.88515488e-31 6.11115241e-01 -1.09667141e-31 -1.72852931e-16 -2.56340769e-16 4.20244960e-16 -6.16219285e-32
24+
-1.29894913e+00 -2.52535614e-31 9.41645046e-01 5.43068259e-31 6.11115241e-01 -1.44778647e-32 2.59373161e-16 8.13676921e-17 -2.54197051e-16 4.06073096e-32

0 commit comments

Comments
 (0)