28
Spring School First-principles Computational Material Research Introductory Level (2006) Lecture Notes Hands-on session 2 Lecturer : T. C. Leung Department of Physics National Chung Cheng University

Spring School - image.sciencenet.cnimage.sciencenet.cn/olddata/kexue.com.cn/bbs/... · Home work P. 2 Day 1 : 1. Calculate the lattice constant, density of state, band structure of

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

  • Spring SchoolFirst-principles Computational

    Material Research Introductory Level (2006)

    Lecture Notes

    Hands-on session 2

    Lecturer : T. C. LeungDepartment of Physics

    National Chung Cheng University

  • P. 1Band decomposed charge densityThe partial decomposed charge density can be calculated only if a preconverged WAVECAR file exists.

    Evaluate partial decomposed charge densityLPARD

    IBAND

    KPUSE

    LPARD = .TRUE.

    Which bands are evaluatedIBAND = 20 23

    Which k points are evaluatedKPUSE = 11 13

    LSEPB = .TRUE. PARCHG.nb.*LSEPB = .FALSE. PARCHG.ALLB.* or PARCHG (default)LSEPB

    Specifies the energy range of the bands that are used. Two real values should be given, if only one value is specified, the second one is set to Ef ( for STM image ) .

    EINT

    Used only if IBAND is not specifiedMBMODMBMOD = 0 all bands are usedMBMOD = -1 all bands below Fermi level are usedMBMOD = -2 all bands within EINTMBMOD = -3 same as before, but the energy range is given vs. Fermi energy

  • P. 2Home workDay 1 :

    1. Calculate the lattice constant, density of state, band structure of bcc W.Check the convergence of no. of K-points and Ecut.

    2. Calculate the lattice constant, density of state, magnetic moment, and band structure of fcc Ni .

    Check the convergence of no. of K-points and Ecut.

    Day 2 :

    1. Calculate the surface relaxation, surface energy, and work function for W(001) using 1, 3, and 5 layers of W.

    2. Calculate the bond length and binding energy of O2 .Isolated atom or molecule use a box ( see example in CO )

  • Surface:

    K-poionts 10x10x1Vacuum thickness =10 A

    layer Workfunction(eV) Surface energy (eV) relax(%) S S-1

    Fe(100)1 4.15925 1.333 3.91489 1.26 -0.575 3.94696 1.29 -2.94 2.04

    W(100)1 5.32552 3.153 4.56204 2.26 -7.965 4.46181 1.79 -11.21 1.83

    P. 3

  • P. 4

  • P. 5vaspview

    How to use vaspview to draw CHGCAR or PARCHG ?% vaspview CHGCAR

  • P. 6CHGCAR

    CHGCAR : store the charge density of the system real space mesh (NGX * NGY * NGZ)

    dia Si CCA PAW5.4645000000000000.000000 0.500000 0.5000000.500000 0.000000 0.5000000.500000 0.500000 0.000000

    2Direct0.000000 0.000000 0.0000000.250000 0.250000 0.250000

    24 24 24-.78205781949E+01 -.46898654716E+01 0.29233666450E+01 0.11001033353E+02 0.16054056761E+020.17049204419E+02 0.15312206577E+02 0.12884926081E+02 0.10657860695E+02 0.88849453465E+01

    NGX,NGY,NGZ

    ( , , )i j kx y zρ

    Use vaspview to view the structure and the charge density of the system

    %vaspview CHGCAR

  • 附錄

  • P. 1

    Outline

    進入Unit世界

    編輯器vi

    Fortran 77

    xmgrace

    vaspview

    T. C. Leung, National Chung Cheng University

  • P. 2進入Unit世界

    Login:guest account namePassword:******(abcdef) password

    更改密碼 % passwd

    一些常用之指令

    % pwd (顯示現在所在之目錄)/user/leung/lapw/cu

    % cd ../Fe (改變目錄)

    % ls *.f (列出所有 *.f 之 files)

    % ls - l (long list)

  • P. 3% ls - l-rwxrwxrwx 1 users user 4564 Jun11 20:45 lovedr--r----- 2 users user 547 Jun11 22:50 sub/-rw-rw-r-- 1 users user 4135 Jun21 11:20 t1

    u g o owner group 大小 時間 名稱

    % ls-a (將隱藏檔案列出, eg .csrch .login)

    % ls-F (將可執行之檔後加*,目錄加/)love ppd* t1* sub/ test/

    % chmod u+x filename 0 000 ---1 001 --x

    2 010 -w-

    3 011 -wx

    4 100 r--

    5 101 r-x

    6 110 rw-

    7 111 rwx

    % chmod 741 filename

  • P. 4% mkdir dname

    % rmdir dname

    % rm filename (刪除filename)

    % mv filename1 filename2 (改名)

    % cp [-i p r ] filename target (複製)i:要確認p:保留原時間r:複製子目錄

    % cat filename (>test)列出filename之內容並將之放入test之中

    % move filename列出filename之內容,每一螢幕停一下

  • P. 5

    % head –n filename將filename之前 n 行列出

    % tail –n filename (>>test)將filename之最後 n 行列出 (並附在 test 後)

    % grep –i string filename

    從filename找出含string之行, 不計大小寫

    % grep ‘total energy’ filename

    % find –name filename –print尋找filename之所在,並列出其路徑

  • P. 6?,*,[ ],{ } ls hw? hw2,hw3,hw4

    ls hw?? hw11,hw12ls hw* hw2,hw3,hw4,hw11,hw12ls hw[2-11] hw2,hw3,hw4,hw11ls hw{2,12} hw2,hw12ls test[a-c] testa,testb,testc

    alias la ls-a ; alias ch1 ‘cd /usr/john ; ls-l’alias rm ‘rm –i’;alias hm ‘history | more ’

    alias

    Unalias ch1unalias

    欲看目前已有之別名定義,可鍵入alias

  • P. 7編輯器vi

    % vi filename

    There are 2 modes in vi editor : (1) insert mode, (2) command mode

    insert mode (鍵入字元(內容))i,a,o,I,A,O

    command mode (執行命令)ESC

    h( ), j( ), k( ), l( )

    nG 到第n行G 到最後一行^g 顯示游標所在之行數^f 視窗下移一螢幕^b 視窗上移一螢幕

  • P. 8

    x 刪除游標所在之字元dd 刪除一行ndd 刪除n行u undo上一命令p,P 貼回/string 找字串:q! quit:zz 存檔(原名):w! filename 存檔為filename :set ic 忽略大小寫:set nu 列出行數:1,$ s/string1/string2/g 更改字串:n1,n2 w! filename 將n1到n2行寫入:r filename 讀入filename

  • P. 9Fortran 77

    integer : single precision 2 Bytes (16 bits)

    double precision 4 bytes ( 32 bits )±-------------------------1 15( )15 1532767 2 1 2 1± − → − +

    ( )31 312147483647 2 1 2 1± − → − +

    real : single precision 4 Bytes (32 bits)

    ±1 23 8

    指數有效位數為 6~8

    38 38min :1.18 10 max : 3.4 10−× ×

    double precision 8 Bytes (64 bits)308 308min : 2.23 10 max :1.79 10−× ×有效位數為 15~16 ;

    character : 用 1 Byte (8bits 27-1 = 127 ) 代表一個字元( A,B,…,Z,a,b,c, … ,z,1,2,3, … ,*,?, … )

  • P. 10Array : A(100) , B(100,10) , IX(10,10,10)

    Dimension A(100) , B(100,10) , IX(10,10,10)

    parameter (nk=200)Dimension A(nk,nk) , B(nk,3) , IX(nk,nk,nk)

    ( .eq. .gt. .lt. .le. .ge. .and. .or. )go to n

    do n1 j = 1,100…………..do n2 I = 3,13,2…………..

    n2 continue……………

    n1 contunue

    if (x.eq.y) go to n

    if ( (x .eq. y) .and. (I .gt. J) ) go to n

    if (…) thenA = B……Else…….

    Endif

  • P. 11c _ _ _ _ & ______________________________ 81第1位有c表示本行為描述用途第6位有字表示繼續上一行

    第7位開始至第80位(內容)

    program test

    open (5,file=‘a.dat’)

    open (6,file=‘a.out’)

    read (5,1) x

    1 format (F10.5)

    y=2*x*cos(x)write(6,1) x

    stop

    end

    real variable: a-h , o - z integer variables: I,J,K,L,M,Nimplicit real*8 (a-h,o-z)

    +,-,*,/,**,cos(x),tan(x),sin(x)exp(x),log(x),abs(x),…mod(50,3)=2 (餘數)3F10.5 , 2a5 , E12.3 , 6x , 4I5 2(F10.5,2x,3I4), 2(2I4\\, ‘x=’,F10.5)

    % fort77 –o a.x a.f% a.x

  • P. 12program examplecommon /aa/ x,ycommon /ab/ b…….if ( a .eq. b ) go to 10call xxx (a,b,c)

    10 z=pot(a)**2+3.5……stopendsubroutine xxx (a,b,c)common /aa/ x,y……..return endFuction pot(x)common /ab/ b

    pot=x**2+3.0*breturnend

  • P. 13

    3. Pseudopotential Approximation

    3-1. Norm-Conservating Pseudopotentials

    3-2. Ultrasoft Pseudopotential

    3-3 APW Method

  • P. 143-1. Norm-Conservating Pseudopotentials

    The pseudopotential have the following properties( ) ( )ps allε ε=

    D. R. Hamann, M. Schluter, and C. Chiang Phy. Rev. Lett. 43, 1494 (1979)

    ( ) ( )( ) ( )ps all cr r for r rΨ = Ψ >

    1.

    2.

    Norm conservation for r > rc3.

    4. The logarithmic derivatives of the real and pseudo wave function agree for r > rc

    ′ΨΨ Logarithmic derivatives

  • How to construct the pseudopotential ?

    (a) Choose a cutoff function to construct 1psV

    1 [1 ( / )] ( ) ( / )ps

    c cV f r r V r C f r r= − +

    P. 15

    where

    1 ( ) ( )ps

    cV r V r for r r= >

    1 1; ( )C wavefn w rAdjust ε ε⇒ =

    ( )( ) ( )all cu r r for r r= Ψ >

    1( ) ( )u r w rγ=

    4

    10( )

    1 0 ( )xfor x

    f xfor x e−

    >⎧= ⎨

    →⎩

    (b)

  • P. 16(c) Choose a cutoff function to modify ul(r)

    Such that

    2 210

    [ ( / )] 1cw g r r drγ δ∞

    + =∫

    2 1[ ( / )]cw w g r rγ δ= +

    (d) Use 2 , ( )psw to construct V rε

    41 1

    0 1( )

    0 ( )xfor x

    g xx for x x e+ + −

    >⎧⎪=⎨→⎪⎩

  • P. 17

  • P. 183-2. Ultrasoft Pseudopotential

    在許多情況 (1s ,2p ,3d ) Norm-Conservating Pseudopotentials並無法找出比全電子位勢之波函數更平緩的波函數。

    圖:氧之 2p 電子之 r 方向波函數,所示分別為全電子位勢(實線),虛位勢(點線)以及超軟虛位勢(虛線)所產生之波函數。

    David Vanderbilt Phys. Rev. B 41 , 7892 (1990)

  • P. 19

    超軟虛位勢方法 (Ultrasoft Pseudopotential)跳過修改全電子位勢而直接修改波函數,用以產生一個非局部之虛位勢。

    *

    , ,( ) ( ) ( ) ( )nk nk ij ji

    n k i jr r r Q rρ φ φ ρ∑ ∑= +

    其中

    ,

    * *( ) ( ) ( ) ( ) ( )

    ij i nk nk jn k

    ij i j i jQ r r r r r

    ρ β φ φ β

    ψ ψ φ φ

    =

    = −

  • P. 20