DeePKS4Perovskites
©️ Copyright 2023 @ Authors
Author:
Qi Ou 📨
Date: 2023-06-27
Quick start: click on the Connect button located at the top of the interface, then select the abacus:3.2.1-toolkit-notebook Image and choose c16_m32_cpu to proceed.
Goal
The goal of this notebook is to show a sample job running DeePKS model for a halide perovskite system in ABACUS, which offers closely matched density-of-state (DOS) as compared to the HSE06 funcitonal.
Catalogue
Background
Accurate prediction for the electronic structure properties of halide perovskites plays a significant role in the design of highly efficient and stable solar cells. While density functional theory (DFT) within the generalized gradient approximation (GGA) offers reliable prediction in terms of lattice constants and potential energy surface for halide perovskites, it severely underestimates the band gap due to the lack of non-local exact exchange term, which exists in computationally expensive hybrid functionals.
Here, we established a universal Deep Kohn-Sham (DeePKS) model based on neural network so as to enable electronic structure calculations with the accuracy of hybrid functional HSE06 and the efficiency comparable to GGA functional, for a plethora of halide perovskites, i.e., ABX (A=FA, MA, Cs; B=Sn, Pb; X=Cl, Br, I). Forces, band gaps, and density of states (DOS) predicted by our DeePKS model for all aforementioned perovskites are in good agreement with the HSE06 results, with significantly improved efficiency. In addition, even though the spin-orbit coupling (SOC) effect has not been taken into consideration during the training process, DeePKS+SOC offers highly consistent band gap and DOS as compared to HSE06+SOC for Pb-containing systems. Such DeePKS model can be readily applied for an accurate yet efficient prediction of various properties for the family of halide perovskites.
Iterative training
The DeePKS model is trained based on an iterative training procedure that incorperates the self-consistent field (SCF) calculation performed in an ab initio software and the fitting process by the neural network performed in DeePKS-kit. For periodic systems, the corresponding SCF calculaiton with the DeePKS model is implemented in an open-source DFT package ABACUS.
/data
/data/sample_job/CsPbI3-ABACUS-DeePKS
This working directory includes all required numerical atomic orbitals, pseudopotentials, and input files for ABACUS SCF calculation, as well as the projectors and model file for loading the DeePKS model to ABACUS:
Cs_ONCV_PBE-1.0.upf* I_gga_7au_100Ry_2s2p2d1f.orb* STRU* Cs_gga_10au_100Ry_4s2p1d.orb* KPT* config.json* INPUT* Pb_ONCV_PBE-1.0.upf* jle.orb* I_ONCV_PBE-1.0.upf* Pb_gga_7au_100Ry_2s2p2d1f.orb* model.ptg*
The main input file INPUT_deepks
and the structure file STRU
can be viewed via:
INPUT_PARAMETERS suffix deepks calculation scf ntype 3 ecutwfc 100.000000 scf_thr 1.000000e-07 scf_nmax 100 basis_type lcao dft_functional pbe gamma_only 0 mixing_type pulay mixing_beta 0.100000 out_dos 1 kspacing 0.060000 cal_force 1 cal_stress 1 deepks_out_labels 1 out_bandgap 1 deepks_scf 1 deepks_bandgap 0 deepks_model ./model.ptg
ATOMIC_SPECIES Cs 1 ./Cs_ONCV_PBE-1.0.upf Pb 1 ./Pb_ONCV_PBE-1.0.upf I 1 ./I_ONCV_PBE-1.0.upf 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 1 1 1 NUMERICAL_DESCRIPTOR ./jle.orb
:: initializing oneAPI environment ... dash: SH_VERSION = unknown args: Using "$@" for setvars.sh arguments: :: compiler -- latest :: debugger -- latest :: dev-utilities -- latest :: mkl -- latest :: mpi -- latest :: tbb -- latest :: vtune -- latest :: oneAPI environment initialized :: ABACUS v3.1 Atomic-orbital Based Ab-initio Computation at UStc Website: http://abacus.ustc.edu.cn/ Documentation: https://abacus.deepmodeling.com/ Repository: https://github.com/abacusmodeling/abacus-develop https://github.com/deepmodeling/abacus-develop Tue Aug 22 16:06:36 2023 MAKE THE DIR : OUT.deepks/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Warning: number valence electrons > 1 for Cs: [Xe] 6s1 Warning: number valence electrons > 4 for Pb: [Xe] 4f14 5d10 6s2 6p2 Warning: number valence electrons > 7 for I: [Kr] 4d10 5s2 5p5 Please make sure the pseudopotential file is what you need %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% UNIFORM GRID DIM : 75 * 75 * 75 UNIFORM GRID DIM(BIG): 15 * 15 * 15 DONE(0.099415 SEC) : SETUP UNITCELL DONE(0.141224 SEC) : INIT K-POINTS --------------------------------------------------------- Self-consistent calculations for electrons --------------------------------------------------------- SPIN KPOINTS PROCESSORS NBASE 1 365 8 115 --------------------------------------------------------- Use Systematically Improvable Atomic bases --------------------------------------------------------- ELEMENT ORBITALS NBASE NATOM XC Cs 4s2p1d-10au 15 1 Pb 2s2p2d1f-7au 25 1 I 2s2p2d1f-7au 25 3 --------------------------------------------------------- Initial plane wave basis and FFT box --------------------------------------------------------- ------------------------------------------- SELF-CONSISTENT : ------------------------------------------- START CHARGE : atomic DONE(19.592 SEC) : INIT SCF ITER ETOT(eV) EDIFF(eV) DRHO TIME(s) GE1 -1.036158e+04 0.000000e+00 4.059e-02 5.892e+00 GE2 -1.035808e+04 3.502097e+00 3.504e-02 8.359e+00 GE3 -1.035815e+04 -6.732725e-02 1.856e-02 8.412e+00 GE4 -1.035855e+04 -4.015172e-01 8.026e-03 8.356e+00 GE5 -1.035872e+04 -1.693228e-01 4.846e-03 8.327e+00 GE6 -1.035880e+04 -8.174499e-02 1.606e-03 8.329e+00 GE7 -1.035885e+04 -4.351232e-02 1.415e-03 8.314e+00 GE8 -1.035887e+04 -2.861894e-02 1.905e-04 8.313e+00 GE9 -1.035888e+04 -4.355735e-03 2.133e-04 8.379e+00 GE10 -1.035887e+04 9.451457e-03 1.470e-04 8.427e+00 GE11 -1.035887e+04 1.205960e-03 2.172e-05 8.347e+00 GE12 -1.035887e+04 4.633433e-04 3.091e-05 8.296e+00 GE13 -1.035887e+04 -1.634360e-04 1.008e-05 8.264e+00 GE14 -1.035887e+04 3.059365e-04 8.930e-06 8.291e+00 GE15 -1.035887e+04 -9.837260e-05 2.715e-06 8.292e+00 GE16 -1.035887e+04 3.914195e-05 7.794e-07 8.344e+00 GE17 -1.035887e+04 -7.488385e-05 6.428e-07 8.290e+00 GE18 -1.035887e+04 -5.800387e-05 1.496e-06 8.306e+00 GE19 -1.035887e+04 1.812529e-05 2.482e-07 8.293e+00 GE20 -1.035887e+04 9.164191e-06 6.132e-08 8.289e+00 E_delta_band = -2.04685169e-02 Ry = -2.78488459e-01 eV E_delta_NN= -1.24565493e-01 Ry = -1.69480048e+00 eV ><><><><><><><><><><><><><><><><><><><><><>< TOTAL-STRESS (KBAR): ><><><><><><><><><><><><><><><><><><><><><>< 5.01271608e+00 7.87935128e-10 -8.68910849e-10 7.87935128e-10 5.01271608e+00 -4.65455534e-11 -8.68910849e-10-4.65455534e-115.01271608e+00 TOTAL-PRESSURE: 5.01271608e+00 KBAR |CLASS_NAME---------|NAME---------------|TIME(Sec)-----|CALLS----|AVG------|PER%------- total 208.64 7 30 1e+02 % Driver driver_line 208.6 1 2.1e+02 1e+02 % ORB_control read_orb_first 0.52792 1 0.53 0.25 % LCAO_Orbitals Read_Orbitals 0.52792 1 0.53 0.25 % NOrbital_Lm extra_uniform 0.38113 66 0.0058 0.18 % Mathzone_Add1 Uni_Deriv_Phi 0.35468 66 0.0054 0.17 % Sphbes Spherical_Bessel 0.15166 20100 7.5e-06 0.073 % ORB_control set_orb_tables 17.564 1 18 8.4 % ORB_gen_tables gen_tables 17.564 1 18 8.4 % ORB_table_phi init_Table 4.0858 1 4.1 2 % ORB_table_phi cal_ST_Phi12_R 4.0346 890 0.0045 1.9 % ORB_table_beta init_Table_Beta 3.7716 1 3.8 1.8 % ORB_table_beta VNL_PhiBeta_R 3.7506 662 0.0057 1.8 % ORB_table_alpha init_Table_Alpha 9.4946 1 9.5 4.6 % ORB_table_alpha S_PhiAlpha_R 9.4423 1440 0.0066 4.5 % ESolver_KS_LCAO Run 167.44 1 1.7e+02 80 % ESolver_KS_LCAO beforescf 0.20211 1 0.2 0.097 % Grid_Driver Find_atom 0.48677 75300 6.5e-06 0.23 % PW_Basis recip2real 0.17547 110 0.0016 0.084 % Potential update_from_charge 0.71162 21 0.034 0.34 % Potential cal_v_eff 0.70923 21 0.034 0.34 % PW_Basis real2recip 0.2181 172 0.0013 0.1 % PotXC cal_v_eff 0.63581 21 0.03 0.3 % XC_Functional v_xc 0.63374 21 0.03 0.3 % HSolverLCAO solve 163.07 20 8.2 78 % HamiltLCAO updateHk 78.378 7300 0.011 38 % OperatorLCAO init 78.324 21900 0.0036 38 % Veff contributeHk 10.848 7300 0.0015 5.2 % Gint_interface cal_gint 7.7899 41 0.19 3.7 % Gint_interface cal_gint_vlocal 3.3925 20 0.17 1.6 % Gint_Tools cal_psir_ylm 2.1726 17775 0.00012 1 % Gint_k folding_vl_k 7.4427 7300 0.001 3.6 % Gint_k Distri 5.2454 7300 0.00072 2.5 % DeePKS contributeHR 55.785 20 2.8 27 % LCAO_Deepks cal_projected_DM_k 116.77 22 5.3 56 % LCAO_DESCRIPTOR add_v_delta_k 5.4205 20 0.27 2.6 % OperatorLCAO folding_fixed 11.618 7300 0.0016 5.6 % LCAO_nnr folding_fixedH 12.16 7665 0.0016 5.8 % HSolverLCAO hamiltSolvePsiK 55.903 7300 0.0077 27 % DiagoElpa elpa_solve 53.238 7300 0.0073 26 % ElecStateLCAO psiToRho 28.763 20 1.4 14 % elecstate cal_dm 4.6698 21 0.22 2.2 % psiMulPsiMpi pdgemm 4.5981 7665 0.0006 2.2 % Local_Orbital_wfc wfc_2d_to_grid 0.75855 7300 0.0001 0.36 % LCAO_Charge cal_dk_k 18.436 20 0.92 8.8 % Gint_interface cal_gint_rho 2.8812 20 0.14 1.4 % Force_Stress_LCAO getForceStress 15.251 1 15 7.3 % Force_LCAO_k ftable_k 8.0909 1 8.1 3.9 % Force_LCAO_k allocate_k 0.12152 1 0.12 0.058 % Force_LCAO_k cal_foverlap_k 0.28225 1 0.28 0.14 % Force_LCAO_k cal_edm_2d 0.28172 1 0.28 0.14 % Local_Orbital_Chargecal_dm_R 0.1014 2 0.051 0.049 % Force_LCAO_k cal_fvl_dphi_k 1.5161 1 1.5 0.73 % Gint_interface cal_gint_force 1.5161 1 1.5 0.73 % Gint_Tools cal_dpsir_ylm 0.72426 450 0.0016 0.35 % Gint_Tools cal_dpsirr_ylm 0.31268 450 0.00069 0.15 % LCAO_Deepks cal_f_delta_hf_k_new3.3683 1 3.4 1.6 % LCAO_Deepks cal_gdmx_k 6.8906 1 6.9 3.3 % ---------------------------------------------------------------------------------------- START Time : Tue Aug 22 16:06:36 2023 FINISH Time : Tue Aug 22 16:10:05 2023 TOTAL Time : 2.1e+02 SEE INFORMATION IN : OUT.deepks/
/data/sample_job/CsPbI3-ABACUS-DeePKS/OUT.deepks
We copy the control file to current directory:
{ "tdosfile": "TDOS", "efermi": 4.09732288087, "energy_range": [-5,5], "dos_range": [0,20], "figsize":[14,10], "tdosfig": "tdos.png" }
and we can plot the DOS via:
/data/sample_job/CsPbI3-ABACUS-PBE
:: initializing oneAPI environment ... dash: SH_VERSION = unknown args: Using "$@" for setvars.sh arguments: :: compiler -- latest :: debugger -- latest :: dev-utilities -- latest :: mkl -- latest :: mpi -- latest :: tbb -- latest :: vtune -- latest :: oneAPI environment initialized :: WARNING: Total thread number on this node mismatches with hardware availability. This may cause poor performance. ABACUS v3.1 Atomic-orbital Based Ab-initio Computation at UStc Website: http://abacus.ustc.edu.cn/ Documentation: https://abacus.deepmodeling.com/ Repository: https://github.com/abacusmodeling/abacus-develop https://github.com/deepmodeling/abacus-develop Info: Local MPI proc number: 1,OpenMP thread number: 8,Total thread number: 8,Local thread limit: 16 Tue Aug 22 16:11:12 2023 MAKE THE DIR : OUT.pbe/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Warning: number valence electrons > 1 for Cs: [Xe] 6s1 Warning: number valence electrons > 4 for Pb: [Xe] 4f14 5d10 6s2 6p2 Warning: number valence electrons > 7 for I: [Kr] 4d10 5s2 5p5 Please make sure the pseudopotential file is what you need %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% UNIFORM GRID DIM : 75 * 75 * 75 UNIFORM GRID DIM(BIG): 25 * 25 * 25 DONE(0.146337 SEC) : SETUP UNITCELL DONE(0.175449 SEC) : INIT K-POINTS --------------------------------------------------------- Self-consistent calculations for electrons --------------------------------------------------------- SPIN KPOINTS PROCESSORS NBASE 1 365 1 115 --------------------------------------------------------- Use Systematically Improvable Atomic bases --------------------------------------------------------- ELEMENT ORBITALS NBASE NATOM XC Cs 4s2p1d-10au 15 1 Pb 2s2p2d1f-7au 25 1 I 2s2p2d1f-7au 25 3 --------------------------------------------------------- Initial plane wave basis and FFT box --------------------------------------------------------- ------------------------------------------- SELF-CONSISTENT : ------------------------------------------- START CHARGE : atomic DONE(5.76528 SEC) : INIT SCF ITER ETOT(eV) EDIFF(eV) DRHO TIME(s) GE1 -1.035987e+04 0.000000e+00 3.961e-02 1.518e+01 GE2 -1.035854e+04 1.322333e+00 3.345e-02 7.848e+00 GE3 -1.035887e+04 -3.287573e-01 1.201e-02 8.297e+00 GE4 -1.035888e+04 -5.456486e-03 5.524e-03 8.328e+00 GE5 -1.035888e+04 1.237001e-03 3.028e-03 8.624e+00 GE6 -1.035888e+04 -1.834541e-03 3.645e-04 8.719e+00 GE7 -1.035888e+04 1.108499e-04 2.726e-04 8.370e+00 GE8 -1.035888e+04 -2.999527e-05 8.886e-05 8.616e+00 GE9 -1.035888e+04 2.140564e-06 5.538e-05 9.245e+00 GE10 -1.035888e+04 -9.259681e-07 4.141e-06 8.684e+00 GE11 -1.035888e+04 -1.902705e-08 1.191e-06 9.015e+00 GE12 -1.035888e+04 2.116162e-08 1.138e-06 8.832e+00 GE13 -1.035888e+04 -6.971377e-09 2.258e-08 8.782e+00 ><><><><><><><><><><><><><><><><><><><><><>< TOTAL-STRESS (KBAR): ><><><><><><><><><><><><><><><><><><><><><>< 6.434e+00 9.528e-09 -8.652e-10 9.528e-09 6.434e+00 -4.752e-11 -8.652e-10 -4.752e-11 6.434e+00 TOTAL-PRESSURE: 6.434e+00 KBAR |CLASS_NAME---------|NAME---------------|TIME(Sec)-----|CALLS----|AVG------|PER%------- total 159.67 7 23 1e+02 % Driver driver_line 159.63 1 1.6e+02 1e+02 % ORB_control read_orb_first 0.23047 1 0.23 0.14 % LCAO_Orbitals Read_Orbitals 0.23047 1 0.23 0.14 % NOrbital_Lm extra_uniform 0.14041 21 0.0067 0.088 % Mathzone_Add1 Uni_Deriv_Phi 0.1236 21 0.0059 0.077 % Sphbes Spherical_Bessel 0.14992 20100 7.5e-06 0.094 % ORB_control set_orb_tables 4.9192 1 4.9 3.1 % ORB_gen_tables gen_tables 4.9192 1 4.9 3.1 % ORB_table_phi init_Table 1.0283 1 1 0.64 % ORB_table_phi cal_ST_Phi12_R 0.97752 890 0.0011 0.61 % ORB_table_beta init_Table_Beta 3.6817 1 3.7 2.3 % ORB_table_beta VNL_PhiBeta_R 3.6605 662 0.0055 2.3 % ESolver_KS_LCAO Run 118.76 1 1.2e+02 74 % ESolver_KS_LCAO beforescf 0.17691 1 0.18 0.11 % PW_Basis recip2real 0.28626 75 0.0038 0.18 % Potential update_from_charge 1.3028 14 0.093 0.82 % Potential cal_v_eff 1.2956 14 0.093 0.81 % H_Hartree_pw v_hartree 0.1995 14 0.014 0.12 % PW_Basis real2recip 0.41311 116 0.0036 0.26 % PotXC cal_v_eff 1.0806 14 0.077 0.68 % XC_Functional v_xc 1.0732 14 0.077 0.67 % HSolverLCAO solve 117.03 13 9 73 % HamiltLCAO updateHk 41.14 4745 0.0087 26 % OperatorLCAO init 33.65 9490 0.0035 21 % Veff contributeHk 33.398 4745 0.007 21 % Gint_interface cal_gint 8.7823 27 0.33 5.5 % Gint_interface cal_gint_vlocal 3.1987 13 0.25 2 % Gint_Tools cal_psir_ylm 1.8303 50804 3.6e-05 1.1 % Gint_k folding_vl_k 30.189 4745 0.0064 19 % Gint_k Distri 28.854 4745 0.0061 18 % OperatorLCAO folding_fixed 7.4106 4745 0.0016 4.6 % LCAO_nnr folding_fixedH 7.1262 5110 0.0014 4.5 % HSolverLCAO hamiltSolvePsiK 64.188 4745 0.014 40 % DiagoElpa elpa_solve 62.647 4745 0.013 39 % ElecStateLCAO psiToRho 11.669 13 0.9 7.3 % elecstate cal_dm 1.1058 14 0.079 0.69 % psiMulPsiMpi pdgemm 0.74386 5110 0.00015 0.47 % Local_Orbital_wfc wfc_2d_to_grid 0.18507 4745 3.9e-05 0.12 % LCAO_Charge cal_dk_k 4.5373 13 0.35 2.8 % Gint_interface cal_gint_rho 3.9964 13 0.31 2.5 % Charge mix_rho 0.11604 12 0.0097 0.073 % Charge Pulay_mixing 0.11002 12 0.0092 0.069 % Force_Stress_LCAO getForceStress 2.5119 1 2.5 1.6 % Force_LCAO_k ftable_k 2.373 1 2.4 1.5 % Force_LCAO_k allocate_k 0.31016 1 0.31 0.19 % Force_LCAO_k cal_foverlap_k 0.1988 1 0.2 0.12 % Force_LCAO_k cal_edm_2d 0.19751 1 0.2 0.12 % Local_Orbital_Chargecal_dm_R 0.2145 2 0.11 0.13 % Force_LCAO_k cal_fvl_dphi_k 1.5872 1 1.6 0.99 % Gint_interface cal_gint_force 1.5872 1 1.6 0.99 % Gint_Tools cal_dpsir_ylm 0.97206 1954 0.0005 0.61 % Gint_Tools cal_dpsirr_ylm 0.14069 1954 7.2e-05 0.088 % Force_LCAO_k cal_fvnl_dbeta_k_new0.16699 1 0.17 0.1 % ---------------------------------------------------------------------------------------- START Time : Tue Aug 22 16:11:12 2023 FINISH Time : Tue Aug 22 16:13:51 2023 TOTAL Time : 1.6e+02 SEE INFORMATION IN : OUT.pbe/
/data/sample_job/CsPbI3-ABACUS-PBE/OUT.pbe
/data/sample_job/CsPbI3-VASP
Reference
The original paper regarding this DeePKS model is available online via arXiv: http://arxiv.org/abs/2306.14486