Skip to content

Commit

Permalink
added DeePKS+SOC example (#1866)
Browse files Browse the repository at this point in the history
  • Loading branch information
ouqi0711 authored Feb 8, 2023
1 parent 1d4ccf8 commit 3137f62
Show file tree
Hide file tree
Showing 13 changed files with 17,614 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/deepks/README
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/
/*******************************************************************************/

Here are two examples:
Here are three examples:

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

- see lcao_H2O

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.

- see lcao_CsPbI3
32 changes: 32 additions & 0 deletions examples/deepks/lcao_CsPbI3/INPUT
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
INPUT_PARAMETERS
#Parameters (1.General)
suffix abacus
pseudo_dir ../../../tests/PP_ORB
orbital_dir ../../../tests/PP_ORB
calculation scf
symmetry 0

#Parameters (2.Iteration)
ecutwfc 100
scf_thr 1e-7
scf_nmax 50

#Parameters (3.Basis)
basis_type lcao
kspacing 0.1

#Parameters (4.Smearing)
smearing_method gaussian
smearing_sigma 0.0015

#Parameters (5.Mixing)
mixing_type pulay
mixing_beta 0.4

#Parameters (6.Deepks)
deepks_scf 1
deepks_model model.ptg

#Parameters (7.SOC)
lspinorb 1

41 changes: 41 additions & 0 deletions examples/deepks/lcao_CsPbI3/STRU
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
ATOMIC_SPECIES
Cs 1 Cs_ONCV_PBE_FR-1.0.upf upf201
Pb 1 Pb_ONCV_PBE_FR-1.0.upf upf201
I 1 I_ONCV_PBE_FR-1.1.upf upf201

NUMERICAL_ORBITAL
Cs_gga_10au_100Ry_4s2p1d.orb
Pb_gga_7au_100Ry_2s2p2d1f.orb
I_gga_7au_100Ry_2s2p2d1f.orb

LATTICE_CONSTANT
1.88972613

LATTICE_VECTORS
6.29158773173 -5.96139346257e-13 5.44227741356e-14 #latvec1
-5.9613934637e-13 6.29158773173 3.04139407466e-15 #latvec2
5.44227867363e-14 3.04121878165e-15 6.29158773173 #latvec3

ATOMIC_POSITIONS
Direct

Cs #label
0 #magnetism
1 #number of atoms
0.5 0.5 0.5

Pb #label
0 #magnetism
1 #number of atoms
1 1 1

I #label
0 #magnetism
3 #number of atoms
8.33458276035e-15 1.4825841766e-15 0.5
9.23733447273e-15 0.5 1.84769927088e-14
0.5 1 1

NUMERICAL_DESCRIPTOR
jle.orb

5,817 changes: 5,817 additions & 0 deletions examples/deepks/lcao_CsPbI3/jle.orb

Large diffs are not rendered by default.

Binary file added examples/deepks/lcao_CsPbI3/model.ptg
Binary file not shown.
7 changes: 7 additions & 0 deletions examples/deepks/lcao_CsPbI3/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

ABACUS_PATH=$(awk -F "=" '$1=="ABACUS_PATH"{print $2}' ../../SETENV)
ABACUS_NPROCS=$(awk -F "=" '$1=="ABACUS_NPROCS"{print $2}' ../../SETENV)
ABACUS_THREADS=$(awk -F "=" '$1=="ABACUS_THREADS"{print $2}' ../../SETENV)

OMP_NUM_THREADS=${ABACUS_THREADS} mpirun -np ${ABACUS_NPROCS} ${ABACUS_PATH} | tee scf.output
2 changes: 1 addition & 1 deletion source/module_hamilt_lcao/module_deepks/LCAO_deepks_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void LCAO_Deepks::save_npy_o(const ModuleBase::matrix &bandgap, const std::strin
}
}

npy::SaveArrayAsNumpy(o_file, false, 1, oshape, npy_o);
npy::SaveArrayAsNumpy(o_file, false, 2, oshape, npy_o);
return;
}

Expand Down
2,245 changes: 2,245 additions & 0 deletions tests/PP_ORB/Cs_ONCV_PBE_FR-1.0.upf

Large diffs are not rendered by default.

1,784 changes: 1,784 additions & 0 deletions tests/PP_ORB/Cs_gga_10au_100Ry_4s2p1d.orb

Large diffs are not rendered by default.

2,244 changes: 2,244 additions & 0 deletions tests/PP_ORB/I_ONCV_PBE_FR-1.1.upf

Large diffs are not rendered by default.

1,260 changes: 1,260 additions & 0 deletions tests/PP_ORB/I_gga_7au_100Ry_2s2p2d1f.orb

Large diffs are not rendered by default.

Loading

0 comments on commit 3137f62

Please sign in to comment.