Author Topic: Code for Transmission spectra  (Read 4877 times)

0 Members and 1 Guest are viewing this topic.

Offline Jahanzaib

  • QuantumATK Guru
  • ****
  • Posts: 103
  • Country: gb
  • Reputation: 3
    • View Profile
Code for Transmission spectra
« 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

« Last Edit: May 8, 2023, 18:41 by Jahanzaib »

Offline Jahanzaib

  • QuantumATK Guru
  • ****
  • Posts: 103
  • Country: gb
  • Reputation: 3
    • View Profile
Re: Code for Transmission spectra
« Reply #1 on: May 9, 2023, 21:20 »
any one guide me kindly?
« Last Edit: May 10, 2023, 18:58 by Jahanzaib »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Code for Transmission spectra
« Reply #2 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.

Offline Jahanzaib

  • QuantumATK Guru
  • ****
  • Posts: 103
  • Country: gb
  • Reputation: 3
    • View Profile
Re: Code for Transmission spectra
« Reply #3 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
« Last Edit: May 15, 2023, 11:13 by Jahanzaib »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Code for Transmission spectra
« Reply #4 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.

Offline Jahanzaib

  • QuantumATK Guru
  • ****
  • Posts: 103
  • Country: gb
  • Reputation: 3
    • View Profile
Re: Code for Transmission spectra
« Reply #5 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.

« Last Edit: May 17, 2023, 14:21 by Jahanzaib »

Offline Jahanzaib

  • QuantumATK Guru
  • ****
  • Posts: 103
  • Country: gb
  • Reputation: 3
    • View Profile
Re: Code for Transmission spectra
« Reply #6 on: May 19, 2023, 22:17 »
any one kindly guide me?
« Last Edit: May 22, 2023, 16:09 by Jahanzaib »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Code for Transmission spectra
« Reply #7 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

Offline Jahanzaib

  • QuantumATK Guru
  • ****
  • Posts: 103
  • Country: gb
  • Reputation: 3
    • View Profile
Re: Code for Transmission spectra
« Reply #8 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.


Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Code for Transmission spectra
« Reply #9 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.
« Last Edit: June 14, 2023, 07:41 by Anders Blom »