Page 1 of 1
filkf and filqf format
Posted: Thu Apr 13, 2017 7:44 am
by zahra
Dear all,
K and q meshes for fine grid can be introduced via the flag 'filkf' and 'filqf'. I noticed that these meshes were all in crystal coordinates in examples and tests. Can I issue them otherwise? For example Cartesian coordinates? I tested once and received no errors but need to be sure that every thing is right.
Thanks in advance.
Best,
Zahra
Re: filkf and filqf format
Posted: Thu Apr 13, 2017 1:37 pm
by roxana
Right now the code only works correctly if the coordinates are given in crystal coordinates. The code won't give any error if the coordinates are given in Cartesian but the result won't be correct.
If you want to change to Cartesian coordinates you need to uncomment line 62 "! CALL cryst_to_cart ( 1, xkf_ (:,ikk), at, -1)" in loadkmesh.f90 and you will need to add a similar line in loadqmesh.f90 for xqf_ variable when reading from file.
Best,
Roxana
Re: filkf and filqf format
Posted: Fri Apr 14, 2017 2:31 pm
by zahra
Hi Roxana,
Thanks.
Best,
Zahra
Re: filkf and filqf format
Posted: Thu Apr 22, 2021 1:57 am
by zz11ss11zz
Hi,
I just wonder whether we can use Cartesian coordinates in the EPW5.3.1
Because when I use inputs something like:
Code: Select all
3 cartesian
0.0000000 0.0000000 0.0000000 0.3333333
0.0000000 0.0481125 0.0000000 0.3333333
0.0000000 0.0962250 0.0000000 0.3333333
It also doesn't give any errors now.
Thanks.
Best regards,
Zishen
Re: filkf and filqf format
Posted: Thu Apr 22, 2021 3:56 pm
by hpaudya1
Hi Zisen,
Both crystal and cartesian coordinates work in the EPWv5.3.1.
Best,
Hari
Re: filkf and filqf format
Posted: Thu Apr 22, 2021 3:58 pm
by hlee
Dear Zishen:
As Hari already answered, in recent versions of EPW, you can use both crystal and Cartesian coordinates in filkf and filqf.
For instance, see
https://gitlab.com/QEF/q-e/-/blob/devel ... id.f90#L82 and
https://gitlab.com/QEF/q-e/-/blob/devel ... d.f90#L108 .
I think the the line of 84 is problematic in some cases, so you had better explicitly specify either Cartesian or crystal.
Sincerely,
H. Lee
Re: filkf and filqf format
Posted: Fri Apr 23, 2021 3:12 am
by zz11ss11zz
Dear H. Lee and Hari,
Thank you for your reply.
I compared the outputs using cartesian (left side) or crystal (right side), and I found their results are inconsistent with each other at the third point...
Code: Select all
iq = 1 coord.: 0.0000000 0.0000000 0.0000000 iq = 1 coord.: 0.0000000 0.0000000 0.0000000
ik = 1 coord.: 0.0000000 0.0000000 0.0000000 ik = 1 coord.: 0.0000000 0.0000000 0.0000000
ibnd jbnd imode enk[eV] enk+q[eV] omega(q)[meV] |g|[meV] ibnd jbnd imode enk[eV] enk+q[eV] omega(q)[meV] |g|[meV]
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
1 1 1 0.1692 0.1692 0.0000013113 0.2608480943E-01 1 1 1 0.1692 0.1692 0.0000013113 0.2608480943E-01
1 1 2 0.1692 0.1692 0.0000012245 0.2608480943E-01 1 1 2 0.1692 0.1692 0.0000012245 0.2608480943E-01
1 1 3 0.1692 0.1692 0.0000010251 0.2608480943E-01 1 1 3 0.1692 0.1692 0.0000010251 0.2608480943E-01
1 1 4 0.1692 0.1692 15.2945002069 0.1099723554E-06 1 1 4 0.1692 0.1692 15.2945002069 0.1099723554E-06
1 1 5 0.1692 0.1692 15.2945002069 0.1099723554E-06 1 1 5 0.1692 0.1692 15.2945002069 0.1099723554E-06
1 1 6 0.1692 0.1692 27.2132072496 0.6805284351E+02 1 1 6 0.1692 0.1692 27.2132072496 0.6805284351E+02
1 1 7 0.1692 0.1692 28.1791439671 0.5154952813E-03 1 1 7 0.1692 0.1692 28.1791439671 0.5154952813E-03
1 1 8 0.1692 0.1692 28.1791439671 0.5154952813E-03 1 1 8 0.1692 0.1692 28.1791439671 0.5154952813E-03
1 1 9 0.1692 0.1692 35.1209507326 0.8233763143E-04 1 1 9 0.1692 0.1692 35.1209507326 0.8233763143E-04
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
ik = 2 coord.: 0.0000000 0.0416666 0.0000000 ik = 2 coord.: 0.0000000 0.0416700 0.0000000
ibnd jbnd imode enk[eV] enk+q[eV] omega(q)[meV] |g|[meV] ibnd jbnd imode enk[eV] enk+q[eV] omega(q)[meV] |g|[meV]
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
1 1 1 0.1556 0.1556 0.0000013113 0.8335654896E-01 1 1 1 0.1556 0.1556 0.0000013113 0.8336977996E-01
1 1 2 0.1556 0.1556 0.0000012245 0.8335654896E-01 1 1 2 0.1556 0.1556 0.0000012245 0.8336977996E-01
1 1 3 0.1556 0.1556 0.0000010251 0.8335654896E-01 1 1 3 0.1556 0.1556 0.0000010251 0.8336977996E-01
1 1 4 0.1556 0.1556 15.2945002069 0.1869951104E-05 1 1 4 0.1556 0.1556 15.2945002069 0.1870263757E-05
1 1 5 0.1556 0.1556 15.2945002069 0.1869951104E-05 1 1 5 0.1556 0.1556 15.2945002069 0.1870263757E-05
1 1 6 0.1556 0.1556 27.2132072496 0.6638934660E+02 1 1 6 0.1556 0.1556 27.2132072496 0.6638907984E+02
1 1 7 0.1556 0.1556 28.1791439671 0.1346307842E+01 1 1 7 0.1556 0.1556 28.1791439671 0.1346523948E+01
1 1 8 0.1556 0.1556 28.1791439671 0.1346307842E+01 1 1 8 0.1556 0.1556 28.1791439671 0.1346523948E+01
1 1 9 0.1556 0.1556 35.1209507326 0.9289335031E-04 1 1 9 0.1556 0.1556 35.1209507326 0.9289508851E-04
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
ik = 3 coord.: 0.0000000 0.0962250 0.0000000 ik = 3 coord.: 0.0000000 0.0833300 0.0000000
ibnd jbnd imode enk[eV] enk+q[eV] omega(q)[meV] |g|[meV] ibnd jbnd imode enk[eV] enk+q[eV] omega(q)[meV] |g|[meV]
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
1 1 1 0.0863 0.0863 0.0000013113 0.4180068598E+00 1 1 1 0.1092 0.1092 0.0000013113 0.3220885829E+00
1 1 2 0.0863 0.0863 0.0000012245 0.4180068598E+00 1 1 2 0.1092 0.1092 0.0000012245 0.3220885829E+00
1 1 3 0.0863 0.0863 0.0000010251 0.4180068598E+00 1 1 3 0.1092 0.1092 0.0000010251 0.3220885829E+00
1 1 4 0.0863 0.0863 15.2945002069 0.9508447868E-05 1 1 4 0.1092 0.1092 15.2945002069 0.7333126465E-05
1 1 5 0.0863 0.0863 15.2945002069 0.9508447868E-05 1 1 5 0.1092 0.1092 15.2945002069 0.7333126465E-05
1 1 6 0.0863 0.0863 27.2132072496 0.5907889325E+02 1 1 6 0.1092 0.1092 27.2132072496 0.6133973957E+02
1 1 7 0.0863 0.0863 28.1791439671 0.7357488081E+01 1 1 7 0.1092 0.1092 28.1791439671 0.5484325924E+01
1 1 8 0.0863 0.0863 28.1791439671 0.7357488081E+01 1 1 8 0.1092 0.1092 28.1791439671 0.5484325924E+01
1 1 9 0.0863 0.0863 35.1209507326 0.1273967421E-03 1 1 9 0.1092 0.1092 35.1209507326 0.1191144984E-03
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
I think the origin is that the electron momenta are not the same. And I find only the crystal coordinate gives the correct result. Then I compared the inputs:
Code: Select all
3 cartesian | 3 crystal
0.0000000 0.0000000 0.0000000 0.3333333 | 0.0000000 0.00000 0.0000000 0.3333333
0.0000000 0.0481125 0.0000000 0.3333333 | 0.0000000 0.04167 0.0000000 0.3333333
0.0000000 0.0962250 0.0000000 0.3333333 | 0.0000000 0.08333 0.0000000 0.3333333
In the epw.out, the coordinate of the second k point has been transferred into crystal coordinates, while the third one is not. I was wondering the reason for such differences, maybe the crystal coordinate is the only safe choice till now?
Btw, I am using EPW5.3.1 in the 2d system, but I guess 2d system is not the reason...
Best regards,
Zishen
Re: filkf and filqf format
Posted: Fri Apr 23, 2021 3:41 am
by hlee
Dear Zishen:
In the epw.out, the coordinate of the second k point has been transferred into crystal coordinates, while the third one is not. I was wondering the reason for such differences, maybe the crystal coordinate is the only safe choice till now?
You are right.
There was a bug since the support for Cartesian coordinates in filkf (filqf) was first implemented in Sep. 2019.
From q-e/EPW/src/grid.f90 (
https://gitlab.com/QEF/q-e/-/blob/devel ... d.f90#L108 )
Code: Select all
IF (imatches("cartesian", coordinate_type)) THEN
CALL cryst_to_cart(nkqtotf, xkf_, at, -1)
ENDIF
!
! redefine nkqtotf to include the k+q points
!
nkqtotf = 2 * nkqtotf
Please put the line of "nkqtotf = 2 * nkqtotf" before the IF statement as follows:
Code: Select all
!
! redefine nkqtotf to include the k+q points
!
nkqtotf = 2 * nkqtotf
!
IF (imatches("cartesian", coordinate_type)) THEN
CALL cryst_to_cart(nkqtotf, xkf_, at, -1)
ENDIF
Thank you for reporting this bug.
Could you let me know your full name so that I can include your name when I do MR for fixing this bug? If you don't want to make your name publicly open, you can send the private message to me.
Sincerely,
H. Lee
Re: filkf and filqf format
Posted: Fri Apr 23, 2021 6:49 am
by zz11ss11zz
Dear Dr. Lee,
I am glad to hear that EPW code will get rid of this bug.
My name is Zishen Wang, a PhD student from the National University of Singapore.
Best regards,
Zishen