QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: Jenny on July 5, 2016, 23:34

Title: how to plot transmission coefficient as a function of energy and bias
Post by: Jenny on July 5, 2016, 23:34
Hi, everyone.

I found the chart of transmission coefficient as a function of energy and bias in the link below:
http://quantumwise.com/publications/tutorials/item/506-linear-response-current-how-to-compute-it-and-why-it-is-often-not-a-good-idea
However, the link seems doesn't work now. I tried to google the key words, but nothing came out.

I'd like to plot transmission coefficient as a function of energy and bias for my own system. Does the ATK have the plug-in function to realize it? If not, is there any available codes I can use to plot it?

Thank you very much.

Jenny
Title: Re: how to plot transmission coefficient as a function of energy and bias
Post by: Anders Blom on July 5, 2016, 23:55
Hm, not exactly sure why we removed that tutorial... Anyway, the script was not published in the tutorial, so it wouldn't help.

Actually it's very simple. Assuming you have all transmission spectra, one for each bias, in one NC file, just do:

Code: python
all_t = nlread('file.nc', TransmissionSpectrum)

energies = all_t[0].energies().inUnitsOf(eV)
bias = []
data = []

for t in all_t:
    bias.append(t.bias().inUnitsOf(Volt))
    data.append(t.evaluate())

import pylab

pylab.figure()
pylab.xlabel('Energy (eV)',fontsize=12,family='sans-serif')
pylab.ylabel('Bias (V)',fontsize=12,family='sans-serif')
pylab.title('Transmission spectrum as function of bias')

pylab.contourf(energies,bias,data,40,cmap=pylab.cm.jet)
pylab.colorbar()

pylab.show()
Title: Re: how to plot transmission coefficient as a function of energy and bias
Post by: Jenny on July 7, 2016, 22:47
Thank you, Dr. Blom.

That really helps a lot.

Jenny