FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
abacus-develop/source/source_estate/elecstate.cpp at develop · deepmodeling/abacus-develop · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
deepmodeling
/
abacus-develop
Public
forked from
abacusmodeling/abacus-develop
Notifications
You must be signed in to change notification settings
Fork
244
Star
286
Code
Issues
258
Pull requests
18
Discussions
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
abacus-develop
/
source
/
source_estate
/
elecstate.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
43 lines (35 loc) · 1.08 KB
Breadcrumbs
abacus-develop
/
source
/
source_estate
/
elecstate.cpp
Copy path
File metadata and controls
43 lines (35 loc) · 1.08 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#
include
"
elecstate.h
"
#
include
"
source_io/module_parameter/parameter.h
"
#
include
"
source_base/parallel_reduce.h
"
#
include
"
source_base/tool_title.h
"
#
include
"
occupy.h
"
namespace
elecstate
{
const
double
*
ElecState::getRho
(
int
spin)
const
{
return
&(
this
->
charge
->
rho
[spin][
0
]);
}
void
ElecState::init_nelec_spin
()
{
this
->
nelec_spin
.
resize
(
PARAM
.
inp
.
nspin
);
if
(
PARAM
.
inp
.
nspin
==
2
)
{
this
->
nelec_spin
[
0
] = (
PARAM
.
inp
.
nelec
+
PARAM
.
inp
.
nupdown
) /
2.0
;
this
->
nelec_spin
[
1
] = (
PARAM
.
inp
.
nelec
-
PARAM
.
inp
.
nupdown
) /
2.0
;
}
}
void
ElecState::init_ks
(Charge* chr_in,
//
pointer for class Charge
const
K_Vectors* klist_in,
int
nk_in,
const
ModulePW::PW_Basis_Big* bigpw_in)
{
this
->
charge
= chr_in;
this
->
klist
= klist_in;
this
->
bigpw
= bigpw_in;
//
init nelec_spin with nelec and nupdown
this
->
init_nelec_spin
();
//
initialize ekb and wg
this
->
ekb
.
create
(nk_in,
PARAM
.
globalv
.
nbands_l
);
this
->
wg
.
create
(nk_in,
PARAM
.
globalv
.
nbands_l
);
}
}
//
namespace elecstate
Back
|
FazBrowse Home
|
New Git URL