Increase of accuracy

Dear All,
This is my first contact with ab-initio calculations so thank you in advance for your understanding and support.
I use EPW-4 and latest QE.
First I calculated the Eliashberg function for Pb as in example (I haven’t modified the input files).
Everything completed successfully but the obtained results are not very accurate as compared with the experiment. Please see figure below.

[img:2nkbw7ox]http://s13.postimg.org/rq995h3gn/Fig03.png[/img:2nkbw7ox]

In the next steep I want to increase the accuracy.
In phonons folder I modified the ph.in file. I increased the nq1, nq2 and nq3 values from 6 to 8.
As a results I reached 29 dyn and dvscf files.
Then, in epw folder I calculated scf.in and nscf.in without modyfication and in epw.in I modified the section with nq1, nq2 and nq3 (I increased values from 6 to 8):

[code:2nkbw7ox]–
&inputepw
prefix = ‘pb’,
amass(1) = 207.2
outdir = ‘./’

elph = .true.
kmaps = .false.
epbwrite = .true.
epbread = .false.

epwwrite = .true.
epwread = .false.

nbndsub = 4
nbndskip = 5

wannierize = .true.
num_iter = 300
dis_win_max = 21
dis_win_min = -3
dis_froz_min= -3
dis_froz_max= 13.5
proj(1) = ‘Pb:sp3’

wdata(1) = ‘bands_plot = .true.’
wdata(2) = ‘begin kpoint_path’
wdata(3) = ‘G 0.00 0.00 0.00 X 0.00 0.50 0.50’
wdata(4) = ‘X 0.00 0.50 0.50 W 0.25 0.50 0.75’
wdata(5) = ‘W 0.25 0.50 0.75 L 0.50 0.50 0.50’
wdata(6) = ‘L 0.50 0.50 0.50 K 0.375 0.375 0.75’
wdata(7) = ‘K 0.375 0.375 0.75 G 0.00 0.00 0.00’
wdata(8) = ‘G 0.00 0.00 0.00 L 0.50 0.50 0.50’
wdata(9) = ‘end kpoint_path’
wdata(10) = ‘bands_plot_format = gnuplot’

iverbosity = 0

elinterp = .true.
phinterp = .true.

tshuffle2 = .true.
tphases = .false.

elecselfen = .false.
phonselfen = .true.

parallel_k = .true.
parallel_q = .false.

fsthick = 6 ! eV
eptemp = 0.075 ! K
degaussw = 0.05 ! eV

a2f = .true.

dvscf_dir = ‘../phonons/save’

nkf1 = 20
nkf2 = 20
nkf3 = 20

nqf1 = 20
nqf2 = 20
nqf3 = 20

nk1 = 6
nk2 = 6
nk3 = 6

nq1 = 8
nq2 = 8
nq3 = 8

/
16 cartesian
0.000000000000 0.000000000000 0.000000000000 0.0092593
-0.166666666667 0.166666666667 -0.166666666667 0.0740741
-0.333333333333 0.333333333333 -0.333333333333 0.0740741
0.500000000000 -0.500000000000 0.500000000000 0.0370370
0.000000000000 0.333333333333 0.000000000000 0.0555556
-0.166666666667 0.500000000000 -0.166666666667 0.2222222
0.666666666667 -0.333333333333 0.666666666667 0.2222222
0.500000000000 -0.166666666667 0.500000000000 0.2222222
0.333333333333 0.000000000000 0.333333333333 0.1111111
0.000000000000 0.666666666667 0.000000000000 0.0555556
0.833333333333 -0.166666666667 0.833333333333 0.2222222
0.666666666667 0.000000000000 0.666666666667 0.1111111
0.000000000000 -1.000000000000 0.000000000000 0.0277778
0.666666666667 -0.333333333333 1.000000000000 0.2222222
0.500000000000 -0.166666666667 0.833333333333 0.2222222
-0.333333333333 -1.000000000000 0.000000000000 0.1111111
[/code:2nkbw7ox]

And I received the following error:

[code:2nkbw7ox]%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
task # 0
from readmat_shuffle2 : error # 1
wrong qpoint
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%[/code:2nkbw7ox]

Please tell me what I do wrong?

Best,
Ali

Dear Ali,

Please also update your q-grid in the EPW input file.

[code:2vmcpynw]16 cartesian
0.000000000000 0.000000000000 0.000000000000 0.0092593
-0.166666666667 0.166666666667 -0.166666666667 0.0740741
-0.333333333333 0.333333333333 -0.333333333333 0.0740741
0.500000000000 -0.500000000000 0.500000000000 0.0370370
0.000000000000 0.333333333333 0.000000000000 0.0555556
-0.166666666667 0.500000000000 -0.166666666667 0.2222222
0.666666666667 -0.333333333333 0.666666666667 0.2222222
0.500000000000 -0.166666666667 0.500000000000 0.2222222
0.333333333333 0.000000000000 0.333333333333 0.1111111
0.000000000000 0.666666666667 0.000000000000 0.0555556
0.833333333333 -0.166666666667 0.833333333333 0.2222222
0.666666666667 0.000000000000 0.666666666667 0.1111111
0.000000000000 -1.000000000000 0.000000000000 0.0277778
0.666666666667 -0.333333333333 1.000000000000 0.2222222
0.500000000000 -0.166666666667 0.833333333333 0.2222222
-0.333333333333 -1.000000000000 0.000000000000 0.1111111[/code:2vmcpynw]

I guess there should be 29 points that are different from those.

Best,

Samuel

Dear Samuel,
thank you for your quick response. Please just tell me how obtain the last column?

Best,
Ali

Hi Ali,

You can simply run a scf calculations with your desired q-mesh and the coordinate and weight of each points is listed after "number of k points" line.

As an alternative you can use kpoints.f90 program that is provided in QE/PW/tools.

Best,
Roxana

Dear Roxana,
I used kpoints.f90 program in the following way
[code:36e38ov2] bravais lattice >> 2
filout [mesh_k] >> 29
mesh: n1 n2 n3 >> 8 8 8
mesh: k1 k2 k3 (0 no shift, 1 shifted) >> 0 0 0
write all k? [f] >> f
# of k-points == 29 of 512[/code:36e38ov2]
and as a result a I have:
[code:36e38ov2]
0.0000000 0.0000000 0.0000000 1.00
-0.1250000 -0.1250000 0.1250000 8.00
-0.2500000 -0.2500000 0.2500000 8.00
-0.3750000 -0.3750000 0.3750000 8.00
-0.5000000 -0.5000000 0.5000000 4.00
0.0000000 0.0000000 0.2500000 6.00
-0.1250000 -0.1250000 0.3750000 24.00
-0.2500000 -0.2500000 0.5000000 24.00
-0.3750000 -0.3750000 0.6250000 24.00
-0.5000000 -0.5000000 0.7500000 24.00
-0.6250000 -0.6250000 0.8750000 24.00
-0.7500000 -0.7500000 1.0000000 12.00
0.0000000 0.0000000 0.5000000 6.00
-0.1250000 -0.1250000 0.6250000 24.00
-0.2500000 -0.2500000 0.7500000 24.00
-0.3750000 -0.3750000 0.8750000 24.00
-0.5000000 -0.5000000 1.0000000 12.00
0.0000000 0.0000000 0.7500000 6.00
-0.1250000 -0.1250000 0.8750000 24.00
-0.2500000 -0.2500000 1.0000000 12.00
0.0000000 0.0000000 1.0000000 3.00
-0.2500000 0.0000000 0.5000000 24.00
-0.3750000 -0.1250000 0.6250000 48.00
-0.5000000 -0.2500000 0.7500000 24.00
-0.2500000 0.0000000 0.7500000 24.00
-0.3750000 -0.1250000 0.8750000 48.00
-0.5000000 -0.2500000 1.0000000 24.00
-0.2500000 0.0000000 1.0000000 12.00
-0.5000000 0.0000000 1.0000000 6.00[/code:36e38ov2]
When I run epw calculations I have error:
[code:36e38ov2]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
task # 0
from createkmap : error # 1
q-vec not commensurate
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[/code:36e38ov2]
Here you can see all my input files:
[code:36e38ov2]https://drive.google.com/open?id=0B1BjLap8K2-oeU5PRlBzWVRWWVU[/code:36e38ov2]
I will be very grateful if you can help me with this problem.

Best,
Ali

Dear Ali,

The number is column for needs to be divided by 512 (the total number of points).
To check this use my first suggestion and run a scf calculations.

I would also recommend that for questions related to QE you consult the QE tutorials and forum where you can find answers to many questions/problems.

Best,
Roxana

Dear Ali,

The last column is the weight of the q-point.

It is not the issue here.

You should provide the exact same list of q-points as during the phonon calculations you did (8x8x8).

Look at the output of your ph calculation, the q-point list should be written.

Also, in the phonon folder, don’t forget to run the python script pp.py again as you need to put the dvscf and dyn files in the save folder.

If everything match, it should work.

Best,

Samuel

Dear Samuel and Roxana,
thank you for your help and sugestions.
Now, I have good determined q-grid in the EPW input file but still I have the error:
[code:2eexk3f5]from createkmap : error # 1
q-vec not commensurate[/code:2eexk3f5]

I think that this may be connected with nscf.in file and section K_POINTS crystal.
I know that I need 512 k-points but I am not sure how to determine them. I try use kpoints.f90 (I try reproduce results for 216 points (6x6x6) like in your example) but I obtain wrong results (inconsistent with your results).
Please tell me how you calculate K_POINTS crystal in nscf.in.

And one more question. Are these parameters are good:
[code:2eexk3f5] nkf1 = 20
nkf2 = 20
nkf3 = 20

nqf1 = 20
nqf2 = 20
nqf3 = 20

nk1 = 6
nk2 = 6
nk3 = 6

nq1 = 8
nq2 = 8
nq3 = 8
[/code:2eexk3f5]
or maybe I should increase nk1, nk2, nk3 to 8?

Thank you very much,
Ali

Hi Ali,

First of all the k and q grids need to be commensurate, i.e. the k grid needs to be the same or a multiple of the q grid: therefore, if the q grid you are using is an 8x8x8, yes you should increase nk1, nk2 and nk3 to 8.

In the k_points section in the nscf file you will need to provide the 512 k points in crystal coordinates which is just a uniform mesh within [0:1).

Best
Carla

Dear EPW users,

I am running EPW-4 on TiO2 following the steps outlined in PRL115,176401 (2015). I get the error "q-vec not commensurate". According to the above posts, the k-grid should be the same or a multiple of the q-grid. However, in the PRL paper, the DFPT run uses a 4x4x4 q-grid while the BZ was sampled using a 6x6x6 k-grid. These grids are not commensurate. My guess is that the PRL paper used a different coarse k-grid but I may be missing something else here. I would appreciate any suggestions you may have.

Thank you,

Vahid

Vahid Askarpour
Department of Physics and Atmospheric Science
Dalhousie University
Halifax, NS Canada

Dear Vahid,

Carla will for sure reply to this question better than me but from what I understand in the paper, it means:

  • Ground-state properties are computed on a 6x6x6 k-grid. This means the scf cycle.
  • Response properties are computed using DFPT using a 4x4x4 q-grid. This means the nscf.in is probably a 4x4x4 k-grid to be commensurate with the q-grid.
    Anyway, this is a nscf cycle, therefore it uses the "good" 6x6x6 electronic density computed during the scf cycle.

Best,

Samuel

Dear Vahid,

I can confirm as Samuel said that the 6x6x6 k-grid was used for the scf runs, whereas the wannierization is performed using a 4x4x4 uniform mesh. Sorry for not including this detail!

Best
Carla

Dear Carla and Samuel,

Thank you for clarifying the coarse kgrid size. I finished the TiO2 run successfully and reproduced the electron lifetimes for the two segments in the BZ as done in the PRL115 paper.

I am curious as to how long it took for you to finish the TiO2 run. My run (which used exactly the same parameter as the PRL115 paper) took 92 hours on 64 cpus with a total of 220GB of memory. I am asking this to see if I should find ways to better optimise while compiling EPW.

Many thanks,

Vahid

Dear EPW Users,

After several tests, it seems that EPW (and QE) slow down significantly if they are linked against the internal FFT library that accompanies the source code. I linked against an optimised external FFTW3 library and the speed changed significantly (nearly a factor of 3). Therefore my TiO2 run probably took too long for this reason. Hope this helps others.

Best,

Vahid

Dear Vahid,

Thank you for reporting this.

I personally found, for example, a 30% speedup just by going from Intel 12 to 13 (with similar compilation flags).

Bottom line is that, yes, compiler and external libraries do matter.