p2y support with fixed_magnetization?

Come here to discuss issues with using the p2y converter from PWscf to Yambo, how to best run PWscf , link with the IOTK library, and so on.

Moderators: andrea.ferretti, Conor Hogan

Forum rules
Before posting, make sure to first read carefully all the detailed steps and suggestions given in the main documentation:
https://www.yambo-code.eu/learn/#learn-forum
Post Reply
milesj
Posts: 30
Joined: Thu Jan 26, 2023 9:27 pm

p2y support with fixed_magnetization?

Post by milesj » Mon Oct 30, 2023 9:14 pm

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
Miles Johnson
California Institute of Technology
PhD candidate in Applied Physics

milesj
Posts: 30
Joined: Thu Jan 26, 2023 9:27 pm

Re: p2y support with fixed_magnetization?

Post by milesj » Wed Nov 01, 2023 9:41 am

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
Miles Johnson
California Institute of Technology
PhD candidate in Applied Physics

User avatar
Davide Sangalli
Posts: 614
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: p2y support with fixed_magnetization?

Post by Davide Sangalli » Thu Nov 02, 2023 1:51 pm

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.
Davide Sangalli, PhD
CNR-ISM, Division of Ultrafast Processes in Materials (FLASHit) and MaX Centre
https://sites.google.com/view/davidesangalli
http://www.max-centre.eu/

Post Reply