Author Topic: PDOS for orbital spin up and spin down  (Read 1247 times)

0 Members and 1 Guest are viewing this topic.

Offline Jahanzaib

  • Heavy QuantumATK user
  • ***
  • Posts: 81
  • Country: gb
  • Reputation: 2
    • View Profile
PDOS for orbital spin up and spin down
« on: January 31, 2023, 17:07 »
Hello expert,

I have calculated the sum of spin for orbitals but I am interested to separately calculated the spin up and spin down for each orbital.

kpoint_grid = MonkhorstPackGrid()

projected_density_of_states = ProjectedDensityOfStates(
    configuration=configuration,
    kpoints=kpoint_grid,
    projections=ProjectOnShellsByElement,
     spin_up = spin.evaluate(spin=Spin.Up)
       spin_dn = spin.evaluate(spin=Spin.Down)
    energies=numpy.linspace(-2, 2, 401)*eV,
    energy_zero_parameter=FermiLevel,
    bands_above_fermi_level=All,
    spectrum_method=GaussianBroadening(0.01*eV),
)

It's not working - can you please suggest me what's wrong in here

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5394
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: PDOS for orbital spin up and spin down
« Reply #1 on: January 31, 2023, 22:15 »
You can use

projections=ProjectOnShellsByElement*ProjectOnUpDownSpin

which is equivalent to

projections=ProjectionGenerator(atoms=ElementsProjection, l_quantum_numbers=True, spin=UpDownProjection)

(see https://docs.quantumatk.com/manual/Types/ProjectionGenerator/ProjectionGenerator.html)

Offline Jahanzaib

  • Heavy QuantumATK user
  • ***
  • Posts: 81
  • Country: gb
  • Reputation: 2
    • View Profile
Re: PDOS for orbital spin up and spin down
« Reply #2 on: January 31, 2023, 22:49 »
Thank you so much for guiding.
I tried but it showed combined projection not separate spin up and spin down.

I think I couldn't explained my query well. Sorry for that.

I have already calculated "Projection on shell by elements" which showed "sum of spin" of each orbital but I am interested to find out spin up and down separately of each orbital (p and d). How could I can adjust input? Can you please guide me?
« Last Edit: January 31, 2023, 22:58 by Jahanzaib »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5394
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: PDOS for orbital spin up and spin down
« Reply #3 on: February 3, 2023, 21:52 »
The setting I suggested should work (at least the second version). I just ran it for a simple Fe fcc cell, see result below
Also attaching the script for reference

Offline Jahanzaib

  • Heavy QuantumATK user
  • ***
  • Posts: 81
  • Country: gb
  • Reputation: 2
    • View Profile
Re: PDOS for orbital spin up and spin down
« Reply #4 on: February 4, 2023, 00:45 »
Thank you so much Dr. Blom. I truly appreciate the time and energy you have invested in helping the students.

I tried this for my system and it's working fine.

Can you please guide me how to improve python skill in computational chemistry as I know python very well but while writing script - I never succeeded.

 
« Last Edit: February 4, 2023, 00:52 by Jahanzaib »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5394
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: PDOS for orbital spin up and spin down
« Reply #5 on: February 6, 2023, 19:58 »
I didn't write the script from scratch, I just modified a single line of the script NanoLab produced. This is the approach I almost always take, even when I want to do something very advanced I let the GUI generate the outline template, then I modify the details.

Offline Jahanzaib

  • Heavy QuantumATK user
  • ***
  • Posts: 81
  • Country: gb
  • Reputation: 2
    • View Profile
Re: PDOS for orbital spin up and spin down
« Reply #6 on: February 7, 2023, 00:35 »
Thank you so much. I will try this technique.