QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: chethankumar_m on February 14, 2017, 07:10

Title: Conductance calculation
Post by: chethankumar_m on February 14, 2017, 07:10
hi,
I am trying to calculate conductance from transmission spectrum and I followed the previous tutorials and wrote the input file as below. but I am getting an error like

"File "cond100.py", line 4
    conductance = transmission_spectrum.conductance(electrode_temperatures=[300.,t]*Kelvin)
IndentationError: unexpected indent"

please mention if any modification has to be made or any other method to calculate Conductance.

Thank you                 
Title: Re: Conductance calculation
Post by: Ulrik G. Vej-Hansen on February 14, 2017, 08:59
You need to remove the indentations in line 4 and 5. In Python, indentation is used to indicate code belonging to a block, and conversely, it cannot be used outside one of those. However, this will also give an error, because you have a "t" in line  which is never defined. Actually, you should remove line 5 entirely, and then amend the current line 7 accordingly.