TWO_FERMI_ENERGIES

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
davide.tiana
Posts: 9
Joined: Wed Nov 11, 2015 11:54 am

TWO_FERMI_ENERGIES

Post by davide.tiana » Wed Nov 18, 2015 1:50 pm

Dear yamboers
I've just found that yambo can't be run usign the pw tot_magnetization tag.
I know it is not a big issue, I can rerun a scf without it (playing and checking with starting_magnetization)
I was curious on understanding why this is a problem and if it could be eventually overcome/ removed

Cheers
Davide
Laboratory of molecular simulation
EPFL, Switzerland

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

Re: TWO_FERMI_ENERGIES

Post by Davide Sangalli » Mon Nov 23, 2015 5:51 pm

Dear Davide,
the reason is that pwscf defines two different Fermi levels.
In coding yambo we never thought about this option.

Not sure if this would really be a problem for yambo.
You may try to comment the error message and see what happens.
No idea if it will work.

Open the file interfaces/p2y/qexml_v4.0.F, look for the lines

Code: Select all

      IF ( two_ef_ .and. found ) THEN
        CALL errore('qexml_read_bands_info',&
&         ' TWO_FERMI_ENERGIES=.true. Action: run pwscf without fixed_magnetization.',1)
      ELSE
        CALL iotk_scan_dat( iunit, "FERMI_ENERGY", ef_, IERR=ierr )
        IF (ierr/=0) RETURN
      ENDIF
and just replace them with

Code: Select all

 ef_=0.
Hope it helps.

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/

lyzhao
Posts: 51
Joined: Tue May 31, 2016 8:02 am

Re: TWO_FERMI_ENERGIES

Post by lyzhao » Fri Apr 12, 2024 3:58 pm

Dear Davide Sangalli,
I am sorry to renew this post, but I am confused by yb5.1.x and yb5.2.x.
For QE_PWSCF calculation with (for example)
tot_charge=0
nspin=2
tot_magnetization=1
for spin polarization, p2y of yb5.1.x works fine, but p2y of yb5.2.x stops with the following error triggered by the new file (qexsd_p2y.F).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Error in routine qexsd_read_band_structure (1):
two_fermi_energis. Action: run pwscf without fixed_magnetization.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
So, I want to make sure whether the yb support the PWSCF results with fixed_magnetization.
Best, regards.
Youzhao Lan
College of Chemistry and Materials Science,
Zhejiang Normal University,
Jinhua, Zhejiang, China.
HomePage: http://blog.sciencenet.cn/u/lyzhao

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

Re: TWO_FERMI_ENERGIES

Post by Davide Sangalli » Sun Apr 14, 2024 3:57 pm

Dear Youzhao Lan,
nothing changed in the p2y implementation between y5.1 and y5.2

I suppose the different behavior is not triggered by the p2y version, but by something else.

Anyway, p2y interface is implemented for the case with "starting_magnetization", not with "fixed_magnetization"

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