Author Topic: TMR calculation  (Read 6658 times)

0 Members and 1 Guest are viewing this topic.

Offline xiaolight

  • Regular QuantumATK user
  • **
  • Posts: 14
  • Country: us
  • Reputation: 0
    • View Profile
TMR calculation
« on: May 26, 2017, 21:40 »
# Calculate conductance for parallel spin
transmission_para = nlread('mgo_para.nc', TransmissionSpectrum)[0]
conductance_para_uu = transmission_para.conductance(spin=Spin.Up)
conductance_para_dd = transmission_para.conductance(spin=Spin.Down)
conductance_para = conductance_para_uu + conductance_para_dd

# Calculate conductance for anti-parallel spin
transmission_anti = nlread('mgo_anti.nc', TransmissionSpectrum)[0]
conductance_anti_uu = transmission_anti.conductance(spin=Spin.Up)
conductance_anti_dd = transmission_anti.conductance(spin=Spin.Down)
conductance_anti = conductance_anti_uu + conductance_anti_dd

print 'Conductance Parallel Spin (Siemens)'
print 'Up=%8.2e, Down=%8.2e' % (conductance_para_uu.inUnitsOf(Siemens),
                                conductance_para_dd.inUnitsOf(Siemens))
print 'Total = %8.2e' % (conductance_para.inUnitsOf(Siemens))
print

print 'Conductance Anti-Parallel Spin (Siemens)'
print 'Up=%8.2e, Down=%8.2e' % (conductance_anti_uu.inUnitsOf(Siemens),
                                conductance_anti_dd.inUnitsOf(Siemens))
print 'Total = %8.2e' % (conductance_anti.inUnitsOf(Siemens))
print

print 'TMR (optimistic)  = %8.2f percent' % \
      (100.*(conductance_para-conductance_anti)/conductance_anti)
print 'TMR (pessimistic) = %8.2f percent' % \
      (100.*(conductance_para-conductance_anti)/(conductance_para+conductance_anti))
In the MTJ tutorial the TMR can be calculated by this code, so what does[0] mean? does it mean the TMR of zero energy?
« Last Edit: May 26, 2017, 21:42 by xiaolight »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: TMR calculation
« Reply #1 on: May 26, 2017, 23:23 »
It means that it's evaluated for the first energy, for which the transmission spectrum was computed. In this particular case, T(E) is only computed for E=0 so yes, it is at the Fermi level.

Offline xiaolight

  • Regular QuantumATK user
  • **
  • Posts: 14
  • Country: us
  • Reputation: 0
    • View Profile
Re: TMR calculation
« Reply #2 on: May 30, 2017, 17:02 »
THX, so if I want to calculate the TMR of specific energy level, what should I do?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: TMR calculation
« Reply #3 on: May 30, 2017, 17:44 »
I'm not sure that makes sense, if you consider what TMR actually is.

But technically you can of course always change the energy at which the transmission spectrum is calculated.

Offline guyue03

  • Regular QuantumATK user
  • **
  • Posts: 11
  • Country: cn
  • Reputation: 0
    • View Profile
Re: TMR calculation
« Reply #4 on: November 6, 2018, 05:08 »
For i in range(0,201):
    transmission_para = nlread('mgo_para.nc', TransmissionSpectrum)[ i ]

I got err "index out of range". How can I do to deal with TransmissionSpectrum with energy (-1,1,201)
« Last Edit: November 6, 2018, 05:18 by guyue03 »

Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1290
  • Country: dk
  • Reputation: 25
    • View Profile
Re: TMR calculation
« Reply #5 on: November 6, 2018, 09:58 »
You should first read the transmission spectrum (TS) object, e.g., the last one in the nc-file:
transmission_para = nlread('mgo_para.nc', TransmissionSpectrum)[-1]

If you have many TS objects in the nc-file, then you have to specify the object's number instead of reading the last one [-1].

To get the information from TS object, read https://docs.quantumwise.com/manual/Types/TransmissionSpectrum/TransmissionSpectrum.html.