Page 1 of 1

NaN output of ypp

Posted: Thu Feb 18, 2021 4:19 am
by sdwang
Dear all,
The output of dipoles using ypp-5.0.0 is NaN as below:
# k_x (rlu) k_y (rlu) k_z (rlu) |<v|R|c>.DIP_dir|^2
#
0.000000 0.000000 0.000000 NaN
-0.745058E-8 -0.745058E-8 0.125000 NaN
-0.125000 -0.125000 -0.125000 NaN

and both -dipoles exc and ele are the same with 'NaN' output.
Does the diploes output function not has been implemented? Or something is wrong?
Thanks!
Shudong

Re: NaN output of ypp

Posted: Mon Feb 22, 2021 10:03 pm
by Davide Sangalli
Dear Shudong,

try to open the file

Code: Select all

ypp/dipoles/DIPOLE_driver.F
and apply the following changes
(remove the lines with "-" and add the ones with "+" then recompile)

Code: Select all

  do ik=1,k%nibz
    if (.not.PAR_IND_DIPk_ibz%element_1D(ik)) cycle
    ik_mem=PAR_DIPk_ibz_index(ik)
    do iv=DIPOLES_bands(1),E%nbm
-     if (.not.PAR_IND_CON_BANDS_DIP%element_1D(iv)) cycle
+     if (.not.PAR_IND_VAL_BANDS_DIP%element_1D(iv)) cycle
      do ic=E%nbf+1,DIPOLES_bands(2)
-       if (.not.PAR_IND_VAL_BANDS_DIP%element_1D(ic)) cycle
+       if (.not.PAR_IND_CON_BANDS_DIP%element_1D(ic)) cycle
Best,
D.