Author Topic: Bias loop question  (Read 6043 times)

0 Members and 1 Guest are viewing this topic.

Offline gM

  • Regular QuantumATK user
  • **
  • Posts: 19
  • Country: ca
  • Reputation: 1
    • View Profile
Bias loop question
« on: September 18, 2012, 16:18 »
Dear All, I have a small question about creating a bias loop.  What difference does it make (if any) between creating a bias loop like this:

for bias in numpy.arange(0.,1.,0.1)*Volt:
    device_configuration.setCalculator(
        calculator(electrode_voltages=(0.5*bias,-0.5*bias)),
        initial_state=device_configuration
        )

versus one like this:

for bias in numpy.arange(0.,1.,0.1)*Volt:
    device_configuration.setCalculator(
        calculator(electrode_voltages=(bias,0)),
        initial_state=device_configuration
        )

Aka. varying both terminals versus varying one terminal and keeping the other grounded with an equivalent potential difference in both cases.
Regards.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Bias loop question
« Reply #1 on: September 18, 2012, 16:44 »
No difference. The bias is relative between source drain.

Offline gM

  • Regular QuantumATK user
  • **
  • Posts: 19
  • Country: ca
  • Reputation: 1
    • View Profile
Re: Bias loop question
« Reply #2 on: September 18, 2012, 19:15 »
Perfect. Thanks.

Offline mads.engelund

  • Heavy QuantumATK user
  • ***
  • Posts: 29
  • Reputation: 0
    • View Profile
Re: Bias loop question
« Reply #3 on: September 20, 2012, 09:25 »
....unless there is a gate potential. Only the potential differences matter, but if a gate potential is set, then it matters how the source/drain bias are set.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Bias loop question
« Reply #4 on: September 20, 2012, 09:30 »
Well, sort of. You still get the same source-drain bias whether you do (0,V) or (-V/2,+V/2), but yes the potential landscape changes depending on where the common ground is.

Offline zhangguangping

  • QuantumATK Guru
  • ****
  • Posts: 193
  • Country: cn
  • Reputation: 2
    • View Profile
Re: Bias loop question
« Reply #5 on: April 19, 2016, 14:11 »
Dear Anders,

As mads.engelund mentioned above, since if there is gate voltage, this matters how the source/drain bias are set, so I guess electrode_voltages=(0.5*bias,-0.5*bias) and electrode_voltages=(bias,0) are different in the actual dealing with the chemicalpotential of the two electrodes.

For the former specification, the left electrode is shifted down by 0.5*bias and the right electrode is shift up by 0.5*bias, while for the latter specification, only the left electrode is shifted by bias. Altought the relative potential differences is the same for these two cases, this will bring different congence steps for the two calculations if both of them are from converged electrode_voltages=(0,0).

Am I right?

With best regards,

Guangping

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Bias loop question
« Reply #6 on: April 19, 2016, 17:07 »
If you have gates present in the system, this can be the case (if also the two electrodes have different work functions), otherwise not.

Offline zhangguangping

  • QuantumATK Guru
  • ****
  • Posts: 193
  • Country: cn
  • Reputation: 2
    • View Profile
Re: Bias loop question
« Reply #7 on: April 19, 2016, 17:29 »
Dear Anders, Thanks for your reply. You mean, if there is gate voltage or I have two different electrodes, in order to get a quick convergence, I had better to use electrode_voltages=(0.5*bias,-0.5*bias) than electrode_voltages=(1.0*bias, 0.0*bias)? And If I have the same electrode and there are no gate voltage, electrode_voltages=(0.5*bias,-0.5*bias) and electrode_voltages=(1.0*bias, 0.0*bias) are exactly the same? Also, another qestion that may related to this thread that if I just want to get the transmission spectrum and current for 1.0 V based on a 0.0 V converged *nc file, I should write in the py file that
Code
device_configuration = nlread("Au-C6H4S2-Au-0.0.nc")[0]

calculator=calculator(
        electrode_voltages=(0.5*Volt, -0.5*Volt))

device_configuration.setCalculator(
      calculator(),
      initial_state=device_configuration)
device_configuration.update()
nlsave("Au-C6H4S2-Au-1.0.nc", device_configuration)

transmission_spectrum = TransmissionSpectrum(
    configuration=device_configuration,
    energies=numpy.linspace(-2,2,400)*eV,
    kpoints=MonkhorstPackGrid(6,6),
    energy_zero_parameter=AverageFermiLevel,
    infinitesimal=1.36057e-05*eV,
    self_energy_calculator=RecursionSelfEnergy(),
    )
nlsave("Au-C6H4S2-Au-1.0.nc", transmission_spectrum)
nlprint(transmission_spectrum)

iv_curve = IVCurve(
configuration=device_configuration,
biases=[1.0, ]*Volt,
energies=numpy.linspace(-2,2,101)*eV,
kpoints=MonkhorstPackGrid(6,6),
self_energy_calculator=RecursionSelfEnergy(),
energy_zero_parameter=AverageFermiLevel,
infinitesimal=1e-06*eV,
selfconsistent_configurations_filename="Au-C6H4S2-Au-1.0.nc",
)
nlsave('Au-C6H4S2-Au-1.0.nc', iv_curve)
nlprint(iv_curve)
For the transmission spectrum calculation, I have no doubt, but for the cuurrent calculation, I think the ATK will calculate again the transmission spectrum and then get the current. How can I calculate the current based on the already calculated transmission spectrum? Thanks so much.
« Last Edit: April 19, 2016, 17:33 by zhangguangping »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Bias loop question
« Reply #8 on: April 19, 2016, 21:52 »
Let's start with the simple one. To calculate the current, you call the method .current() on the transmission spectrum, and of course this will not trigger a new calculation of the transmission spectrum, since you already have it.

Generally speaking, only the difference in left and right electrodes matter for the bias. So -0.5/0,5 is exactly the same as -1/0. This is not dependent on whether the electrodes are the same or not, and in a sense also not on whether you have gates or not. The whole discussion about gates is only relevant when it comes to defining the zero-point of the gate voltage, i.e. does "0 V" gate bias really mean no gate voltage - this depends on the relative work function of the gate and the electrodes.

So for any practical purpose, as long as the structure doesn't change, it does not matter (for convergence speed or any computational parts) how you define the electrode voltages, only their difference.


Offline zhangguangping

  • QuantumATK Guru
  • ****
  • Posts: 193
  • Country: cn
  • Reputation: 2
    • View Profile
Re: Bias loop question
« Reply #9 on: April 20, 2016, 01:59 »
Dear Anders,

Thanks for your reminder. I am not aware of there is a .current() method for TransmissionSpectrum class. If, say for self-consistent, one should use the same electrode bias as that in the self-consistent calculation. Otherwise, the transmission spectrum is calculated in a non self-consistent way. Also, if the bias effect is not important, one can approximately calculate a current-voltage curve using one converged density matrix.

With best.

Guangping
« Last Edit: April 20, 2016, 03:05 by zhangguangping »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Bias loop question
« Reply #10 on: April 20, 2016, 05:20 »
That's how you calculate the current, how else do you do it? :)

Sure,  you can calculate the linear response current without doing each bias point self-consistently, but it's typically a very rough approximation.

Offline zhangguangping

  • QuantumATK Guru
  • ****
  • Posts: 193
  • Country: cn
  • Reputation: 2
    • View Profile
Re: Bias loop question
« Reply #11 on: April 20, 2016, 07:38 »
Dear Anders, Thanks for your reply. I used TranSIESTA before, and I have to do the transmission spectrum and the current under each bias point. Now I have turned to ATK. And till now I never use ATK to do a current calculation. I just ask this question beacause the IVCurve() class do a implicit loop over bias and store the current in a *nc file. So, I think it would be sometime inconvenient to manipulate the data. Now, I use the following script to do a tranmission spectrum and current calculation
Code
device_configuration.setCalculator(calculator)

device_configuration = nlread("Au-C6H4S2-Au.nc")[1]

Voltage = [0.0, 0.2, 0.4]*Volt

for bias in Voltage:
    calculator=calculator(
            electrode_voltages=(bias/2, -bias/2))

    device_configuration.setCalculator(
          calculator(),
          initial_state=device_configuration)
    device_configuration.update()
    nlsave("Au-C6H4S2-Au-%.1f.nc" % bias.inUnitsOf(Volt), device_configuration)

    transmission_spectrum = TransmissionSpectrum(
        configuration=device_configuration,
        energies=numpy.linspace(-2,2,400)*eV,
        kpoints=MonkhorstPackGrid(6,6),
        energy_zero_parameter=AverageFermiLevel,
        infinitesimal=1.36057e-05*eV,
        self_energy_calculator=RecursionSelfEnergy(),
        )
    nlsave("Au-C6H4S2-Au-%.1f.nc" % bias.inUnitsOf(Volt), transmission_spectrum)
    nlprint(transmission_spectrum)
    transmission_spectrum.current()
I think this would be very convenient. Again, I have tested the Au-C6H4S2-Au-*.nc can be used to be the initial guess for the next bias step calculation, and also can be used to do a post analysis calcualtion, such as MPSH, Total Energy, DOS analysis. With best regards, /Guangping

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Bias loop question
« Reply #12 on: April 20, 2016, 08:03 »
I too personally prefer the "manual" way of looping over biases, as you have shown :)