QuantumATK > General Questions and Answers

Printing out spin up and spin transmission spectrum

(1/1)

Derek Stewart:
Hi everyone,

I would like to print out the spin up and spin down transmission spectrum as a function of energy. I have found the following approach:

# -------------------------------------------------------------
# Transmission spectrum
# -------------------------------------------------------------
transmission_spectrum = TransmissionSpectrum(
    configuration=device_configuration,
    energies=numpy.linspace(-5,5,100)*eV,
    kpoints=MonkhorstPackGrid(1,1),
    energy_zero_parameter=AverageFermiLevel,
    infinitesimal=1e-06*eV,
    self_energy_calculator=KrylovSelfEnergy(),
    )

if processIsMaster(): nlprint(transmission_spectrum)


which prints out the total transmission spectrum. 

Is it possible to print out the spin separated spectrum in the output file?

Also, is there a quick command to print out the conductance at the Fermi energy level for spin up and spin down components?

Thanks,

Derek

Anders Blom:
In ATK 11.2, nlprint(transmission_spectrum) will actually print out both spin components already for you.

If you want to do the exact same thing manually (good exercise), the object transmission_spectrum that is created via this command has several methods (see http://quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/ref.transmissionspectrum.html) one of which is .transmission(). This returns a list of the spin up and down spectra, thus you could do


--- Code: (python) ---if processIsMaster():
    energies = transmission_spectrum.energies()
    T_up = transmission_spectrum.transmission()[0]
    T_down = transmission_spectrum.transmission()[1]
    for j in range(len(energies)):
        print "%g\t%g\t%g" % (energies[j],T_up[j],T_down[j])

--- End code ---

But you should check why you are not getting both components. Did you select a spin-polarized exchange-correlation functional (easy mistake!)?

Second question, try


--- Code: (python) ---print transmission_spectrum.conductance(spin=Spin.Up)
print transmission_spectrum.conductance(spin=Spin.Down)
--- End code ---

(also "protected" by processIsMaster() of course!)

Derek Stewart:
Hi Anders,

Thanks for your quick reply.  After going back through my input file, I realized that I had not chosen the spin polarized exchange correlation functional, so it is not surprising that transmission was not split into different components.

Thanks also for the tips on the python scripting as well.

Regards,

Derek

Navigation

[0] Message Index

Go to full version