QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: Jahanzaib on May 8, 2023, 16:19

Title: Code for Transmission spectra
Post by: Jahanzaib on May 8, 2023, 16:19
I have calculated the transmission spectra for device configuration, wants to gets the graph using atkpython. I modify the code for transmission up and down but got error - I modify like
T(up) = df["T(up)"].values
T(down) = df["T(down)"].values

for DOS, It was this way but i dont have an idea how to adjust the below for transmission spectra
# calculate the DOS spectrum with spin up
dos_Up = dos.gaussianSpectrum(energies, broadening = 0.01*eV, spin=Spin.Up)
# calculate the DOS spectrum with spin up
dos_Down = dos.gaussianSpectrum(energies, broadening = 0.01*eV, spin=Spin.Down)


 I have attached .pyfile for complete code. Anyone guide me how I modify this and get my spectra in atkpython.

Thank you so much

Title: Re: Code for Transmission spectra
Post by: Jahanzaib on May 9, 2023, 21:20
any one guide me kindly?
Title: Re: Code for Transmission spectra
Post by: Anders Blom on May 12, 2023, 19:12
Have you checked https://docs.quantumatk.com/manual/Types/TransmissionSpectrum/TransmissionSpectrum.html?
You use transmission_spectrum.evaluate(spin=Spin.Up) to extract the actual transmission values.
Title: Re: Code for Transmission spectra
Post by: Jahanzaib on May 15, 2023, 02:16
Thank you so much Dr. Blom for your guidance. I really appreciate your effect.

I tried what you mentioned and modified my script - still got error. I have attached two .out files ( i tried to attach .hdf5 files but i couldn't) for zero bias and -0.3V, and also my modified .py script - can you please have a look what I am doing wrong. More specifically, I am interested in getting the finite bias transmission spectra via atkpython similar to one which we can from transmission analyser in quantumatk.


Thank you
Title: Re: Code for Transmission spectra
Post by: Anders Blom on May 15, 2023, 18:57
It would be more helpful if you attached the error from running the script, or the original input file so I can rerun it. I cannot do anything with the output of the calculation which seems to finish fine.
Title: Re: Code for Transmission spectra
Post by: Jahanzaib on May 16, 2023, 01:56
Thank you Dr. Blom for guidance - I adjusted my code and it's working.

I have successfully got the transmission spectra for zero and -0.3V bias and my code works well for zero bias but when I am updating my code for -0.3V - It works but doesn't look the spectra which I got from transmission analyzer (I have attached both graphs which I got from my code and other from transmission analyzer)

I have attached my .py code for -0.3V and .py file. Need you suggestion what's wrong in my code.

Title: Re: Code for Transmission spectra
Post by: Jahanzaib on May 19, 2023, 22:17
any one kindly guide me?
Title: Re: Code for Transmission spectra
Post by: Anders Blom on June 13, 2023, 20:02
Do you just mean that the two horizontal lines marking the bias window are at different positions? That is because the bias window should be symmetric around the Fermi level, not 0 to -0.3 but 0.15 to -0.15
Title: Re: Code for Transmission spectra
Post by: Jahanzaib on June 14, 2023, 02:21
Yes, Dr Blom -  you are right.

I got the similar graph - just adjusted my python code a bit. but

I don't understand why it's -0.15 to 0.15, when I applied -0.3V. I couldn't figure out the concept behind it. Explain it please.

Title: Re: Code for Transmission spectra
Post by: Anders Blom on June 14, 2023, 07:38
This is just a convention. Since there are no absolute energies, we need to simply decide what E=0 means. For the transmission plots, we set E=0 at the average potential of the two electrodes. Things are more complex when a gate is added, since that actually defines an absolute energy reference, but for the common case with no gates, the bias always straddles E=0 symmetrically.

This is also reflected in the fact that only the difference between the left and right potentials matters (i.e. the bias, not the absolute voltages). If you shift both electrodes by the same amount, nothing really happens. So left = -10 V and right = -9 V is still a 1 V bias, and the results will be the same if left = 0 V and right = +1 V.