Header Ads Widget

Ab initio Calculations Using Wien2k Code

Last Posts

10/recent/ticker-posts

Practicing the supercell tool

Exercise 4: Creation of supercells

Reference http://susi.theochem.tuwien.ac.at/events/ws2017/notes/tutorial-Basic-exercises.pdf




These exercises should be done WITHOUT w2web in a terminal window !




1- Creation of basic structure: MgO




mkdir super; cd super;



makestruct (and type in the following information). It creates
 

init.struct




MgO: lattice type: F, a= 7.96 bohr



Mg (0,0,0), O (0.5,0.5, 0.5)



cp init.struct super.struct



view the structure using: xcrysden --wien_struct init.struct



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

 wadha@linux-57qi:~/Tutorials/ mkdir super

 wadha@linux-57qi:~/Tutorials/ cd super

 wadha@linux-57qi:~/Tutorials/super> 

 
 wadha@linux-57qi:~/Tutorials/ makestruct


************************************************
*                                              *
**********   Terminal struct maker    **********
********** (C) 2012 by Morteza Jamal  **********
*                                              *
************************************************
TITLE :MgO

 This Program accepts a SPACE GROUP  (symbol or number)   or a
                        LATTICE TYPE (P, F, B, H, R, CXY, CXZ, CYZ ).
 But, with LATTICE TYPE YOU HAVE TO put in all the atomic positions by hand.

Would you like to enter  Spacegroup or Lattice (S/L)(def=S)? L
LATTICE TYPE: F

Units of lattice parameters (Bohr/Angstrom) (b/A) (def=ANG):b
Lattice PARAMETERS as a b c (3 numbers):7.96 7.96 7.96
ANGLES BETWEEN lattice vectors, as alpha beta gamma (def=90.0 90.0 90.0): Enter
NUMBER INEQUEVALENT ATOMS :2
ATOM  1 (ELEMENT): Mg
NUMBER OF EQUIVALENT ATOMS (MULT) OF Mg : Enter
POSITION OF ATOM Mg-1 as X,Y,Z (def=0 0 0) : Enter
ATOM  2 (ELEMENT): O
NUMBER OF EQUIVALENT ATOMS (MULT) OF O : Enter
POSITION OF ATOM O-1 as X,Y,Z (def=0 0 0) :0.5,0.5,0.5

 Now, 'datastruct' file is ready.
We Run 'Tmaker' for making WIEN2k struct file.


 'init.struct' file is ready

SETTING UP SPHERE RadII:
SPECIFY possible REDUCTION of SPHERE RADII in % (def=0)
10
 specify nn-bondlength factor: (usually=2) [and optionally dlimit, dstmax (about
  1.d-5, 20)]
 DSTMAX:   20.0000000000000    
 iix,iiy,iiz           5           5           5   39.8000000000000    
   39.8000000000000        39.8000000000000    

   ERROR !!!!!!!!!!!!!!!
 RMT(  1)=2.00000 AND RMT(  2)=2.00000
 SUMS TO 4.00000 GT NNN-DIST= 3.98000

   ERROR !!!!!!!!!!!!!!!
 RMT(  2)=2.00000 AND RMT(  1)=2.00000
 SUMS TO 4.00000 GT NNN-DIST= 3.98000
NN ENDS
0.001u 0.001s 0:00.00 0.0%      0+0k 0+32io 0pf+0w
atom  Z   RMT-max   RMT
 1  12.0  1.78   1.78 
 2   8.0  1.78   1.78 
file    init.struct_setrmt   generated 
rerun setrmt ?(y,N) (def=N):
y
SETTING UP SPHERE RadII:
SPECIFY possible REDUCTION of SPHERE RADII in % (def=0)
10
 specify nn-bondlength factor: (usually=2) [and optionally dlimit, dstmax (about
  1.d-5, 20)]
 DSTMAX:   20.0000000000000    
 iix,iiy,iiz           5           5           5   39.8000000000000    
   39.8000000000000        39.8000000000000    

    ATOM  1  Mg         ATOM  2  O        
 RMT(  1)=1.78000 AND RMT(  2)=1.78000
 SUMS TO 3.56000  LT.  NN-DIST= 3.98000

    ATOM  2  O          ATOM  1  Mg       
 RMT(  2)=1.78000 AND RMT(  1)=1.78000
 SUMS TO 3.56000  LT.  NN-DIST= 3.98000
NN ENDS
0.000u 0.002s 0:00.00 0.0%      0+0k 0+32io 0pf+0w
atom  Z   RMT-max   RMT
 1  12.0  1.78   1.78 
 2   8.0  1.78   1.78 
file    init.struct_setrmt   generated 
rerun setrmt ?(y,N) (def=N):
n
The file   init.struct   has been created

  for modifications of your input you can also edit file datastruct and run
  Tmaker / setrmt init -r X    individually


wadha@linux-57qi:~/Tutorials/super> cp init.struct super.struct

wadha@linux-57qi:~/Tutorials/super> xcrysden --wien_struct init.struct


2- 16-atom supercell


x supercell (use super.struct, select 2x2x2 and F-cell):

cp super_super.struct super.struct

edit super.struct and mark first Mg atom as “Mg1”

x nn and
if :WARNINGs appear do the next line:

cp super.struct_nn super.struct; and repeat the “x nn“ step above

x sgroup and view super.outputsgroup
(no errors, but gives you a spacegroup)

how many non-equivalent atoms do you have now ?
view the structure with xcrysden. Now you would
be ready to run i
nit_lapw -b ....,
but we just save it using
cp super.struct super_16.struct

           -----------------------------------------------------------
wadha@linux-57qi:~/Tutorials/super> x supercell
 Program generates supercell from a WIEN struct file.

 Filename of struct file:
super.struct

 Number of cells in x direction:
2
 Number of cells in y direction:
2
 Number of cells in z direction:
2
 Optional shift all atoms by the same amount (fractional coordinates).
 Please enter x shift:

0

 Please enter y shift:
0
 Please enter z shift:
0

 Current structure has lattice type F  
 Enter your target lattice type: (P,B,F)
F
 Target lattice type will be F  

 Supercell generated sucessfully.
 Stored in struct file: super_super.struct                                     
              
 You may need to replace an atom by an impurity or distort the positions, ....
0.001u 0.002s 1:15.51 0.0%      0+0k 0+32io 0pf+0w

wadha@linux-57qi:~/Tutorials/super> cp super_super.struct super.struct
wadha@linux-57qi:~/Tutorials/super> kwrite super.struct
wadha@linux-57qi:~/Tutorials/super> x nn
wadha@linux-57qi:~/Tutorials/super> x sgroup
wadha@linux-57qi:~/Tutorials/super> view super.outputsgroup

 warning: !!! Number of inequivalent atoms has changed.
         !!! Old value= 16     New value= 5

warning: !!! Struct file is not consistent with space group found.

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

Bravais lattice: Cubic all faces centred

     a             b            c
 15.92000000    15.92000000   15.92000000
     alpha         beta         gamma
 90.00000000    90.00000000   90.00000000


===== Decomposition of new basis vectors over input basis =====
 0.000000   1.000000  0.000000  <--- 1
 0.000000   0.000000  1.000000  <--- 2
 1.000000   0.000000  0.000000  <--- 3

==== Number of atoms in cell (only atoms of primitive cell): 16
==== Atom positions (only atoms of primitive cell):

 0.00000000   0.00000000  0.00000000
 Mg1

 0.50000000   0.00000000  0.00000000
 Mg
 0.25000000   0.00000000  0.25000000
 Mg
 0.75000000   0.00000000  0.25000000
 Mg
 0.25000000   0.25000000  0.00000000
 Mg
 0.25000000   0.75000000  0.00000000
 Mg
 0.00000000   0.25000000  0.25000000
 Mg
 0.00000000   0.25000000  0.75000000
 Mg



        ---------------------------- The same thing as for 32 and 64-atom supercell--------


32, 64 and 128-atom supercells(as above, but with B, P cell or 4x4x4-F)

cp init.struct super.struct

x supercell (usesuper.struct, ...):

cp super_super.struct super.struct

edit super.struct and mark first Mg atom as “Mg1

x nn and
if :WARNINGs appear do the next line:

cp super.struct_nn super.struct; and repeat the “x nn“ step above

x sgroup and view super.outputsgroup
(no errors, but gives you a spacegroup)

how many non-equivalent atoms do you have now ?
view the structure with xcrysden. Now you would
be ready to run i
nit_lapw -b ...., (see eg. lecture on XANES spectroscopy)

save the structures using
cp super.struct super_32.struct

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


3- Creating vacation or impurity

Instead of labelling “Mg1”, one could also remove an atom (vacancy) or replace an atom by another (impurity).



Replacing atoms is better done in w2web, because this will also update radial meshes. (change name of atom AND remove Z !!)



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

 4- Creation of surface slabs, relax it

wadha@linux-57qi:~/Tutorials> mkdir 001
wadha@linux-57qi:~/Tutorials> cd 001
wadha@linux-57qi:~/Tutorials/001>

copy the ftruct file created init.struct to this repertory

wadha@linux-57qi:~/Tutorials/001> ls
init.struct
wadha@linux-57qi:~/Tutorials/001> cp init.struct 001.struct
wadha@linux-57qi:~/Tutorials/001> ls
001.struct  init.struct
wadha@linux-57qi:~/Tutorials/001> x supercell
 Program generates supercell from a WIEN struct file.

 Filename of struct file:
001.struct

 Number of cells in x direction:
1
 Number of cells in y direction:
1
 Number of cells in z direction:
5
 Optional shift all atoms by the same amount (fractional coordinates).
 Please enter x shift:
0
 Please enter y shift:
0
 Please enter z shift:
0

 Current structure has lattice type F  
 Target lattice type will be P  

 Add vacuum in x-direction for surface-slab [bohr]:
0
 Add vacuum in y-direction for surface-slab [bohr]:
0
 Add vacuum in z-direction for surface slab [bohr]:
30
 Repeat atoms at z=0 at the top (y/n)
y
                                                                                                         
 Supercell generated sucessfully.                                                                        
 Stored in struct file: 001_super.struct                                       
              
 You may need to replace an atom by an impurity or distort the positions, ....
0.002u 0.002s 0:48.37 0.0%      0+0k 0+64io 0pf+0w
wadha@linux-57qi:~/Tutorials/001> cp 001_super.struct 001.struct
wadha@linux-57qi:~/Tutorials/001> xcrysden --wien_struct 001_super.struct   
wadha@linux-57qi:~/Tutorials/001> x sgroup
wadha@linux-57qi:~/Tutorials/001> view 001.outputsgroup

warning: !!! Number of inequivalent atoms has changed.
         !!! Old value= 44     New value= 12

warning: !!! Unit cell has been reduced.

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

Bravais lattice: Tetragonal primitive

     a             b            c
 5.62856998    5.62856998   69.80000000
     alpha         beta         gamma
 90.00000000    90.00000000   90.00000000


===== Decomposition of new basis vectors over input basis =====
 0.500000  -0.500000  0.000000  <--- 1
 0.500000   0.500000  0.000000  <--- 2
 0.000000   0.000000  1.000000  <--- 3

==== Number of atoms in cell: 22
==== Atom positions:

 0.50000000   0.50000000  0.21489971
 Mg
 0.50000000   0.50000000  0.78510028
 Mg
 0.50000000   0.50000000  0.44297994
 Mg
 0.50000000   0.50000000  0.55702005
 Mg
 0.50000000   0.50000000  0.67106017
 Mg
 0.50000000   0.50000000  0.32893983
 Mg
 0.00000000   0.00000000  0.27191978
 Mg
 0.00000000   0.00000000  0.72808023
 Mg
 0.00000000   0.00000000  0.50000000
 Mg
"001.outputsgroup" [lecture-seule] 501L, 10562C                                         1,1          Haut


wadha@linux-57qi:~/Tutorials/001> cp 001.struct_sgroup 001.struct

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

what has sgroup done ?? how many total and non-equivalent atoms and how many atoms/layer

do you have before/after sgroup ?

Do you have inversion symmetry ?



save the structure using

cp 001.struct start_surface-001.struc

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

wadha@linux-57qi:~/Tutorials/001> cp 001.struct start_surface-001.struc

wadha@linux-57qi:~/Tutorials/001> init_lapw –b –numk 10 -fermit 0.002

wadha@linux-57qi:~/Tutorials/001> run_lapw –fc 10

# observe the forces in scf-file, what relaxation do you expect

wadha@linux-57qi:~/Tutorials/001> save_lapw unrelaxed

wadha@linux-57qi:~/Tutorials/001> run_lapw –min –fc 1

 # minimizes forces by optimizing positions

 while running, edit 001.inM and increase tolf to 5;


wadha@linux-57qi:~/Tutorials/001> save_lapw relaxed

How much have the surface and sub-surface atoms relaxed 










Post a Comment

1 Comments

  1. Is it necessary to accept the "Use struct-file generated by sgroup?" or I can select No. Hand Please also tell me How I can get lattice parameters from Birch-Murnaghan fitting.

    ReplyDelete