Calculating the nesting function

Post here questions linked with issue while running the EPW code

Moderator: stiwari

Post Reply
deecadance
Posts: 4
Joined: Tue Jan 19, 2021 4:11 pm
Affiliation: Sapienza University of Rome

Calculating the nesting function

Post by deecadance »

Hello everyone,
I'd like to calculate the electronic nesting function using EPW. In particular, I'd like to calculate it along a specific q-path, so that I can compare it with the phonon linewidth (already calculated) along the same path.

I saw that there is an input variable called "nest_fn" which I can set to ".true.", but I found no other information. I suppose it is saved as a byproduct of some other calculation.

Could someone kindly explain the passages I need to follow?

Thanks a lot,
Simone Di Cataldo
hlee
Posts: 415
Joined: Thu Aug 03, 2017 12:24 pm
Affiliation: The University of Texas at Austin

Re: Calculating the nesting function

Post by hlee »

Dear Simone Di Cataldo:

(from ephwann_shuffle.f90)

Code: Select all

      ...
      IF (prtgkk    ) CALL print_gkk(iq)
      IF (phonselfen) CALL selfen_phon_q(iqq, iq, totq)
      IF (elecselfen) CALL selfen_elec_q(iqq, iq, totq, first_cycle)
      IF (plselfen .AND. .NOT. vme) CALL selfen_pl_q(iqq, iq, totq, first_cycle)
      IF (nest_fn   ) CALL nesting_fn_q(iqq, iq)
      IF (specfun_el) CALL spectral_func_el_q(iqq, iq, totq, first_cycle)
      IF (specfun_ph) CALL spectral_func_ph_q(iqq, iq, totq)
      IF (specfun_pl .AND. .NOT. vme) CALL spectral_func_pl_q(iqq, iq, totq, first_cycle)
      IF (ephwrite) THEN
        IF (first_cycle .OR. iq == 1) THEN
           CALL kmesh_fine
           CALL kqmap_fine
           CALL count_kpoints
           first_cycle = .FALSE.
        ENDIF
        CALL write_ephmat(iqq, iq, totq)
      ENDIF
      ...
I also have no experience with the calculation of nesting function, but looking at the code, I found that if you set nest_fn to .true., the results are written in stdout, that is, EPW main output file.

If you want to calculate the nesting function along the specific q-point path, you need to provide its list in the separate file and indicate this file name using the input flag of filqf; I guess that you already did it when calculating the phonon linewidth along the q-point path.

Please check your epw.out and look at the subroutine of nesting_fn_q in selfen.f90.

Sincerely,

H. Lee
deecadance
Posts: 4
Joined: Tue Jan 19, 2021 4:11 pm
Affiliation: Sapienza University of Rome

Re: Calculating the nesting function

Post by deecadance »

Thanks for your reply!

I managed to perform the calculation. I'm posting this here for future user.

As Dr. Lee suggested, in order to calculate the nesting function on a path, it is sufficient to set the flag "nest_fn = .true.", and set the path through "filqf", as you would do for a phonon selfenergy calculation.

The output is written in the output file, so you afterwards you just have to collect the data from it. Be careful that each q point is recalculated for multiple smearing values. If you have

Code: Select all

Num_smear
smearing values you could do something like:

Code: Select all

$ grep "Nesting function" outputfile | awk '{if(NR%Num_smear == 1){print $4}}'> nesting_smearing_1.dat
$ grep "Nesting function" outputfile | awk '{if(NR%Num_smear == 2){print $4}}'> nesting_smearing_2.dat
and so on
Post Reply