示例#1
0
    g.ylabel('A (1/meV)')
    g.plot(
        Gnuplot.Data(xs, ref, **{'with': 'lines lt 2 lc rgbcolor "blue" lw 2'}),
        Gnuplot.Data(xs, ys, **{'with': 'lines lt 1 lc rgbcolor "red" lw 2'})
    )
    g.hardcopy(name, color=1, terminal='postscript')
    print("File printed to %s" % name)

kelvin = 8.6173423e-5 * 1000 # 1K in meV
n = 1
for k in (0.6, -0.3):
    xs = linspace(-0.6, k, 2000)
    energies = harmonic_energies(hf=0.5)
    T = 5 * 0.5
    print("calc %s" % n); n += 1
    t0 = datetime.utcnow()
    calc = {
        'leads': [
            invibro.Lead(0.0, T, 0.025, linear_coupling(0.5), 50000.0),
            invibro.Lead(0.0, T, 0.025, linear_coupling(0.5), 50000.0)
        ],
        'e_level': 0.0,
        'ph_energy': energies,
        'ph_state': thermal_dist(T, energies)
    }
    ref = lorentzian(xs, calc)
    ys = invibro.density_of_states(xs, calc)
    render(xs, ys, ref, '/tmp/falloff-highT_%s.ps' % k)
    print("finished in: %s" % (datetime.utcnow() - t0))
    print("")
示例#2
0
    g('set yrange [0:200]')
    g('set xtics 1.92,0.04,2.04')
    g('set size 0.5,0.5')
    if first:
        g('set ytics 0,40,320')
    else:
        g('set ytics -80,400,320')
        g('set mytics 10')
    g.plot(Gnuplot.Data(xs, ys / (2 * pi), **{'with': 'lines lc rgbcolor "blue" lw 3'}))
    g.hardcopy(name, color=1, terminal='postscript')
    print("File printed to %s" % name)

matrices = (rho_0, 0.5 * rho_0 + 0.5 * rho_1, rho_1)
fillings = (0.0, 0.5, 1.0)
for n in range(len(matrices)):
    print "\ncalc %i" % (n + 1);
    t0 = datetime.utcnow()
    xs = linspace(1.88, 2.08, 1000)
    ys = invibro.density_of_states(xs, {
        'postprocess': qbar,
        'leads': [
            invibro.Lead(-0.02, T, 0.002, q, 50.0),
            invibro.Lead(-0.02, T, 0.002, q, 50.0)
        ],
        'e_level': 1.98,
        'ph_energy': energies,
        'ph_state': q.dot(matrices[n])
    })
    plot(xs, ys, '/tmp/gnr_filling=%s.ps' % fillings[n], first=(n == 2))
    print "finished in: %s" % (datetime.utcnow() - t0)