Author Topic: Printing out spin up and spin transmission spectrum  (Read 3662 times)

0 Members and 1 Guest are viewing this topic.

Offline Derek Stewart

  • Regular QuantumATK user
  • **
  • Posts: 9
  • Reputation: 0
    • View Profile
Printing out spin up and spin transmission spectrum
« on: February 14, 2011, 17:52 »
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

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5565
  • Country: dk
  • Reputation: 93
    • View Profile
    • QuantumATK at Synopsys
Re: Printing out spin up and spin transmission spectrum
« Reply #1 on: February 14, 2011, 21:05 »
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])
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)
(also "protected" by processIsMaster() of course!)
« Last Edit: February 14, 2011, 21:07 by Anders Blom »

Offline Derek Stewart

  • Regular QuantumATK user
  • **
  • Posts: 9
  • Reputation: 0
    • View Profile
Re: Printing out spin up and spin transmission spectrum
« Reply #2 on: February 14, 2011, 21:56 »
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