From 49e2d668ea1b8bcc171cf3a7b5ea1feba23a537a Mon Sep 17 00:00:00 2001 From: hongriTianqi Date: Wed, 26 Oct 2022 09:52:12 +0800 Subject: [PATCH 1/5] add running commands for abacus examples --- ABACUS/Hands_On_Commands_ABC.md | 72 +++++++++++++++++++++++++++++++++ ABACUS/{README => README.md} | 16 +++++--- ABACUS/tool/convert.py | 3 -- ABACUS/tool/run.sh | 3 -- 4 files changed, 82 insertions(+), 12 deletions(-) create mode 100644 ABACUS/Hands_On_Commands_ABC.md rename ABACUS/{README => README.md} (43%) delete mode 100644 ABACUS/tool/convert.py delete mode 100755 ABACUS/tool/run.sh diff --git a/ABACUS/Hands_On_Commands_ABC.md b/ABACUS/Hands_On_Commands_ABC.md new file mode 100644 index 0000000..4c958fa --- /dev/null +++ b/ABACUS/Hands_On_Commands_ABC.md @@ -0,0 +1,72 @@ +# ABACUS Hands-On ABC + +## A. SCF + +### A.1 Download input files +``` +>> cd /data +>> git clone https://gitee.com/deepmodeling/colombo-academy-tutorials.git -b develop +>> cd colombo-academy-tutorials +>> cd ABACUS/ +>> cd MgO_LCAO +>> ls + band_structure optimization SCF +``` + +### A.2 Run SCF +``` +>> cd SCF +>> abacus +``` + +### A.3 Get ETOT +``` +>> cd OUT.MgO +>> grep ETOT running_scf.log +``` + +## B. Optimization + +### B.1 Run optimization +``` +>> cd ../../optimization +>> abacus +``` + +### B.2 Check optimized structure +``` +>> cd OUT.MgO +>> ls + .cif file +``` + +## C. Band Structure + +### C.1 Run SCF +``` +>> cd ../../band_structure +>> cp INPUT_scf INPUT +>> cp KPT_scf KPT +>> abacus +``` + +### C.2 Run NSCF +``` +>> cp INPUT_nscf INPUT +>> cp KPT_nscf KPT +>> abacus +``` + +### C.3 Install `abacus-plot` +``` +>> cd ~/abacus-develop/tools/plot-tools +>> python3 setup.py install +``` + +### C.4 Plot band structure +``` +>> cd /data/colombo-academy-tutorials/ABACUS/MgO_LCAO/band_structure/OUT.MgO/ +>> cp ../KPT ./ +>> cp ../config.json ./ +>> abacus-plot -b +``` diff --git a/ABACUS/README b/ABACUS/README.md similarity index 43% rename from ABACUS/README rename to ABACUS/README.md index 47221c8..d0b10fb 100644 --- a/ABACUS/README +++ b/ABACUS/README.md @@ -1,13 +1,9 @@ -/*******************************************************************************/ -/ -/ These are the examples of the ABACUS program. -/ -/*******************************************************************************/ +# Hands-On examples of ABACUS. This directory includes simple hands-on examples of ABACUS. Four examples are included: -1. MgO_LCAO: +1. MgO_LCAO 2. MgO_PW 3. Si_LCAO 4. Si_PW @@ -15,3 +11,11 @@ Four examples are included: Each example includes three types of basic DFT calculation: SCF, optimization and electronic band structure. Si_PW is left empty deliberately for users' own exercise. +The file `Hands_On_Commands_ABC.md` collects the basic shell commands in running the +three examples in the `MgO_LCAO` directory. We assume the utilization of the +[Bohrium](https://bohrium.dp.tech/) platform to run these examples, +so the jobs are suggested to run under the /data directory. + +A. SCF +B. optimization +C. band_structure diff --git a/ABACUS/tool/convert.py b/ABACUS/tool/convert.py deleted file mode 100644 index 990c14c..0000000 --- a/ABACUS/tool/convert.py +++ /dev/null @@ -1,3 +0,0 @@ -import dpdata -ls = dpdata.System('STRU',fmt='abacus/stru') -ls.to('poscar','POSCAR') diff --git a/ABACUS/tool/run.sh b/ABACUS/tool/run.sh deleted file mode 100755 index 48af324..0000000 --- a/ABACUS/tool/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -OMP_NUM_THREADS=1 mpirun -np 2 abacus -- Gitee From 22b1c31f1c4a44aa12e7cf5397147656dc41360d Mon Sep 17 00:00:00 2001 From: hongriTianqi Date: Wed, 26 Oct 2022 09:58:26 +0800 Subject: [PATCH 2/5] update input files --- ABACUS/MgO_LCAO/band_structure/KPT_nscf | 1 + ABACUS/MgO_PW/band_structure/INPUT | 14 -------------- ABACUS/MgO_PW/band_structure/KPT | 9 --------- ABACUS/MgO_PW/band_structure/KPT_nscf | 1 + ABACUS/Si_LCAO/band_structure/INPUT | 13 ------------- ABACUS/Si_LCAO/band_structure/KPT | 9 --------- ABACUS/Si_LCAO/band_structure/KPT_nscf | 1 + 7 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 ABACUS/MgO_PW/band_structure/INPUT delete mode 100644 ABACUS/MgO_PW/band_structure/KPT delete mode 100644 ABACUS/Si_LCAO/band_structure/INPUT delete mode 100644 ABACUS/Si_LCAO/band_structure/KPT diff --git a/ABACUS/MgO_LCAO/band_structure/KPT_nscf b/ABACUS/MgO_LCAO/band_structure/KPT_nscf index e51bb7e..790c1fd 100644 --- a/ABACUS/MgO_LCAO/band_structure/KPT_nscf +++ b/ABACUS/MgO_LCAO/band_structure/KPT_nscf @@ -4,6 +4,7 @@ Line 0.375 0.375 0.750 20 # K 0.000 0.000 0.000 20 # G 0.500 0.000 0.500 20 # X +0.625 0.250 0.625 20 # U 0.500 0.500 0.500 20 # L 0.000 0.000 0.000 20 # G 0.500 0.250 0.750 1 # W diff --git a/ABACUS/MgO_PW/band_structure/INPUT b/ABACUS/MgO_PW/band_structure/INPUT deleted file mode 100644 index df213d3..0000000 --- a/ABACUS/MgO_PW/band_structure/INPUT +++ /dev/null @@ -1,14 +0,0 @@ -INPUT_PARAMETERS -suffix MgO -ntype 2 -pseudo_dir ../../PP_ORB -orbital_dir ../../PP_ORB -ecutwfc 100 -scf_thr 1e-6 -basis_type pw -calculation nscf -init_chg file -out_band 1 -out_dos 1 -latname fcc -symmetry 0 diff --git a/ABACUS/MgO_PW/band_structure/KPT b/ABACUS/MgO_PW/band_structure/KPT deleted file mode 100644 index e51bb7e..0000000 --- a/ABACUS/MgO_PW/band_structure/KPT +++ /dev/null @@ -1,9 +0,0 @@ -K_POINTS -6 -Line -0.375 0.375 0.750 20 # K -0.000 0.000 0.000 20 # G -0.500 0.000 0.500 20 # X -0.500 0.500 0.500 20 # L -0.000 0.000 0.000 20 # G -0.500 0.250 0.750 1 # W diff --git a/ABACUS/MgO_PW/band_structure/KPT_nscf b/ABACUS/MgO_PW/band_structure/KPT_nscf index e51bb7e..790c1fd 100644 --- a/ABACUS/MgO_PW/band_structure/KPT_nscf +++ b/ABACUS/MgO_PW/band_structure/KPT_nscf @@ -4,6 +4,7 @@ Line 0.375 0.375 0.750 20 # K 0.000 0.000 0.000 20 # G 0.500 0.000 0.500 20 # X +0.625 0.250 0.625 20 # U 0.500 0.500 0.500 20 # L 0.000 0.000 0.000 20 # G 0.500 0.250 0.750 1 # W diff --git a/ABACUS/Si_LCAO/band_structure/INPUT b/ABACUS/Si_LCAO/band_structure/INPUT deleted file mode 100644 index e73ab79..0000000 --- a/ABACUS/Si_LCAO/band_structure/INPUT +++ /dev/null @@ -1,13 +0,0 @@ -INPUT_PARAMETERS -suffix Si -ntype 1 -pseudo_dir ../../PP_ORB -orbital_dir ../../PP_ORB -ecutwfc 100 -scf_thr 1e-6 -basis_type lcao -calculation nscf -init_chg file -out_band 1 -latname fcc -symmetry 0 diff --git a/ABACUS/Si_LCAO/band_structure/KPT b/ABACUS/Si_LCAO/band_structure/KPT deleted file mode 100644 index e51bb7e..0000000 --- a/ABACUS/Si_LCAO/band_structure/KPT +++ /dev/null @@ -1,9 +0,0 @@ -K_POINTS -6 -Line -0.375 0.375 0.750 20 # K -0.000 0.000 0.000 20 # G -0.500 0.000 0.500 20 # X -0.500 0.500 0.500 20 # L -0.000 0.000 0.000 20 # G -0.500 0.250 0.750 1 # W diff --git a/ABACUS/Si_LCAO/band_structure/KPT_nscf b/ABACUS/Si_LCAO/band_structure/KPT_nscf index e51bb7e..790c1fd 100644 --- a/ABACUS/Si_LCAO/band_structure/KPT_nscf +++ b/ABACUS/Si_LCAO/band_structure/KPT_nscf @@ -4,6 +4,7 @@ Line 0.375 0.375 0.750 20 # K 0.000 0.000 0.000 20 # G 0.500 0.000 0.500 20 # X +0.625 0.250 0.625 20 # U 0.500 0.500 0.500 20 # L 0.000 0.000 0.000 20 # G 0.500 0.250 0.750 1 # W -- Gitee From c5015d0d37d6aa709193b9b83122302a18630c0e Mon Sep 17 00:00:00 2001 From: hongriTianqi Date: Wed, 26 Oct 2022 10:28:46 +0800 Subject: [PATCH 3/5] update stru file --- ABACUS/MgO_LCAO/band_structure/STRU | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ABACUS/MgO_LCAO/band_structure/STRU b/ABACUS/MgO_LCAO/band_structure/STRU index 6e27290..7583560 100644 --- a/ABACUS/MgO_LCAO/band_structure/STRU +++ b/ABACUS/MgO_LCAO/band_structure/STRU @@ -7,7 +7,7 @@ Mg_gga_8au_100Ry_4s2p1d.orb O_gga_8au_100Ry_2s2p1d.orb LATTICE_CONSTANT -8.087220532316822 +8.087214649032902 ATOMIC_POSITIONS Direct -- Gitee From 9a17a8856858fd361a2ab7c1c0b7adcd363618ea Mon Sep 17 00:00:00 2001 From: hongriTianqi Date: Wed, 26 Oct 2022 10:38:19 +0800 Subject: [PATCH 4/5] update command --- ABACUS/Hands_On_Commands_ABC.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ABACUS/Hands_On_Commands_ABC.md b/ABACUS/Hands_On_Commands_ABC.md index 4c958fa..0dccd52 100644 --- a/ABACUS/Hands_On_Commands_ABC.md +++ b/ABACUS/Hands_On_Commands_ABC.md @@ -60,6 +60,7 @@ ### C.3 Install `abacus-plot` ``` >> cd ~/abacus-develop/tools/plot-tools +>> pip install lxml >> python3 setup.py install ``` -- Gitee From 5827b3eec387943d21286991c34a6747590d0348 Mon Sep 17 00:00:00 2001 From: hongriTianqi Date: Wed, 26 Oct 2022 10:58:48 +0800 Subject: [PATCH 5/5] update KPT_nscf files --- ABACUS/MgO_LCAO/band_structure/KPT_nscf | 2 +- ABACUS/MgO_PW/band_structure/KPT_nscf | 2 +- ABACUS/Si_LCAO/band_structure/KPT_nscf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ABACUS/MgO_LCAO/band_structure/KPT_nscf b/ABACUS/MgO_LCAO/band_structure/KPT_nscf index 790c1fd..4ed80e3 100644 --- a/ABACUS/MgO_LCAO/band_structure/KPT_nscf +++ b/ABACUS/MgO_LCAO/band_structure/KPT_nscf @@ -1,5 +1,5 @@ K_POINTS -6 +7 Line 0.375 0.375 0.750 20 # K 0.000 0.000 0.000 20 # G diff --git a/ABACUS/MgO_PW/band_structure/KPT_nscf b/ABACUS/MgO_PW/band_structure/KPT_nscf index 790c1fd..4ed80e3 100644 --- a/ABACUS/MgO_PW/band_structure/KPT_nscf +++ b/ABACUS/MgO_PW/band_structure/KPT_nscf @@ -1,5 +1,5 @@ K_POINTS -6 +7 Line 0.375 0.375 0.750 20 # K 0.000 0.000 0.000 20 # G diff --git a/ABACUS/Si_LCAO/band_structure/KPT_nscf b/ABACUS/Si_LCAO/band_structure/KPT_nscf index 790c1fd..4ed80e3 100644 --- a/ABACUS/Si_LCAO/band_structure/KPT_nscf +++ b/ABACUS/Si_LCAO/band_structure/KPT_nscf @@ -1,5 +1,5 @@ K_POINTS -6 +7 Line 0.375 0.375 0.750 20 # K 0.000 0.000 0.000 20 # G -- Gitee