Author Topic: Transmission pathways calculation from Transmission Spectrum?  (Read 5016 times)

0 Members and 1 Guest are viewing this topic.

Offline Ashutosh

  • Regular QuantumATK user
  • **
  • Posts: 7
  • Country: us
  • Reputation: 0
    • View Profile
Hi

I followed the mini tutorial to calculate transmission spectrum and I-V curve for a device (http://www.quantumwise.com/publications/tutorials/mini-tutorials/98-i-v-curve-and-voltage-drop). I was wondering if it is possible to calculate transmission pathways from the calculated transmission spectra. Since my devices are big, i break it into parts for different biases. Also, if I try to calculate transmission spectrum separately from the scf calculation or the calculated transmission spectra, what should the script look like for spin resolved case? Will I have to calculate for individual spin separately?

Thanks

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Transmission pathways calculation from Transmission Spectrum?
« Reply #1 on: January 21, 2013, 23:28 »
The pathways (as indeed all "analysis quantities") can be computed afterwards, from the saved states in the NC files. It's not done from the transmission spectrum, however, it's from the configuration. So, identify which configuration that is relevant, and make a note of its object ID; it will be often be gID000 if there is only one configuration in the file. Then you read the state from there, and compute whatever you want.
Code: python
configuration = nlread("file.nc", object_id="gID000")[0]
transmission_pathway = TransmissionPathway(configuration, ...)
nlsave(transmission_pathway, "results.nc")
You can use the Script Generator for this; insert "Analysis From File" and double-click it to specify the filename and object ID, and then insert Analysis blocks as usual.

Offline Ashutosh

  • Regular QuantumATK user
  • **
  • Posts: 7
  • Country: us
  • Reputation: 0
    • View Profile
Re: Transmission pathways calculation from Transmission Spectrum?
« Reply #2 on: January 22, 2013, 23:25 »
Hi Anders

Thank you very much for the response. I was trying to use the similar script for transmission pathways, but I was reading the scf output file differently. I was using the version given for IV curve calculation, for different biases, and it kept running for long time without writing anything. I thought it should work on giving me pathways for a range of energies in one file (with command, energies=numpy.linspace(-2,4,50)*eV and for configurations at different biases. Is it incorrect way to do that?

Regards
Ashutosh

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Transmission pathways calculation from Transmission Spectrum?
« Reply #3 on: January 22, 2013, 23:28 »
Perhaps not... but it's a bit hard to tell, would be better to see the actual script.

Offline Ashutosh

  • Regular QuantumATK user
  • **
  • Posts: 7
  • Country: us
  • Reputation: 0
    • View Profile
Re: Transmission pathways calculation from Transmission Spectrum?
« Reply #4 on: January 24, 2013, 23:20 »
Hi Anders Below is the script I was trying to use to calculate for the file containing scf data for different biases, where I could change the bias and also have the pathways calcualted for a range of energies. (Similar to the way IV calculation script was written)
Code
scf_filename = "analysis_%g.nc"
analysis_filename = "pathways_0v.nc"
biases = [0]
configurations = [] 
for bias in biases: 
     configurations.append(nlread(scf_filename % bias, DeviceConfiguration)[0])
biases = [float(conf.calculator().electrodeVoltages()[0]-conf.calculator().electrodeVoltages()[1]) for conf in configurations]
configurations = [configurations[j] for j in numpy.argsort(biases)]
for configuration in configurations:
        calculator = configuration.calculator()
        bias = calculator.electrodeVoltages()[0]-calculator.electrodeVoltages()[1]
        if float(bias) == 0. :  
                zero_bias_potential = ElectrostaticDifferencePotential(configuration) 
                break  
for configuration in configurations:  
    calculator = configuration.calculator()
    bias = calculator.electrodeVoltages()[0]-calculator.electrodeVoltages()[1]
    transmission_pathways = TransmissionPathways(
        configuration=configuration,
        energies=numpy.linspace(-2,8,100)*eV,
        kpoints=MonkhorstPackGrid(1,1),
        energy_zero_parameter=AverageFermiLevel,
        infinitesimal=1e-06*eV,
        contributions=Left,
        spin=Spin.Up,
        self_energy_calculator=DirectSelfEnergy(),
    )
nlsave(analysis_filename, transmission_pathways)
nlprint(transmission_pathways)
geometry = nlread('analysis_0_long.nc', DeviceConfiguration, read_state = False)[0]  
nlsave(analysis_filename, geometry)
Could you please see if this approach can be applied? Thanks

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Transmission pathways calculation from Transmission Spectrum?
« Reply #5 on: January 25, 2013, 22:40 »
Yes, but not exactly like that. You can only specify one energy for TransmissionPathway, so you need to loop explicitly. You can also remove the first loop over configurations, you don't need the zero-bias potential for anything. So:
Code: python
analysis_filename = "pathways.nc"

# Read the configurations
scf_filename = "analysis_%g.nc"
biases = [ 0 ]
configurations = [] 
for bias in biases: 
     configurations.append(nlread(scf_filename % bias, DeviceConfiguration)[0])
     
# Sort the configurations by bias
biases = [float(conf.calculator().electrodeVoltages()[0]-conf.calculator().electrodeVoltages()[1]) for conf in configurations]
configurations = [configurations[j] for j in numpy.argsort(biases)]

# Loop over bias and energies
energies = numpy.linspace(-2,8,100)
for configuration in configurations:
    bias = float(configuration.calculator().electrodeVoltages()[0]-configuration.calculator().electrodeVoltages()[1])
    for energy in energies:
        transmission_pathways = TransmissionPathways(
            configuration=configuration,
            energy=energy*eV,
            kpoints=MonkhorstPackGrid(1,1),
            contributions=Left,
            spin=Spin.Up,
            self_energy_calculator=RecursionSelfEnergy(),
        )
        nlsave(analysis_filename, transmission_pathways, object_id="Bias %s E %s" % (bias,energy))

# Read the configuration (once) without state, just the geometry for convenient plotting
geometry = nlread('analysis_0_long.nc', DeviceConfiguration, read_state = False)[0]  
nlsave(analysis_filename, geometry)
Hope I didn't make any mistake, I can't test it my self. Also, always be careful to be consistent with indentation - always just 4 spaces and never tabs.
« Last Edit: January 29, 2013, 20:46 by Anders Blom »

Offline Ashutosh

  • Regular QuantumATK user
  • **
  • Posts: 7
  • Country: us
  • Reputation: 0
    • View Profile
Re: Transmission pathways calculation from Transmission Spectrum?
« Reply #6 on: January 29, 2013, 16:30 »
Hi Anders

Thank you very much. I am trying to test it. I will let you know how it goes.


Offline Ashutosh

  • Regular QuantumATK user
  • **
  • Posts: 7
  • Country: us
  • Reputation: 0
    • View Profile
Re: Transmission pathways calculation from Transmission Spectrum?
« Reply #7 on: January 29, 2013, 20:18 »
It's giving me the following error:

Quote
SyntaxError: invalid syntax
  File "path.py", line 4
biases = <ul style="margin-top: 0; margin-bottom: 0;"><li type="circle"></li></ul>configurations = []

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Transmission pathways calculation from Transmission Spectrum?
« Reply #8 on: January 29, 2013, 20:44 »
It's because the hard braces with a zero in between gets interpreted as formatting code for the Forum, not as Python code :o
I fixed it above.
« Last Edit: January 29, 2013, 20:47 by Anders Blom »

Offline Ashutosh

  • Regular QuantumATK user
  • **
  • Posts: 7
  • Country: us
  • Reputation: 0
    • View Profile
Re: Transmission pathways calculation from Transmission Spectrum?
« Reply #9 on: January 29, 2013, 21:53 »
Thank you very much. I should have noticed it as it should have been similar to the previous script I was using, but I missed it. Thanks a lot, again. I will update you how it goes.