Response function 2 with GaN

Phonons, DFPT, electron-phonon, electric-field response, mechanical response…

Moderators: mverstra, joaocarloscabreu

Locked
roginovicci
Posts: 75
Joined: Thu Dec 02, 2010 10:36 pm

Response function 2 with GaN

Post by roginovicci » Tue Mar 15, 2011 10:20 pm

Hello, I'm trying to perform response function 2 calculations on GaN. I'm stack in the step 4. Here is input file for anadb program:
ganrf2_4.in

Code: Select all

!Input file for the anaddb code. Analysis of the AlAs DDB                                                   
                                                                                                           
!Flags                                                                                                     
 ifcflag   1     ! Interatomic force constant flag                                                         
                                                                                                           
!Wavevector grid number 1 (coarse grid, from DDB)                                                           
  brav    4      ! Bravais Lattice : 1-S.C., 2-F.C., 3-B.C., 4-Hex.)                                       
  ngqpt   5  5  4   ! Monkhorst-Pack indices. Same as ngkpt?                                               
  nqshft  1         ! number of q-points in repeated basic q-cell                                           
  q1shft  3*0.0                                                                                             
                                                                                                           
!Effective charges                                                                                         
     asr   1     ! Acoustic Sum Rule. 1 => imposed asymetrically                                           
  chneut   1     ! Charge neutrality requirement for effective charges.                                     
                                                                                                           
!Interatomic force constant info                                                                           
  dipdip  0      ! Dipole-dipole interaction treatment                                                     
  ifcana  1      ! Analysis of the IFCs                                                                     
  ifcout 12      ! Number of IFC's written in the output, per atom                                         
  natifc  1      ! Number of atoms in the cell for which ifc's are analysed                                 
   atifc  1      ! List of atoms                                                                           
                                                                                                           
# This line added when defaults were changed (v5.3) to keep the previous, old behaviour                     
  symdynmat 0

and here is ganrf2_4.files:

Code: Select all

ganrf2_4.in                                                                                                 
ganrf2_4.out                                                                                               
ganrf2_3.ddb.out                                                                                           
ganrf2_4_band2eps                                                                                           
ganrf2_dummy1                                                                                               
ganrf2_dummy2                                                                                               
ganrf2_dummy3 

and log file has such a wierd comments like:

gtblk9 : COMMENT -
The blok 1 does not match the requirement
because it lacks the element with
idir1,ipert1,idir2,ipert2,index= 1 3 1 3 187

and finally a have error:
symdm9 : ERROR -
Informations are missing in the DDB.
In blok 1 the following element is missing :
idir1,ipert1,idir2,ipert2= 1 3 1 3
Action : add the required information in the DDB,
or modify your input file.

Could you please give me any help please. I am stuck :cry:

User avatar
jzwanzig
Posts: 504
Joined: Mon Aug 17, 2009 9:25 am

Re: Response function 2 with GaN

Post by jzwanzig » Wed Mar 16, 2011 11:35 am

You need to also post your abinit input file in addition to the anaddb input file.
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com

roginovicci
Posts: 75
Joined: Thu Dec 02, 2010 10:36 pm

Re: Response function 2 with GaN

Post by roginovicci » Wed Mar 16, 2011 1:55 pm

Dear jzwanzig, Thank you for the reply. The input file is as follows:

Code: Select all

# Crystalline GaN : computation of the phonon spectrum                                                
ndtset   17                                                                                           
#chksymbreak=0                                                                                       
#Set 1 : ground state self-consistency                                                               
  getwfk1   0            # Cancel default                                                             
  kptopt1   1            # Automatic generation of k points, taking                                   
                         # into account the symmetry                                                 
  nqpt1   0              # Cancel default                                                             
  tolvrs1   1.0d-18      # SCF stopping criterion (modify default)                                   
  rfphon1   0            # Cancel default                                                             
                                                                                                     
#Q vectors for all datasets                                                                           
                                                                                                     
#Complete set of symmetry-inequivalent qpt chosen to be commensurate                                 
# with kpt mesh so that only one set of GS wave functions is needed.                                 
#Generated automatically by running GS calculation with kptopt=1,                                     
# nshift=0, shiftk=0 0 0 (to include gamma) and taking output kpt set                                 
# file as qpt set. Set nstep=1 so only one iteration runs.                                           
                                                                                                     
     nqpt   1            # One qpt for each dataset (only 0 or 1 allowed)                             
                         # This is the default for all datasets and must                             
                         #  be explicitly turned off for dataset 1.                                   
   qpt2   0.00000000E+00  0.00000000E+00  0.00000000E+00                                             
   qpt3   0.00000000E+00  0.00000000E+00  0.00000000E+00                                             
   qpt4   2.00000000E-01  0.00000000E+00  0.00000000E+00                                             
   qpt5   4.00000000E-01  0.00000000E+00  0.00000000E+00                                             
   qpt6   2.00000000E-01  2.00000000E-01  0.00000000E+00                                             
   qpt7   4.00000000E-01  2.00000000E-01  0.00000000E+00                                             
   qpt8   0.00000000E+00  0.00000000E+00  2.50000000E-01                                             
   qpt9   2.00000000E-01  0.00000000E+00  2.50000000E-01                                             
   qpt10  4.00000000E-01  0.00000000E+00  2.50000000E-01                                             
   qpt11  2.00000000E-01  2.00000000E-01  2.50000000E-01                                             
   qpt12  4.00000000E-01  2.00000000E-01  2.50000000E-01                                             
   qpt13  0.00000000E+00  0.00000000E+00  5.00000000E-01                                             
   qpt14  2.00000000E-01  0.00000000E+00  5.00000000E-01                                             
   qpt15  4.00000000E-01  0.00000000E+00  5.00000000E-01                                             
   qpt16  2.00000000E-01  2.00000000E-01  5.00000000E-01
   qpt17  4.00000000E-01  2.00000000E-01  5.00000000E-01                                             
                                                                                                     
#Set 2 : Response function calculation of d/dk wave function                                         
                                                                                                     
  iscf2   -3         # Need this non-self-consistent option for d/dk                                 
  kptopt2   2          # Modify default to use time-reversal symmetry                                 
  rfphon2   0          # Cancel default                                                               
  rfelfd2   2          # Calculate d/dk wave function only                                           
  tolwfr2   1.0d-22    # Use wave function residual criterion instead                                 
                                                                                                     
#Set 3 : Response function calculation of Q=0 phonons and electric field pert.                       
                                                                                                     
  getddk3   2          # d/dk wave functions from last dataset                                       
  kptopt3   2          # Modify default to use time-reversal symmetry                                 
  rfelfd3   3          # Electric-field perturbation response only                                   
#Sets 4-17 : Finite-wave-vector phonon calculations (defaults for all datasets)                       
                                                                                                     
   getwfk   1          # Use GS wave functions from dataset1                                         
   kptopt   3          # Need full k-point set for finite-Q response                                 
   rfphon   1          # Do phonon response                                                           
   rfatpol   1 2        # Treat displacements of all atoms                                           
   rfdir   1 1 1      # Do all directions (symmetry will be used)                                     
   tolvrs   1.0d-12     # This default is active for sets 3-10                                       
#   tolvrs 1.0d-15 set this for precise calculations                                                 
                                                                                                     
#Common input variables                                                                               
# Definition of the unit cell                                                                         
acell 6.0383566806E+00  6.0383566806E+00  9.8430892710E+00                                           
angdeg 90.000  90.000 120.000                                                                         
spgroup 186
# Definition of the atom                                                                             
ntypat 2                 # Two types of atoms                                                         
znucl 31 7               # Ga and N atomic numbers of the                                             
natom 4                  # There are four atoms in a cell                                             
typat 1 1 2 2            # Type 1 is Ga, type 2 is N                                                 
xred                                                                                                 
 3.3333333333E-01  6.6666666667E-01  0.0000000000                                                     
 6.6666666667E-01  3.3333333333E-01  5.0000000000E-01                                                 
 3.3333333333E-01  6.6666666667E-01  3.7662692182E-01                                                 
 6.6666666667E-01  3.3333333333E-01  8.7662692182E-01                                                 
                                                                                                     
## Definition of XC functional and planewave basis set                                               
   ixc       11               # Teter XC functional                                                   
   ecut      35              # Kinetic energy cut-off (in Ha)                                         
   ecutsm    0.5                                                                                     
   dilatmx   1.05                                                                                     
                                                                                                     
# Definition of the k-point grid                                                                     
#   kptopt    1                                                                                       
   shiftk    0.0 0.0 0.5                                                                             
   ngkpt     5 5 4                                                                                   
   nshiftk 1                                                                                         

                                                                                                     
# Parameters of the SCF cycles                                                                       
   iscf      7      # Pulay mixing (default for norm-conserving PSP)                                 
   nstep     100

The qpt vector list i got using the following input file:

Code: Select all

# Definition of the unit cell                                                                         
acell 6.0383566806E+00  6.0383566806E+00  9.8430892710E+00                                           
angdeg 90.000  90.000 120.000                                                                         
spgroup 186                                                                                           
                                                                                                     
# Definition of the atom                                                                             
ntypat 2                 # Two types of atoms                                                         
znucl 31 7               # Ga and N atomic numbers of the                                             
natom 4                  # There are four atoms in a cell                                             
typat 1 1 2 2            # Type 1 is Ga, type 2 is N                                                 
xred                                                                                                 
1/3  2/3  0.0                                                                                         
2/3  1/3  0.5                                                                                         
1/3  2/3  3.7662692182E-01                                                                           
2/3  1/3  8.7662692182E-01                                                                           
                                                                                                     
#Gives the number of band, explicitely (do not take the default)                                     
 nband     8             # Explicit number of valence bands                                           
## Definition of XC functional and planewave basis set                                               
 ixc       11              # Teter XC functional                                                     
 ecut      35              # Kinetic energy cut-off (in Ha)                                           
 ecutsm    0.5                                                                                       
 dilatmx   1.05                                                                                       
                                                                                                     
# Definition of the k-point grid                                                                     
 kptopt    1                                                                                         
 shiftk    0.0 0.0 0.0                                                                               
 ngkpt     5 5 4                                                                                     
 nshiftk 1
 iscf      7      # Pulay mixing (default for norm-conserving PSP)
 tolvrs 1.0d-15
 nstep   1         # Maximal number of SCF cycles                                                 
 nline   1         # Maximal number of SCF cycles

The last gave me output file with the following set:

Code: Select all

...skip...
 -outvars: echo values of variables after computation  --------                                       
            acell    6.0383566806E+00  6.0383566806E+00  9.8430892710E+00 Bohr                       
              amu    6.97230000E+01  1.40067400E+01                                                   
          dilatmx    1.05000000E+00                                                                   
             ecut    3.50000000E+01 Hartree                                                           
           ecutsm    5.00000000E-01 Hartree                                                           
           etotal   -3.5989390043E+00                                                                 
            fcart    0.0000000000E+00  3.2954119707E-27 -4.8086547231E-02                             
                     0.0000000000E+00 -9.8862359121E-27 -4.8086547231E-02                             
                     0.0000000000E+00 -3.2954119707E-27  4.8086547231E-02                             
                     0.0000000000E+00  9.8862359121E-27  4.8086547231E-02                             
           istwfk      2    0    0    0    0    0    0    0    0    0                                 
                       4    0    0    0    0                                                         
              ixc        11                                                                           
              kpt    0.00000000E+00  0.00000000E+00  0.00000000E+00                                   
                     2.00000000E-01  0.00000000E+00  0.00000000E+00                                   
                     4.00000000E-01  0.00000000E+00  0.00000000E+00                                   
                     2.00000000E-01  2.00000000E-01  0.00000000E+00                                   
                     4.00000000E-01  2.00000000E-01  0.00000000E+00                                   
                     0.00000000E+00  0.00000000E+00  2.50000000E-01                                   
                     2.00000000E-01  0.00000000E+00  2.50000000E-01                                   
                     4.00000000E-01  0.00000000E+00  2.50000000E-01                                   
                     2.00000000E-01  2.00000000E-01  2.50000000E-01                                   
                     4.00000000E-01  2.00000000E-01  2.50000000E-01                                   
                     0.00000000E+00  0.00000000E+00  5.00000000E-01                                   
                     2.00000000E-01  0.00000000E+00  5.00000000E-01                                   
                     4.00000000E-01  0.00000000E+00  5.00000000E-01                                   
                     2.00000000E-01  2.00000000E-01  5.00000000E-01                                   
                     4.00000000E-01  2.00000000E-01  5.00000000E-01                                   
          kptrlen    3.01917834E+01                                                                   
         kptrlatt    5  0  0   0  5  0   0  0  4
           nband         8                                                                           
            ngfft        36      36      60                                                           
             nkpt        15                                                                           
            nline         1                                                                           
            nstep         1                                                                           
             nsym        12                                                                           
           ntypat         2                                                                           
              occ    2.000000  2.000000  2.000000  2.000000  2.000000  2.000000                       
                     2.000000  2.000000                                                               
            rprim    1.0000000000E+00  0.0000000000E+00  0.0000000000E+00                             
                    -5.0000000000E-01  8.6602540378E-01  0.0000000000E+00                             
                     0.0000000000E+00  0.0000000000E+00  1.0000000000E+00
...skip...

Thanks in advance!

User avatar
jzwanzig
Posts: 504
Joined: Mon Aug 17, 2009 9:25 am

Re: Response function 2 with GaN

Post by jzwanzig » Wed Mar 16, 2011 2:02 pm

I think the problem is that you should have rfatpol 1 4, not 1 2--you have 4 atoms in the cell, all should be treated, I think that's why anaddb complains about missing perturbations. Note that rfatpol refers to atoms, not to types of atoms--
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com

roginovicci
Posts: 75
Joined: Thu Dec 02, 2010 10:36 pm

Re: Response function 2 with GaN

Post by roginovicci » Wed Mar 16, 2011 11:47 pm

Dear jzwanzig! My best wishes to you and to all your family! I appreciated a lot! It work like a charm! But I still having trouble plot phonon band structures :(

Here is my ganrf2_5.in file which i run with the following input to anaddb:
ganrf2_5.in
ganrf2_5.out
ganrf2_3.ddb.out
ganrf2_5_band2eps
ganrf2_dummy1
ganrf2_dummy2
ganrf2_dummy3

Code: Select all

!Input file for the anaddb code. Analysis of the GaN DDB                                                    
                                                                                                           
!Flags                                                                                                     
 ifcflag   1     ! Interatomic force constant flag                                                         
                                                                                                           
!Wavevector grid number 1 (coarse grid, from DDB)                                                           
  brav    4      ! Bravais Lattice : 1-S.C., 2-F.C., 3-B.C., 4-Hex.)                                       
  ngqpt   5  5  4   ! Monkhorst-Pack indices.                                                               
  nqshft  1         ! number of q-points in repeated basic q-cell                                           
  q1shft  3*0.0                                                                                             
                                                                                                           
!Effective charges                                                                                         
     asr   1     ! Acoustic Sum Rule. 1 => imposed asymetrically                                           
  chneut   1     ! Charge neutrality requirement for effective charges.                                     
                                                                                                           
!Interatomic force constant info                                                                           
  dipdip  0      ! Dipole-dipole interaction treatment                                                     
                                                                                                           
!Phonon band structure output for band2eps - See note near end for                                         
! dealing with gamma LO-TO splitting issue.                                                                 
   eivec  4                                                                                                 
                                                                                                           
!Wavevector list number 1 (Reduced coordinates and normalization factor)                                   
  nph1l    29      ! number of phonons in list 1
qph1l   0.0000  0.0000  0.0000   1.0    !(gamma point)                                                   
    0.2500  0.2500  0.0000   3.0                                                                           
    0.5000  0.5000  0.0000   3.0                                                                           
    0.7500  0.7500  0.0000   3.0                                                                           
    1.0000  1.0000  0.0000   3.0    !(K point)                                                             
    1.1250  0.7500  0.0000   3.0                                                                           
    1.2500  0.5000  0.0000   3.0                                                                           
    1.3750  0.2500  0.0000   3.0                                                                           
    1.5000  0.0000  0.0000   3.0    !(M point)                                                             
    1.8750  0.7500  0.7500   3.0                                                                           
    2.2500  1.5000  1.5000   3.0                                                                           
    2.6250  2.2500  2.2500   3.0                                                                           
    3.0000  3.0000  3.0000   3.0    !(gamma point)                                                         
    2.2500  2.2500  2.6250   3.0                                                                           
    1.5000  1.5000  2.2500   3.0                                                                           
    0.7500  0.7500  1.8750   3.0                                                                           
    0.0000  0.0000  1.5000   3.0    !(A point)                                                             
    0.2500  0.2500  1.5000   3.0                                                                           
    0.5000  0.5000  1.5000   3.0                                                                           
    0.7500  0.7500  1.5000   3.0                                                                           
    1.0000  1.0000  1.5000   3.0    !(H point)                                                             
    1.1250  0.7500  1.5000   3.0                                                                           
    1.2500  0.5000  1.5000   3.0                                                                           
    1.3750  0.2500  1.5000   3.0                                                                           
    1.5000  0.0000  1.5000   3.0    !(L point)                                                             
    0.7500  0.0000  1.5000   3.0                                                                           
    0.5000  0.0000  1.5000   3.0                                                                           
    0.2500  0.0000  1.5000   3.0                                                                           
    0.0000  0.0000  1.5000   3.0    !(A point)

I have two main output files
ganrf2_5.out_B2EPS.displ ganrf2_5.out_B2EPS.freq
which I try to use with band2eps by ganrf2_6.in

Code: Select all

#Input file for 'band2eps.' This data layout must be used, line-by-line.                                    
    #number of atoms in a cell :                                                                           
4                                                                                                           
    #minimum value, maximum value and number of tics of the vertical axe :                                 
0.0  400.0  8                                                                                               
    #Units : 1 for cm-1, 2 for THz :                                                                       
1                                                                                                           
    #Number of lines :                                                                                     
7                                                                                                           
    #Description of the points in q space :  Actually label is wrong
gamma  K  X  gamma  L  X  W  L                                                                             
    #Number of q points for each line :                                                                     
4  4  4  4  4  4  4                                                                                         
    #Scale factor for each line :                                                                           
1.06066017  0.35355339  1.0  0.86602540  0.86602540  0.5  0.70710678                                       
    #COLOR DEFINITION :                                                                                     
    #put 1 in place of the atom you want to be colored in                                                   
    #red                                                                                                   
0 0                                                                                                         
    #green                                                                                                 
0 0                                                                                                         
    #blue                                                                                                   
0 0 

but band2eps goes to sigfault :( Should I rise Number of q points for each line ?

User avatar
jzwanzig
Posts: 504
Joined: Mon Aug 17, 2009 9:25 am

Re: Response function 2 with GaN

Post by jzwanzig » Thu Mar 17, 2011 11:26 am

As I recall, in the band2eps input file, in the color definition lines you need a red input for each atom, a green for each atom, and so forth. So instead of lines like "0 0" which would be for 2 atoms, you now need "0 0 0 0" for example. I've made that mistake too, and was always slightly puzzled why the program crashes with a dramatic segfault rather than just a more normal complaint. But I've never taken the time to read the code and/or fix up the input parser.
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com

roginovicci
Posts: 75
Joined: Thu Dec 02, 2010 10:36 pm

Re: Response function 2 with GaN

Post by roginovicci » Thu Mar 17, 2011 2:08 pm

God bless you! Many thanks in advance!!! I was just thinking that it is not only one parameter I have to change having 4 atoms in the cell. Shame on me I couldn't made it myself. Once more thank you very much, and sorry for my dummy questions. :oops:

Locked