QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: Jahanzaib 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
-
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)
-
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?
-
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
-
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.
-
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.
-
Thank you so much. I will try this technique.