Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tools/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
SIAB: codes to generate numerical atomic orbitals.

molden: generate molden style file for Multiwfn analysis.

plot-tools: band structure, dos and pdos, dipole and adsorption.

rt-tddft-tools: tools for real-time tddft.

average_pot: python script used to calculate and plot the average electrostatic potential.

stm: generate figures related to Scanning tunneling microscope technique.

generate_orbital.sh: script used to generate numerical atomic orbitals (NAO).

opt_abfs_bash: related to generating NAO basis set.

opt_lcao_bash: related to generating NAO basis set.

opt_orb_pytorch: related to generating NAO basis set.

opt_orb_pytorch_dpsi: related to generating NAO basis set.

qo: generate quasiatomic orbital (qo).

selective_dynamics: used to do selective dynamics with ABACUS + Phonopy.
105 changes: 105 additions & 0 deletions tools/selective_dynamics/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Selective Dynamics for ABACUS+Phonopy

## Requirements

- [ase-abacus](https://gitlab.com/1041176461/ase-abacus)
- [Phonopy](https://github.com/phonopy/phonopy)

## Usage

### Setting

There is a setting file named `config.yaml`:
```yaml
origin_structure: 'STRU' # the original structure
selected_indices: [18, 19] # the atom index that you concerned about, start from 0
tasks_per_batch: 12 # how much jobs per batch
wait_time: 600 # s, sleep time between batches

setting_conf: |
SYMMETRY = .FALSE.
DIM = 1 1 1
DISPLACEMENT_DISTANCE = 0.03

mesh.conf: |
DIM = 1 1 1
MESH = 31 31 31
TMAX = 2000
TSTEP = 2

input: |
INPUT_PARAMETERS
#Parameters (1.General)
suffix phonon
calculation scf
symmetry 1
nspin 1
pseudo_dir /fs2/home/chenkg/2_liuyu/3_abacus/PP_ORB/pseudo
orbital_dir /fs2/home/chenkg/2_liuyu/3_abacus/PP_ORB/efficiency
kpoint_file ../KPT

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

#Parameters (3.Basis)
basis_type lcao
ks_solver genelpa
gamma_only 0

#Parameters (4.Smearing)
smearing_method gaussian
smearing_sigma 0.001

#Parameters (5.Mixing)
mixing_type broyden
mixing_beta 0.7

cal_force 1
cal_stress 1

kpt: |
K_POINTS
0
Gamma
5 5 1 0 0 0

job_script: |
#!/bin/bash
#SBATCH -p cp6
#SBATCH -N 1
#SBATCH -J abacus
#SBATCH -n 28

source /fs2/home/chenkg/2_liuyu/3_abacus/abacus_env.sh
export OMP_NUM_THREADS=28

mpirun -n 1 abacus
```

- origin_structure: The `STRU` filename, which contains both the fixed atoms and the free atoms.
- selected_indices: The indexs of the free atoms. Note that the index starts from 0.
- tasks_per_batch: How much jobs submitted per batch.
- wait_time: Sleep time between batches, the unit is second.
- setting_conf: The `setting.conf` file for Phonopy.
- mesh.conf: The `mesh.conf` file for Phonopy.
- input: The `INPUT` file for ABACUS.
- kpt: The `KPT` file for ABACUS.
- job_script: The script used to submit jobs.

### Submit jobs

Use the following command
```bash
python3 path_to_selective_dynamics.py --submit
```
to generate displaced structures and submit jobs.

### Postprocess

Use the following command
```bash
python3 path_to_selective_dynamics.py --post
```
to generate `FORCE_SETS` and results of phonon calculations.
62 changes: 62 additions & 0 deletions tools/selective_dynamics/example/FORCE_SETS
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
2
12

1
0.0149999999999997 -0.0259807621135333 0.0000000000000000
0.0237018506 -0.0443837983 4.6170588819
-0.0237018506 0.0443837983 -4.6170588819

1
-0.0149999999999997 0.0259807621135333 0.0000000000000000
-0.0265865716 0.0427183038 4.6170588819
0.0265865716 -0.0427183038 -4.6170588819

1
0.0149999999999997 0.0259807621135333 0.0000000000000000
0.0265865717 0.0427183036 4.6170588822
-0.0265865717 -0.0427183036 -4.6170588822

1
-0.0149999999999997 -0.0259807621135333 0.0000000000000000
-0.0237018502 -0.0443837983 4.6170588821
0.0237018502 0.0443837983 -4.6170588821

1
0.0000000000000000 0.0000000000000000 0.0300000000000000
0.0000000000 0.0000000000 3.2278781929
0.0000000000 0.0000000000 -3.2278781929

1
0.0000000000000000 0.0000000000000000 -0.0300000000000000
0.0000000000 0.0000000000 5.8048931631
0.0000000000 0.0000000000 -5.8048931631

2
0.0149999999999997 -0.0259807621135333 0.0000000000000000
-0.0161713742 0.0279335705 4.6172988628
0.0161713742 -0.0279335705 -4.6172988628

2
-0.0149999999999997 0.0259807621135333 0.0000000000000000
0.0161054946 -0.0279716061 4.6172988630
-0.0161054946 0.0279716061 -4.6172988629

2
0.0149999999999997 0.0259807621135333 0.0000000000000000
-0.0161054946 -0.0279716062 4.6172988628
0.0161054946 0.0279716062 -4.6172988628

2
-0.0149999999999997 -0.0259807621135333 0.0000000000000000
0.0161713742 0.0279335705 4.6172988628
-0.0161713742 -0.0279335705 -4.6172988627

2
0.0000000000000000 0.0000000000000000 0.0300000000000000
0.0000000000 0.0000000000 5.8781504371
0.0000000000 0.0000000000 -5.8781504371

2
0.0000000000000000 0.0000000000000000 -0.0300000000000000
0.0000000000 0.0000000000 3.1693579055
0.0000000000 0.0000000000 -3.1693579055
46 changes: 46 additions & 0 deletions tools/selective_dynamics/example/STRU
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
ATOMIC_SPECIES
C 12.01 C.upf
O 16 O.upf

NUMERICAL_ORBITAL
C_gga_8au_100Ry_2s2p1d.orb
O_gga_6au_100Ry_2s2p1d.orb

LATTICE_CONSTANT
1.889727000000

LATTICE_VECTORS
3.700890000000 -6.410129513223 0.000000000000
3.700890000000 6.410129513223 0.000000000000
0.000000000000 0.000000000000 15.000000000000

ATOMIC_POSITIONS
Direct

C
0
19
0.111111111111 0.222222222222 0.500000000000
0.111111111111 0.555555555556 0.500000000000
0.111111111111 0.888888888889 0.500000000000
0.444444444444 0.222222222222 0.500000000000
0.444444444444 0.555555555556 0.500000000000
0.444444444444 0.888888888889 0.500000000000
0.777777777778 0.222222222222 0.500000000000
0.777777777778 0.555555555556 0.500000000000
0.777777777778 0.888888888889 0.500000000000
0.222222222222 0.111111111111 0.500000000000
0.222222222222 0.444444444444 0.500000000000
0.222222222222 0.777777777778 0.500000000000
0.555555555556 0.111111111111 0.500000000000
0.555555555556 0.444444444444 0.500000000000
0.555555555556 0.777777777778 0.500000000000
0.888888888889 0.111111111111 0.500000000000
0.888888888889 0.444444444444 0.500000000000
0.888888888889 0.777777777778 0.500000000000
0.888888888889 0.777777777778 0.620000000000

O
0
1
0.888888888889 0.777777777778 0.698000000000
65 changes: 65 additions & 0 deletions tools/selective_dynamics/example/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
origin_structure: 'STRU' # the original structure
selected_indices: [18, 19] # the atom index that you concerned about, start from 0
tasks_per_batch: 12 # how much jobs per batch
wait_time: 600 # s, sleep time between batches

setting.conf: |
SYMMETRY = .FALSE.
DIM = 1 1 1
DISPLACEMENT_DISTANCE = 0.03

mesh.conf: |
DIM = 1 1 1
MESH = 31 31 31
TMAX = 2000
TSTEP = 2

input: |
INPUT_PARAMETERS
#Parameters (1.General)
suffix phonon
calculation scf
symmetry 1
nspin 1
pseudo_dir /fs2/home/chenkg/2_liuyu/3_abacus/PP_ORB/pseudo
orbital_dir /fs2/home/chenkg/2_liuyu/3_abacus/PP_ORB/efficiency
kpoint_file ../KPT

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

#Parameters (3.Basis)
basis_type lcao
ks_solver genelpa
gamma_only 0

#Parameters (4.Smearing)
smearing_method gaussian
smearing_sigma 0.001

#Parameters (5.Mixing)
mixing_type broyden
mixing_beta 0.7

cal_force 1
cal_stress 1

kpt: |
K_POINTS
0
Gamma
5 5 1 0 0 0

job_script: |
#!/bin/bash
#SBATCH -p cp6
#SBATCH -N 1
#SBATCH -J abacus
#SBATCH -n 28

source /fs2/home/chenkg/2_liuyu/3_abacus/abacus_env.sh
export OMP_NUM_THREADS=28

mpirun -n 1 abacus
Loading
Loading