How to Output Crystal Coordinates from mobility_nk.fmt

General discussion around the EPW software

Moderator: stiwari

Post Reply
guodonglin
Posts: 25
Joined: Mon Mar 29, 2021 5:56 am
Affiliation: CQU

How to Output Crystal Coordinates from mobility_nk.fmt

Post by guodonglin »

In the output file mobility_nk.fmt, the K-point coordinates are provided in Cartesian coordinates, how to output the Crystal Coordinates in mobility_nk.fmt by revising the printing.f90. thanks.
Shashi
Posts: 51
Joined: Mon Feb 12, 2024 2:21 pm
Affiliation: SUNY Binghamton

Re: How to Output Crystal Coordinates from mobility_nk.fmt

Post by Shashi »

Hi,

To output k-point coordinates in crystal coordinates (instead of Cartesian) in the mobility_nk.fmt file, you can modify printing.f90 as follows:

You can store crystal coordinates before conversion:

Code: Select all

  xkk_cryst = xkf_all(:, ik)             ! These are in crystal coordinates
  
CALL cryst_to_cart(1, xkk_cart, bg, 1)    ! Convert to Cartesian as already done in the code

! Use xkk_cryst in the WRITE statement

WRITE(iufilmu_nk, '(i9, 2i5, 4f12.8, 3E18.8)') ik, ibnd, nb, xkk_cryst(:), ekk * ryd2ev, &
                                                       mobility_nk(1, 1), mobility_nk(1, 2), mobility_nk(1, 3)
Please let me know if it is not clear.

Regards,
Shashi
Post Reply