Beispiel #1
0
print('maxlndos', maxlndos)
print('numframes', numframes)

for frame in range(numframes):
    if frame % 10 == 0:
        print('working on frame %d/%d' % (frame, numframes))
    plt.cla()

    basename = dataformat % frame

    e, lndos = readandcompute.e_lndos(basename)
    ax.plot(e, lndos, 'k-')
    datname = basename + '-lndos.dat'
    min_T = readandcompute.minT(datname)
    try:
        ax.axvline(-readandcompute.max_entropy_state(basename),
                   color='r',
                   linestyle=':')
        min_important_energy = readandcompute.min_important_energy(basename)
        ax.axvline(-min_important_energy, color='b', linestyle=':')
        ax.plot(e, (e + min_important_energy) / min_T +
                lndos[min_important_energy], 'g--')
        ax.axvline(-readandcompute.converged_state(datname),
                   color='c',
                   linestyle=':')
    except:
        pass
    e, lnw = readandcompute.e_lnw(basename)
    ax.plot(e, -lnw, 'r:')

    ax.set_xlabel(r'$E$')
Beispiel #2
0
for frame in xrange(numframes):
    if frame % 10 == 0:
        print 'working on frame %d/%d' % (frame, numframes)
    plt.cla()

    for suffix_index in range(len(suffixes)):
        suffix = suffixes[suffix_index]
        basename = dataformat % (suffix, frame*skipby)

        try:
            e, hist = readandcompute.e_and_total_init_histogram(basename)
            ax.plot(e, hist, colors[suffix_index]+'-', label=suffix)
            datname = basename+'-transitions.dat'
            min_T = readandcompute.minT(datname)
            ax.axvline(-readandcompute.max_entropy_state(basename), color='r', linestyle=':')
            min_important_energy = readandcompute.min_important_energy(basename)
            ax.axvline(-min_important_energy, color='b', linestyle=':')
            ax.axvline(-readandcompute.converged_state(datname), color=colors[suffix_index], linestyle=':')
        except (KeyboardInterrupt, SystemExit):
            raise
        except:
            pass

    ax.set_xlabel(r'$E$')
    ax.set_ylim(0, maxhist)
    # ax.set_xlim(-5, -0.3)
    ax.set_xlim(mine, maxe)
    ax.set_ylabel(r'histogram')
    # ax.legend(loc='best').get_frame().set_alpha(0.25)
    plt.title(r'lv movie from %s ($T_{min} = %g$)' % (filename, min_T))
Beispiel #3
0
ffs = eval(sys.argv[2])
#arg ffs = [[0.1,0.2,0.3]]
lenx = float(sys.argv[3])
#arg lenx = [50,100]
lenyz = float(sys.argv[4])
#arg lenyz = [10]

fig, axD = plt.subplots()
axT = plt.twinx()

for ff in ffs:
    basename = 'data/lv/ww%.2f-ff%.2f-%gx%g' % (ww, ff, lenx, lenyz)
    e, diff = readandcompute.e_diffusion_estimate(basename)
    N = readandcompute.read_N(basename)
    axD.plot(e, diff, label=r'$\eta = %g$' % ff)
    axD.axvline(-readandcompute.max_entropy_state(basename) / N, linestyle=':')
    axD.axvline(-readandcompute.min_important_energy(basename) / N,
                linestyle='--')

    T, u, cv, s, minT = readandcompute.T_u_cv_s_minT(basename)
    axT.plot(u / N, T, 'r-')
    axT.set_ylim(0, 3)
    axT.axhline(minT, color='r', linestyle=':')

    e, hist = readandcompute.e_hist(basename)
    axT.plot(e / N, 2.5 * hist / hist.max(), 'k:')

    e, init_hist = readandcompute.e_and_total_init_histogram(basename)
    for i in range(len(e)):
        print(e[i], (2.5 * init_hist / init_hist.max())[i])
    axT.plot(e, 2.5 * init_hist / init_hist.max(), 'c--')
Beispiel #4
0
all_colors = ['b', 'r', 'g', 'k']
colors = {}
for i in xrange(len(ffs)):
    colors[ffs[i]] = all_colors[i]

sleeptime = 30*60 # 30 minutes

for frame in xrange(100000):
    plt.cla()
    for ff in ffs:
        basename = 'data/lv/ww%.2f-ff%.2f-%gx%g' % (ww,ff,lenx,lenyz)
        e, diff = readandcompute.e_diffusion_estimate(basename)

        N = readandcompute.read_N(basename);
        try:
            ax.axvline(-readandcompute.max_entropy_state(basename)/N, color=colors[ff], linestyle=':')
            ax.axvline(-readandcompute.min_important_energy(basename)/N, color=colors[ff], linestyle=':')

            T, u, cv, s, minT = readandcompute.T_u_cv_s_minT(basename)
            ax.plot(u/N, T, 'k-')
            ax.set_ylim(0, 3)
            ax.axhline(minT, color='r', linestyle=':')

            e, hist = readandcompute.e_hist(basename)
            iterations = readandcompute.iterations(basename)
            ax.plot(e/N, 2.5*hist/hist.max(), colors[ff]+'-', label=r'$\eta = %g$, %e iterations' % (ff, iterations))
        except:
            pass

        e, init_hist = readandcompute.e_and_total_init_histogram(basename)
        ax.plot(e, 2.5*init_hist/init_hist.max(), colors[ff]+'--',
Beispiel #5
0
ffs = eval(sys.argv[2])
#arg ffs = [[0.1,0.2,0.3]]
lenx = float(sys.argv[3])
#arg lenx = [50,100]
lenyz = float(sys.argv[4])
#arg lenyz = [10]

fig, axD = plt.subplots()
axT = plt.twinx()

for ff in ffs:
    basename = 'data/lv/ww%.2f-ff%.2f-%gx%g' % (ww,ff,lenx,lenyz)
    e, diff = readandcompute.e_diffusion_estimate(basename)
    N = readandcompute.read_N(basename);
    axD.plot(e, diff, label=r'$\eta = %g$' % ff)
    axD.axvline(-readandcompute.max_entropy_state(basename)/N, linestyle=':')
    axD.axvline(-readandcompute.min_important_energy(basename)/N, linestyle='--')

    T, u, cv, s, minT = readandcompute.T_u_cv_s_minT(basename)
    axT.plot(u/N, T, 'r-')
    axT.set_ylim(0, 3)
    axT.axhline(minT, color='r', linestyle=':')

    e, hist = readandcompute.e_hist(basename)
    axT.plot(e/N, 2.5*hist/hist.max(), 'k:')

    e, init_hist = readandcompute.e_and_total_init_histogram(basename)
    for i in xrange(len(e)):
        print e[i], (2.5*init_hist/init_hist.max())[i]
    axT.plot(e, 2.5*init_hist/init_hist.max(), 'c--')