地域密着型エリア広告配信リクルートの地域密着型広告ドコイク?アドネットワーク Ads by ドコイク?[無料でホームページを作成] [通報・削除依頼]
[無料でホームページを作成] [通報・削除依頼]

PWscf+BerkeleyGW

   ここではPWscfを用いたGW近似計算からBoltzTraPの計算までを解説する。
-------------------------------------------------------------------------------
■ BerkeleyGW
□ download
1. http://www.berkeleygw.org/ に入る。
2. Create new account で登録する。
3. 最後のGの質問は、GW近似のGが何か?である。Gの二番目の文字を英語で入力する。
4. メールが届くので、書かれているアドレスをクリックして飛ぶ。
5. downloadでプログラムを得る。最新版は下記になるが、古いのも得ておこう。
BerkeleyGW 1.0.5 (Source Code - All Platforms): BGW-1.0.5.tar.gz - License released 30 Aug 2013

□ Compiling BerkeleyGW (Need fftw-2.1.5)
1. tar zxvf BGW-1.0.5.tar.gz
2. mv BerkeleyGW-1.0.5 BerkeleyGW
3. cd Ber*
4. Copy mk file
  A) ifort case
    cp config/serial_ifort64.mk arch.mk
  B) ifort + mpi case
    cp lawrencium.mk arch.mk
  C) gfortran case
    cp config/generic.serial.linux.mk arch.mk
  D) gfortran + mpi case
    cp config/generic.mpi.linux.mk arch.mk
5. gedit arch.mk
 A) (cp config/serial_ifort64.mk arch.mk) case
   FFTWLIB      = -L/usr/local/lib -lfftw
   FFTWINCLUDE  = /home/username/fftw-2.1.5/fortran
   MKLPATH = /opt/intel/mkl/lib/intel64
 B) (cp lawrencium.mk arch.mk) intel case
   FOPTS   = -O3 -no-prec-div -axAVX,SSE4.2,SSE4.1,SSE3,SSSE3,SSE2
   FFTWPATH     = -L/usr/local/
   FFTWLIB      = $(FFTWPATH)/lib -lfftw -lfftw_mpi
   FFTWINCLUDE  = $(HOME)/fftw-2.1.5/fortran
   MKLPATH      = /opt/intel/mkl/lib/intel64
   TESTSCRIPT = make check-parallel
6. Copy mk file
  A) ALL case, but low calculation speed.
    cp flavor_cplx.mk flavor.mk
  B) (a system with inversion symmetry about the origin) case
    cp flavor_real.mk  flavor.mk
7. make
  A) 1 cpu calculation
    make all
  B) mpi(multi core{cpu}) calculation
    make -j all-flavors or make -j all-j

test1
1. cd examples/EPM/silicon
2. script_0.sh (add the k-points to EPM input files)
3. script_1.sh (create symbolic links)
4. script_2.sh (generate wavefunction files)
5. script_3.sh (calculate epsilon, sigma, kernel and absorption)

□ Compiling pw2bgw (for PWscf version 4.3.2)
1. cd $HOME/espresso-4.3.2
2. $HOME/BerkeleyGW/MeanField/ESPRESSO/install.sh

test2
1. cd BerkeleyGW/examples/DFT/Si2_bs
2. gedit script
  1) for PWscf 5.0.2
    MPI_CMD="mpirun -np 4"
    SCRATCH=$HOME
    PW_EXEC="$SCRATCH/espresso-5.0/bin/pw.x"
    PW2BGW_EXEC="$SCRATCH/espresso-5.0/bin/pw2bgw.x"
    EPSILON_EXEC="$SCRATCH/BerkeleyGW/Epsilon/epsilon.real.x"
    SIGMA_EXEC="$SCRATCH/BerkeleyGW/Sigma/sigma.real.x"
    EQP_SCRIPT="$SCRATCH/BerkeleyGW/bin/eqp.py"
    INTEQP_EXEC="$SCRATCH/BerkeleyGW/BSE/inteqp.real.x"
    cd $SCRATCH/BerkeleyGW/examples/DFT/Si2_bs
  2) for PWscf 4.3.2 (not successful)
  If you want to run them with Quantum ESPRESSO 4.3.2 or earlier version, you should modify the input files for pw.x.
    Change "calculation = 'bands'" to "calculation = 'nscf'" and "CELL_PARAMETERS" to "CELL_PARAMETERS cubic" in Si2.wfn.in, Si2.wfnq.in, Si2.wfn_inner.in and Si2.kpath.in, except Si2.scf.in.
    MPI_CMD="mpirun -np 4"
    SCRATCH=$HOME
    PW_EXEC="$SCRATCH/espresso-4.3.2/bin/pw.x"
    PW2BGW_EXEC="$SCRATCH/espresso-4.3.2/bin/pw2bgw.x"
    EPSILON_EXEC="$SCRATCH/BerkeleyGW/Epsilon/epsilon.real.x"
    SIGMA_EXEC="$SCRATCH/BerkeleyGW/Sigma/sigma.real.x"
    EQP_SCRIPT="$SCRATCH/BerkeleyGW/bin/eqp.py"
    INTEQP_EXEC="$SCRATCH/BerkeleyGW/BSE/inteqp.real.x"
    cd $SCRATCH/BerkeleyGW/examples/DFT/Si2_bs
3. ./script
-------------------------------------------------------------------------------
■ kgrid
1. cd $HOME/BerkeleyGW/examples/DFT/silicon/ESPRESSO/00-kgrid
2. kgrid.inp ( = WFN.in, WFNq.in, WFN_co.in, WFN_fi.in and WFNq_fi.in )
---------------
5 5 5                  ! numbers of k-points along b1,b2,b3
0.5 0.5 0.5            ! k-grid offset (0.0 unshifted, 0.5 shifted by half a grid step)
0.0 0.0 0.001          ! a small q-shift (0.0 unshifted(for WFN.in), 0.001 shifted(for WFNq.in) by one 1000th of b3)

0.0 0.5 0.5            ! lattice vectors in Cartesian coordinates (x,y,z)
0.5 0.0 0.5            ! in units of the lattice parameter
0.5 0.5 0.0            !
2                      ! number of atoms in the unit cell
1 -0.125 -0.125 -0.125 ! atomic species and positions in Cartesian coordinates (x,y,z)
1  0.125  0.125  0.125 ! in units of the lattice parameter
24 24 24                  ! size of FFT grid
.false.                ! turn off time-reversal symmetry for BerkeleyGW
.false.                ! OPTIONAL: k-points in the log file are in Cartesian coordinates
---------------
3. ./script_0

(1) wfn: 5x5x5, half a grid shift
(2) wfnq: 5x5x5, half a grid shift+small q_0 shift
(3) wfn_co: 5x5x5, zero shift
In the above, can I use the same k points for wfn and wfn_co calculations, i.e., 5x5x5 k-grid with zero shift for wfn?
Yes, you can use the same grid for (1) wfn and (3) wfn_co so long as the grid is unshifted. An unshifted grid is currently required for the BSE kernel calculations, wfn_co (this requirement ensures we have dielectric matrix in epsmat that we will need). [9]
(4) wfn_fi: 5x5x5, zero shift
(5) wfnq_fi: 5x5x5, zero shift

■ PWscf -> BerkeleyGW
□ Input file ( except I) case, show changing point)
A) case.scf.in ( cif2cell -> abinit2pw.plx -> PWgui -> change and add keyword)
  tstress = .true.
  tprnfor = .true.
  nbnd = 4 (<-see number of electrons in output file or calculate UPF files. see z_valence in hgh or, Zval or valence in case.scf.out)
  diago_full_acc = .true. ( <- need ?)
  K_POINTS automatic
  5 5 5 1 1 1
B) case.wfn.in ( almost same  as case.scf.in )
  calculation = 'nscf'
  nbnd = 30 (<- the value is about 7 times bigger than the nbnd in case.scf.in)
  startingwfc = 'random'
  CELL_PARAMETERS cubic
  ( and copy WFN.out data)
C) case.wfn.pp.in ( pw2bgw input file )
  &input_pw2bgw
    prefix = 'pwscf'
    real_or_complex = 1 (<- 1: real, 2: complex. default: 2 )
    wfng_flag = .true.
    wfng_kgrid = .true.
    wfng_nk1 = 5
    wfng_nk2 = 5
    wfng_nk3 = 5
    wfng_dk1 = 0.5
    wfng_dk2 = 0.5
    wfng_dk3 = 0.5
  /
D) case.wfnq.in ( almost same  as case.wfn.in )
  wf_collect = .true. (<-default)
  tstress = .false. (<-default)
  tprnfor = .false. (<-default)
  nbnd = 4 (<- same as case.scf.in )
  ( and copy WFNq.out data)
E) case.wfnq.pp.in ( pw2bgw input file, almost same  as case.wfn.pp.in )
   wfng_file = 'WFNq'
   wfng_nk1 = 5
   wfng_nk2 = 5
   wfng_nk3 = 5
   wfng_dk1 = 0.5
   wfng_dk2 = 0.5
   wfng_dk3 = 0.505   (<-! + a small q-shift (0.0 unshifted, 0.001 shifted by one 1000th of b3)*wfng_nk3)
F) case.wfn_inner.in ( almost same  as case.wfn.in or wfn_co)
  nbnd = 33 (<- the value is about 1.1 times bigger than the nbnd in case.wfn.in)
  ( and copy WFN_co.out data)
G) case.wfn_inner.pp.in ( pw2bgw input file, almost same  as case.wfn.pp.in )
  wfng_file = 'WFN_inner'
  rhog_flag = .true.
  vxc_flag = .true.
  vxc_diag_nmin = 1 (minimum band index for diagonal Vxc matrix elements. e.g. 1)
  vxc_diag_nmax = 15 (maximum band index for daigonal Vxc matrix elements. e.g. nbnd in case.kpath.in, related number of band in sigma calculation)
    wfng_nk1 = 5
    wfng_nk2 = 5
    wfng_nk3 = 5
    wfng_dk1 = 0.0
    wfng_dk2 = 0.0
    wfng_dk3 = 0.0
H) case.kpath.in ( almost same  as case.wfn.in )
  wf_collect = .true.
  tstress = .false.
  tprnfor = .false.
  nbnd = 15 (<- the value is more than half of the nbnd in case.wfn.in)
  ( and copy WFN_fi.out data)
I) case.kpath.pp.in ( pw2bgw input file, almost same  as case.wfn_inner.pp.in )
  prefix = 'pwscf'
  real_or_complex = 1
  wfng_flag = .true.
  wfng_file = 'WFN_fi'
J) epsilon.inp[3, 4, 10] (The requested number of valence bands is available in WFN. kgrids for WFN and WFNq must be the same. Need match for rqq point:   X.XXXX Y.YYYY Z.ZZZZ in file WFN or WFNq)
  (use WFN_co.out and change last row to 1.0, then add 0 or 1(for 0.0 0.0 0.001) to last row in epsilon.inp, respectively)
  epsilon_cutoff 10.0 (<- 10/25 of the ecutwfc in case.scf.in)
  number_bands 29 (<- the value is about 7 times bigger than the nbnd in case.scf.in)
  band_occupation 4*1 25*0 (<- occu.*1 uncoou.*0)
  nmuber_qpoints 10
  begin qpoints
  0.000000000  0.000000000  0.001000000   1.0 1
  0.000000000  0.000000000  0.200000000   1.0 0
  0.000000000  0.000000000  0.400000000   1.0 0
  0.000000000  0.200000000  0.200000000   1.0 0
  0.000000000  0.200000000  0.400000000   1.0 0
  0.000000000  0.200000000  0.600000000   1.0 0
  0.000000000  0.200000000  0.800000000   1.0 0
  0.000000000  0.400000000  0.400000000   1.0 0
  0.000000000  0.400000000  0.600000000   1.0 0
  0.200000000  0.400000000  0.600000000   1.0 0
  end
K) sigma.inp[5] ( Reading WFN_inner. use WFN_co.out and change last row to 1.0)
  screened_coulomb_cutoff 10.0 (<- 10/25 of the ecutwfc in case.scf.in)
  bare_coulomb_cutoff 25.0 (<- about equal to the ecutwfc in case.scf.in)
  number_bands 32
  band_cooupation 4*1 28*0
  band_index_min 1 (<- degeneracy_check.x show # of bands )
  band_index_max 14 (<- degeneracy_check.x show # of bands )
  screening_semiconductor
  mumber_kpoints 10
  begin kpoints
  0.000000000  0.000000000  0.000000000   1.0
  0.000000000  0.000000000  0.200000000   1.0
  0.000000000  0.000000000  0.400000000   1.0
  0.000000000  0.200000000  0.200000000   1.0
  0.000000000  0.200000000  0.400000000   1.0
  0.000000000  0.200000000  0.600000000   1.0
  0.000000000  0.200000000  0.800000000   1.0
  0.000000000  0.400000000  0.400000000   1.0
  0.000000000  0.400000000  0.600000000   1.0
  0.200000000  0.400000000  0.600000000   1.0
  end
  # For metal case, Need to change from screening_semiconductor to screening_metal. 
L) inteqp.inp[6,7] (The requested number of valence bands is available in WFN_fi.)
  number_val_bands_coarse 4 (<- Number of occupied bands on coarse (input) k-point grid)
  number_val_bands_fine 4 (<- Number of occupied bands on fine (interpolated) k-point grid)
  number_cond_bands_coarse 10 (<- Number of unoccupied bands on coarse (input) k-point grid)

  number_cond_bands_fine 10 (<- Number of unoccupied bands on fine (interpolated) k-point grid)
  coarse_grid_points 125
  use_symmetries_coarse_grid
  no_symmetries_fine_grid
  no_symmetries_shifted_grid

----------
From epsilon.inp:[3, 4]
# qx qy qz 1/scale_factor is_q0
# scale_factor is for specifying values such as 1/3
# is_q0 = 1 for a small q-vector in semiconductors
# is_q0 = 2 for a small q-vector in metals
# is_q0 = 0 for non-zero q-vectors
----------
For simga.inp
$HOME/BerkeleyGW/bin/degeneracy_check.x WFN_inner
$HOME/BerkeleyGW/bin/degeneracy_check.x WFN_fi

For example,
Reading eigenvalues from file /home/pc4/BerkeleyGW/examples/DFT/Fe2VAl_bs/WFN_inner
Number of spins:               1
Number of bands:              33
Number of k-points:           10

== Degeneracy-allowed numbers of bands (for epsilon and sigma) ==
           1
           9
          12
          14
          16
          19
          23
          29
Note: cannot assess whether or not highest band     33 is degenerate.

== Degeneracy-allowed numbers of valence bands (for inteqp, kernel, and absorption) ==
           3
          11
          12

== Degeneracy-allowed numbers of conduction bands (for inteqp, kernel, and absorption) ==
           2
           4
           7
          11
          17
Note: cannot assess whether or not highest conduction band     21 is degenerate.
----------
Select from the above number for band_index_min and band_index_max. (number_val_bands_coarse, number_val_bands_fine 4, number_cond_bands_coarse 10 amd number_cond_bands_fine 10, too)

References
[1] http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_PW.html#id3122329
[2] http://stuff.mit.edu/afs/athena/software/espresso_v5.0.1/amd64_linux26/espresso-5.0.1/Doc/INPUT_pw2bgw.html#id224316
[3] http://berkeleygw.org/?q=node/186 
[4] https://github.com/timurbazhirov/BerkeleyGW/blob/master/Visual/Epsilon/epsilon.inp 
[5] https://github.com/timurbazhirov/BerkeleyGW/blob/master/Visual/Sigma/sigma.inp 
[6] https://github.com/timurbazhirov/BerkeleyGW/blob/master/Visual/BSE/inteqp.inp 
[7] https://github.com/timurbazhirov/BerkeleyGW/blob/master/Visual/BSE/absorption.inp 
[8] https://github.com/timurbazhirov/BerkeleyGW/blob/master/Visual/BSE/kernel.inp 
[9] http://berkeleygw.org/?q=node/197
[10] http://berkeleygw.org/?q=node/193

□ modify bash script
1. gedit script
2. Ctrl + H
  exchange from Si2 to $1

■ Run BerkeleyGW
1. cd $HOME/BerkeleyGW/examples/DFT
2. mkdir case_bs
3. put input files and script into case_bs
4. ./script case

■ BoltzTraP (OK?)
1. qe2boltz.py case inteqp 1.0e7 0
2. x_trans BoltzTraP
Usage: C:\Users\\boltztrap-1.2.3\util\qe2boltz.py prefix format efermi nbnd_exclude [fn_pw [fn_energy]]

※ qe2boltz.py を wordpad などで開いて解読すると下記のようになっている。下記のargv[5]とargv[6]はargv[2]でpwを指定した場合、特に入力しなくても良い。
qe2boltz.py argv[1] argv[2] argv[3] argv[4] argv[5] argv[6]
argv[1]: prefixで case.pw.out を入力する(ファイルは case.nscf.out として、prifix に case を指定すればよいだろう)
argv[2]: pw, bands or inteqp のいずれかを選択するために指定。通常 pw、BerkeleyGWでは inteqp を指定。
argv[3]: efermi (eV) に対応する。入力した値をプログラム中でrydberg で割って処理している。1.0e6を超える場合は、prefix で指定したファイルから読み込まれる。「the Fermi energy is」または「highest occupied, lowest unoccupied level (ev): 」の行に書かれている値を用いる。後者の場合は (highest +lowest)/2/Ry としてプログラム中で処理される。
argv[4]: nband_excludeに対応する。0を指定すればよい。もし、計算時間を短くしたい場合は、バンドの番号を入力すると、低いエネルギーから入力したバンドの番号までが除かれる。
argv[5]: fname_pw または fn_pw で ディフォルトは prefix.nscf.out になっている。
argv[6]: fname_energy またはfn_energy
出力ファイルは、argv[1].intarns などとして出力される。
-------------------------------------------------------------------------------
■ absorption calculation
1. cd $HOME/BerkeleyGW/examples/DFT/silicon/ESPRESSO/00-kgrid
2. ./script_0 (<- make WFN file series)
3. ./script_1 (<- make link)
4. ./script_2 (<- scf and pw2bgw calculation)
5. cd ..
6. ./script_3 (<- epsilon, sigma, kernel and absorption calculation)
-------------------------------------------------------------------------------
■ GW (PWscf)
References
[1] http://www.quantum-espresso.org/wp-content/uploads/2013/06/tutorial_gwl.pdf
-------------------------------------------------------------------------------
■ Appendix: Abinit GW calculation
1. VESTA -> cif files
2. cif2cell -p abinit -f cif
3. gedit case.in
ndtset 3

nbandkss1 -1
nband1 58

optdriver2 3
getkss2 -1
nband2 58
ecutwfn2 30.0
ecuteps2 7.0
ppmfrq2 16.7 eV
awtr2 0

optdriver3 4
getkss3 -2
getscr3 -1
nband3 58
ecutwfn3 30.0
ecutsigx3 30.0
nkptgw3 1
kptgw3
0.0 0.0 0.125
bdgw3 47 48

ngkpt 4 4 4
nshiftk 4
shiftk 0.5 0.5 0.5
0.5 0.0 0.0
0.0 0.5 0.0
0.0 0.0 0.5
istwfk *1
symmorphi 0
ecut 30
diemac 12.0
#iscf 5
toldfe 1.0d-6

chkprim 0

acell ...(cif2cell make data)
4. export OMP_NUM_THREADS=4
5. abinit < case.files > case.log
-------------------------------------------------------------------------------
■ Appendix: VASP GW calculation
References
[1] http://cms.mpi.univie.ac.at/wiki/index.php/VASP_example_calculations
[2] http://cms.mpi.univie.ac.at/wiki/index.php/GW_calculations
[3] http://cms.mpi.univie.ac.at/vasp/vasp/ALGO_response_functions_GW_calculations.html
[4] http://www.vasp.at/mmars/day2.pdf
[5] http://ja.scribd.com/doc/24155624/GW-approximation-and-its-implementation-in-VASP

-------------------------------------------------------------------------------


QRコード
携帯用QRコード
アクセス数
ページビュー数