filkf and filqf format

General discussion around the EPW software

Moderator: hlee

Post Reply
zahra
Posts: 17
Joined: Thu Mar 09, 2017 11:31 am
Affiliation:

filkf and filqf format

Post 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

roxana
Posts: 164
Joined: Fri Jan 22, 2016 6:48 pm
Affiliation:

Re: filkf and filqf format

Post 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
Roxana Margine
Associate Professor
Department of Physics, Applied Physics and Astronomy
Binghamton University, State University of New York

zahra
Posts: 17
Joined: Thu Mar 09, 2017 11:31 am
Affiliation:

Re: filkf and filqf format

Post by zahra »

Hi Roxana,

Thanks.

Best,
Zahra

zz11ss11zz
Posts: 13
Joined: Sat Jul 11, 2020 1:59 am
Affiliation: National University of Singapore

Re: filkf and filqf format

Post 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

hpaudya1
Posts: 85
Joined: Tue Mar 21, 2017 7:11 pm
Affiliation:

Re: filkf and filqf format

Post by hpaudya1 »

Hi Zisen,

Both crystal and cartesian coordinates work in the EPWv5.3.1.

Best,
Hari
Last edited by hpaudya1 on Thu Apr 22, 2021 4:01 pm, edited 1 time in total.

hlee
Posts: 293
Joined: Thu Aug 03, 2017 12:24 pm
Affiliation: The University of Texas at Austin

Re: filkf and filqf format

Post 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

zz11ss11zz
Posts: 13
Joined: Sat Jul 11, 2020 1:59 am
Affiliation: National University of Singapore

Re: filkf and filqf format

Post 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

hlee
Posts: 293
Joined: Thu Aug 03, 2017 12:24 pm
Affiliation: The University of Texas at Austin

Re: filkf and filqf format

Post 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

zz11ss11zz
Posts: 13
Joined: Sat Jul 11, 2020 1:59 am
Affiliation: National University of Singapore

Re: filkf and filqf format

Post 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

Post Reply