Page 1 of 1

p2y support with fixed_magnetization?

Posted: Mon Oct 30, 2023 9:14 pm
by milesj
I've run p2y from version 5.1.1 on a different machine several times on this same quantum espresso run, but I just downloaded the most recent version of yambo from github to and received this error with the default configuration.

I realize I can just change the line in qexsd_p2y.F that calls this error, but is there any theoretical reason yambo no longer wants me to used fixed_magnetization in my qe runs?

Thanks,
Miles

Code: Select all

  __ __  ____ ___ ___ ____   ___
 |  |  |/    |   |   |    \ /   \
 |  |  |  o  | _   _ |  o  )     |
 |  ~  |     |  \_/  |     |  O  |
 |___, |  _  |   |   |  O  |     |
 |     |  |  |   |   |     |     |
 |____/|__|__|___|___|_____|\___/


 <---> DBs path set to : .
 <---> detected QE data format : qexsd
 <---> == PWscf v.6.x generated data (QEXSD fmt) ==
 <---> Header/K-points/Energies...
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     Error in routine qexsd_read_band_structure (1):
      two_fermi_energis. Action: run pwscf without fixed_magnetization.
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

     stopping ...
MPICH ERROR [Rank 0] [job id ] [Mon Oct 30 12:38:20 2023] [login39] - Abort(1) (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0

Re: p2y support with fixed_magnetization?

Posted: Wed Nov 01, 2023 9:41 am
by milesj
To correct myself - the error is not that yambo no longer allows fixed magnetization, it is that this error is being called when I am not doing a fixed magnetization calculation. I do not used fixed magnetization in my quantum espresso calculations.

It's this chunk of code that is different:

Code: Select all

      call iotk_scan_dat( iunit, "two_fermi_energies",fermi_energy_updw_, FOUND=lfound, IERR=ierr)
      if ( lfound ) then
         chval=' two_fermi_energis. Action: run pwscf without fixed_magnetization.'
         if ( abs(fermi_energy_updw_(2)-fermi_energy_updw_(1)) > 1.E-5 ) then
           call errore('qexsd_read_band_structure',chval,1)
         else
           call warning('qexsd_read_band_structure:'//trim(chval))
         endif
      endif
whereas in version 5.1.1, the corresponding chunk looks like:

Code: Select all

if (present(fermi_energy_updw)) then
         call iotk_scan_dat( iunit, "two_fermi_energies", fermi_energy_updw, FOUND=lfound, IERR=ierr)
         if (ierr/=0) return
         if (.not.lfound) fermi_energy_updw=-100000
      endif
and does not return an error.

Either way, my lsda calculation does have two fermi energies, one for up spins and one for down spins, even though I am just using tot_magnetization (I'm using quantum espresso 7.0). Is this incompatible with the yambo theory for some reason?

Thanks,
Miles

Re: p2y support with fixed_magnetization?

Posted: Thu Nov 02, 2023 1:51 pm
by Davide Sangalli
Dear Miles,
if there are two independent Fermi levels for the two spin channel, the yambo code might have issues in finding the correct occupations, since it uses a Fermi function with the same fermi level for all states.

You can try to comment the barrier and see what happens in your case.

Also you cannot study spin flip transitions in such case, since spin up and spin down energy levels are not properly aligned.

Best,
D.