Dear Lee Kwok-Long, To be able to work with Kwant there's no way around learning the basics of Python. There are plenty of good tutorials available on the internet. We recommend the official Python tutorial (https://docs.python.org/2/tutorial/index.html) and “Software carpentry” (http://software-carpentry.org/v5/novice/python/index.html). You wrote:
I want to output the results into a .txt file with the energy in the first column, well depths in the second column, conductance in the third column, so I can plot the contour by origin.
You can add a function print_conductances to the tutorial script: def plot_conductance(sys, energies, welldepths): for energy in energies: for welldepth in welldepths: smatrix = kwant.smatrix(sys, energy, args=[-welldepth]) print energy, welldepth, smatrix.transmission(1, 0) Call it like this: plot_conductance(sys, energies=[0.01 * i for i in xrange(100)], welldepths=[0.01 * i for i in xrange(100)]) The data will be printed as you wished. In order to print it to a file and not to the terminal screen, redirect the output to a file when running the script (this will even work with Windows as far as I know): python script.py >conductance.dat Note that if you want to make a 2d plot of this data, you can directly use matplotlib’s imshow. There’s no need to output the data to a file. Best regards, Christoph