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.
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.
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…
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:
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…
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.
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:
!
! 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.