Example #1
0
    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$')
    ax.set_ylim(1.1 * minlndos, maxlndos)
    # ax.set_xlim(-5, -0.3)
    ax.set_xlim(mine, maxe)
    ax.set_ylabel(r'$\ln DOS$')
    # ax.legend(loc='best').get_frame().set_alpha(0.25)
    if 'tmi' in sys.argv:
        plt.title(
Example #2
0
    plt.cla()

    basename = dataformat % frame
    old_min_T = min_T
    min_T = readandcompute.minT_from_transitions(basename)
    # e, diff = readandcompute.e_diffusion_estimate(basename)

    try:
        N = readandcompute.read_N(basename)
        ax.axvline(-readandcompute.max_entropy_state(basename),
                   color='r',
                   linestyle=':')
        ax.axvline(-readandcompute.min_important_energy(basename),
                   color='b',
                   linestyle=':')
        ax.axvline(-readandcompute.converged_state(basename + '-lndos.dat'),
                   color='c',
                   linestyle=':')
    except:
        pass

    e, init_hist = readandcompute.e_and_total_init_histogram(basename)
    if min_T != old_min_T:
        print('min_T goes from', old_min_T, 'to', min_T)
        baseline_init_hist = init_hist
        baseline_e = e
    ax.plot(e,
            init_hist,
            'b-',
            label=r'%e initialization iterations' %
            (sum(init_hist) / float(N)))
Example #3
0
for frame in xrange(numframes):
    if frame % 10 == 0:
        print 'working on frame %d/%d' % (frame, numframes)
    plt.cla()

    basename = dataformat % frame
    old_min_T = min_T
    min_T = readandcompute.minT_from_transitions(basename)
    # e, diff = readandcompute.e_diffusion_estimate(basename)

    try:
        N = readandcompute.read_N(basename)
        ax.axvline(-readandcompute.max_entropy_state(basename), color='r', linestyle=':')
        ax.axvline(-readandcompute.min_important_energy(basename), color='b', linestyle=':')
        ax.axvline(-readandcompute.converged_state(basename+'-lndos.dat'), color='c', linestyle=':')
    except:
        pass

    e, init_hist = readandcompute.e_and_total_init_histogram(basename)
    if min_T != old_min_T:
        print 'min_T goes from', old_min_T, 'to', min_T
        baseline_init_hist = init_hist
        baseline_e = e
    ax.plot(e, init_hist, 'b-',
            label=r'%e initialization iterations' % (sum(init_hist)/float(N)))
    # newstuff below is init_hist - baseline_init_hist, but takes into
    # account the fact that these arrays might not be the same size.
    # So we look up the element with the corresponding energy.
    if len(e) != len(baseline_e):
        newstuff = 1.0*init_hist
Example #4
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))
    plt.legend(loc='best')

    fname = '%s/frame%06d.png' % (moviedir, frame)
Example #5
0
    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$')
    ax.set_ylim(1.1*minlndos, maxlndos)
    # ax.set_xlim(-5, -0.3)
    ax.set_xlim(mine, maxe)
    ax.set_ylabel(r'$\ln DOS$')
    # ax.legend(loc='best').get_frame().set_alpha(0.25)
    if 'tmi' in sys.argv:
        plt.title(r'lv movie with $\lambda = %g$, $\eta = %g$, $%g\times %g$ ($T_{min} = %g$) tmi'
                  % (ww, ff, lenx, lenyz, min_T))
    elif 'toe' in sys.argv: