Skip to content

Commit 3137f62

Browse files
authored
added DeePKS+SOC example (#1866)
1 parent 1d4ccf8 commit 3137f62

File tree

13 files changed

+17614
-2
lines changed

13 files changed

+17614
-2
lines changed

examples/deepks/README

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/
55
/*******************************************************************************/
66

7-
Here are two examples:
7+
Here are three examples:
88

99
1. Generate projectors (a series of bessel functions) for DeePKS. \
1010
A file named `jle.orb` will be generated which contains the projectors.
@@ -16,3 +16,7 @@ be generated which are for DeePKS training only. The total energy and \
1616
force will be output in a way as a normal SCF job does.
1717

1818
- see lcao_H2O
19+
20+
3. A scf calculation with a trained DeePKS model loaded and with SOC effect taken into account. The total energy and bands will be output in a way as a normal SCF+SOC job does.
21+
22+
- see lcao_CsPbI3

examples/deepks/lcao_CsPbI3/INPUT

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
INPUT_PARAMETERS
2+
#Parameters (1.General)
3+
suffix abacus
4+
pseudo_dir ../../../tests/PP_ORB
5+
orbital_dir ../../../tests/PP_ORB
6+
calculation scf
7+
symmetry 0
8+
9+
#Parameters (2.Iteration)
10+
ecutwfc 100
11+
scf_thr 1e-7
12+
scf_nmax 50
13+
14+
#Parameters (3.Basis)
15+
basis_type lcao
16+
kspacing 0.1
17+
18+
#Parameters (4.Smearing)
19+
smearing_method gaussian
20+
smearing_sigma 0.0015
21+
22+
#Parameters (5.Mixing)
23+
mixing_type pulay
24+
mixing_beta 0.4
25+
26+
#Parameters (6.Deepks)
27+
deepks_scf 1
28+
deepks_model model.ptg
29+
30+
#Parameters (7.SOC)
31+
lspinorb 1
32+

examples/deepks/lcao_CsPbI3/STRU

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
ATOMIC_SPECIES
2+
Cs 1 Cs_ONCV_PBE_FR-1.0.upf upf201
3+
Pb 1 Pb_ONCV_PBE_FR-1.0.upf upf201
4+
I 1 I_ONCV_PBE_FR-1.1.upf upf201
5+
6+
NUMERICAL_ORBITAL
7+
Cs_gga_10au_100Ry_4s2p1d.orb
8+
Pb_gga_7au_100Ry_2s2p2d1f.orb
9+
I_gga_7au_100Ry_2s2p2d1f.orb
10+
11+
LATTICE_CONSTANT
12+
1.88972613
13+
14+
LATTICE_VECTORS
15+
6.29158773173 -5.96139346257e-13 5.44227741356e-14 #latvec1
16+
-5.9613934637e-13 6.29158773173 3.04139407466e-15 #latvec2
17+
5.44227867363e-14 3.04121878165e-15 6.29158773173 #latvec3
18+
19+
ATOMIC_POSITIONS
20+
Direct
21+
22+
Cs #label
23+
0 #magnetism
24+
1 #number of atoms
25+
0.5 0.5 0.5
26+
27+
Pb #label
28+
0 #magnetism
29+
1 #number of atoms
30+
1 1 1
31+
32+
I #label
33+
0 #magnetism
34+
3 #number of atoms
35+
8.33458276035e-15 1.4825841766e-15 0.5
36+
9.23733447273e-15 0.5 1.84769927088e-14
37+
0.5 1 1
38+
39+
NUMERICAL_DESCRIPTOR
40+
jle.orb
41+

examples/deepks/lcao_CsPbI3/jle.orb

Lines changed: 5817 additions & 0 deletions
Large diffs are not rendered by default.
288 KB
Binary file not shown.

examples/deepks/lcao_CsPbI3/run.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
ABACUS_PATH=$(awk -F "=" '$1=="ABACUS_PATH"{print $2}' ../../SETENV)
4+
ABACUS_NPROCS=$(awk -F "=" '$1=="ABACUS_NPROCS"{print $2}' ../../SETENV)
5+
ABACUS_THREADS=$(awk -F "=" '$1=="ABACUS_THREADS"{print $2}' ../../SETENV)
6+
7+
OMP_NUM_THREADS=${ABACUS_THREADS} mpirun -np ${ABACUS_NPROCS} ${ABACUS_PATH} | tee scf.output

source/module_hamilt_lcao/module_deepks/LCAO_deepks_io.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ void LCAO_Deepks::save_npy_o(const ModuleBase::matrix &bandgap, const std::strin
201201
}
202202
}
203203

204-
npy::SaveArrayAsNumpy(o_file, false, 1, oshape, npy_o);
204+
npy::SaveArrayAsNumpy(o_file, false, 2, oshape, npy_o);
205205
return;
206206
}
207207

tests/PP_ORB/Cs_ONCV_PBE_FR-1.0.upf

Lines changed: 2245 additions & 0 deletions
Large diffs are not rendered by default.

tests/PP_ORB/Cs_gga_10au_100Ry_4s2p1d.orb

Lines changed: 1784 additions & 0 deletions
Large diffs are not rendered by default.

tests/PP_ORB/I_ONCV_PBE_FR-1.1.upf

Lines changed: 2244 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)