Skip to content

Commit 6eb3d61

Browse files
committed
Test: Add two integrate tests for XWM KEDF
1 parent d6c5047 commit 6eb3d61

File tree

13 files changed

+120
-0
lines changed

13 files changed

+120
-0
lines changed

source/source_io/test/read_input_ptest.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,8 @@ TEST_F(InputParaTest, ParaRead)
365365
EXPECT_EQ(param.inp.of_full_pw_dim, 0);
366366
EXPECT_FALSE(param.inp.of_read_kernel);
367367
EXPECT_EQ(param.inp.of_kernel_file, "WTkernel.txt");
368+
EXPECT_DOUBLE_EQ(param.inp.of_xwm_kappa, 1.);
369+
EXPECT_DOUBLE_EQ(param.inp.of_xwm_rho_ref, 1.);
368370
EXPECT_EQ(param.inp.device, "cpu");
369371
EXPECT_NEAR(param.inp.force_thr_ev, 0.025711245953622324, 1e-8);
370372
EXPECT_DOUBLE_EQ(param.globalv.hubbard_u[0], 0);

source/source_io/test/support/INPUT

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,8 @@ of_full_pw 0 #If set to 1, ecut will be ignored when collect
369369
of_full_pw_dim 0 #If of_full_pw = true, dimention of FFT is testricted to be (0) either odd or even; (1) odd only; (2) even only
370370
of_read_kernel 0 #If set to 1, the kernel of WT KEDF will be filled from file of_kernel_file, not from formula. Only usable for WT KEDF
371371
of_kernel_file WTkernel.txt #The name of WT kernel file.
372+
of_xwm_kappa 1 #The parameter kappa of XWM KEDF
373+
of_xwm_rho_ref 1 #The reference density of XWM KEDF
372374

373375
#Parameters (20.dft+u)
374376
dft_plus_u 0 #true:DFT+U correction; false: standard DFT calcullation(default)

tests/07_OFDFT/28_OF_KE_XWM/INPUT

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
INPUT_PARAMETERS
2+
#Parameters (1.General)
3+
suffix autotest
4+
calculation scf
5+
esolver_type ofdft
6+
7+
symmetry 1
8+
pseudo_dir ../../PP_ORB/
9+
pseudo_rcut 16
10+
nspin 1
11+
cal_force 1
12+
test_force 1
13+
14+
#Parameters (2.Iteration)
15+
ecutwfc 20
16+
scf_nmax 50
17+
18+
#OFDFT
19+
of_kinetic xwm
20+
of_method tn
21+
of_conv energy
22+
of_tole 2e-6
23+
24+
#Parameters (3.Basis)
25+
basis_type pw
26+

tests/07_OFDFT/28_OF_KE_XWM/KPT

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
K_POINTS
2+
0
3+
Gamma
4+
1 1 1 0 0 0

tests/07_OFDFT/28_OF_KE_XWM/README

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Test the energy and force of Xu-Wang-Ma (XWM) kinetic energy functional (of_method = xwm) in OFDFT, symmetry=on

tests/07_OFDFT/28_OF_KE_XWM/STRU

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
ATOMIC_SPECIES
2+
Al 26.98 al.lda.lps blps
3+
4+
LATTICE_CONSTANT
5+
7.50241114482312 // add lattice constant
6+
7+
LATTICE_VECTORS
8+
0.000000000000 0.500000000000 0.500000000000
9+
0.500000000000 0.000000000000 0.500000000000
10+
0.500000000000 0.500000000000 0.000000000000
11+
12+
ATOMIC_POSITIONS
13+
Direct
14+
15+
Al
16+
0
17+
1
18+
0.000000000000 0.000000000000 0.000000000000 1 1 1
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
etotref -57.9560215466872037
2+
etotperatomref -57.9560215467
3+
totalforceref 0.000000
4+
pointgroupref O_h
5+
spacegroupref O_h
6+
nksibzref 1
7+
totaltimeref 0.37
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
INPUT_PARAMETERS
2+
#Parameters (1.General)
3+
suffix autotest
4+
calculation scf
5+
esolver_type ofdft
6+
7+
symmetry 1
8+
pseudo_dir ../../PP_ORB/
9+
pseudo_rcut 16
10+
nspin 1
11+
cal_force 1
12+
test_force 1
13+
14+
#Parameters (2.Iteration)
15+
ecutwfc 20
16+
scf_nmax 50
17+
18+
#OFDFT
19+
of_kinetic xwm
20+
of_xwm_rho_ref 0.01
21+
of_xwm_kappa 0.1
22+
of_method tn
23+
of_conv energy
24+
of_tole 2e-6
25+
26+
#Parameters (3.Basis)
27+
basis_type pw
28+

tests/07_OFDFT/29_OF_XWM_para/KPT

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
K_POINTS
2+
0
3+
Gamma
4+
1 1 1 0 0 0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Test the energy and force of XWM, with of_xwm_rho_ref=0.01, of_xwm_kappa=0.1, symmetry=on

0 commit comments

Comments
 (0)