Exemple #1
0
    plt.cla()
    ax.plot(best_e, best_lndos, ':', color='0.5')

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

        try:
            e, lndos, ps, lndostm = readnew.e_lndos_ps_lndostm(basename)
            colors.plot(e, lndos, method=suffix)
            #if lndostm is not None and suffix[:2] != 'sa':
            #    colors.plot(e, lndostm, method=suffix+'-tm')
            datname = basename + '-lndos.dat'
            min_T = readnew.minT(datname)
            too_lo, too_hi = readnew.too_low_high_energy(datname)
            ax.axvline(-readnew.max_entropy_state(datname),
                       color='r',
                       linestyle=':')
            min_important_energy = int(readnew.min_important_energy(datname))
            ax.axvline(-min_important_energy, color='b', linestyle=':')
            if too_lo is not None and suffix[:3] == 'sad':
                ax.axvline(-too_lo, color='b', linestyle='--')
            if too_lo is not None and suffix[:3] == 'sad':
                ax.axvline(-too_hi, color='r', linestyle='--')
            # Uncomment the following to plot a line at the
            # min_important_energy with slope determined by min_T
            # ax.plot(e, (e+min_important_energy)/min_T + lndos[min_important_energy], colors[suffix_index]+'--')
            # ax.axvline(-readnew.converged_state(datname), color=colors.color(suffix), linestyle=':')
            # Uncomment the following to plot the lnw along with the lndos
            # e, lnw = readnew.e_lnw(basename)
            # ax.plot(e, -lnw, colors[suffix_index]+':')
Exemple #2
0
all_methods = ['-tmi3', '-tmi2', '-tmi', '-toe', '-tmmc']
methods = []
prettymethods = []

T = []
u = []

energy = []
lndos = []
ps = []
hist = []

fref = 'data/lv/ww%.2f-ff%.2f-%gx%g-tmi3-dos.dat' % (ww, ff, lenx, lenyz)
energy_ref, lndos_ref = readnew.e_lndos(fref)
max_entropy_state = readnew.max_entropy_state(fref)

for method in all_methods:
    try:
        fbase = 'data/lv/ww%.2f-ff%.2f-%gx%g%s-movie/%s' % (
            ww, ff, lenx, lenyz, method, number)
        myT, myu, mycv, mys, myminT = readnew.T_u_cv_s_minT(fbase)
        myenergy, mylndos, myps = readnew.e_lndos_ps(fbase)
        _, myhist = readnew.e_hist(fbase)

    except:
        continue
    energy.append(myenergy[:len(lndos_ref)])
    lndos.append(mylndos[:len(lndos_ref)])
    ps.append(myps[:len(lndos_ref)])
    newhist = np.zeros_like(lndos_ref)
Exemple #3
0
for j in range(len(split2)):
    methods.append('-%s' % split2[j])

# For SAMC compatibility with LVMC
lvextra1 = glob('data/%s-samc*-movie' % filebase)
split3 = [i.split('%s-' % filebase, 1)[-1] for i in lvextra1]
split4 = [i.split('-m', 1)[0] for i in split3]
for j in range(len(split4)):
    methods.append('-%s' % split4[j])

print methods

ref = reference
if ref[:len('data/')] != 'data/':
    ref = 'data/' + ref
maxref = int(readnew.max_entropy_state(ref))
minref = int(readnew.min_important_energy(ref))
n_energies = int(minref - maxref + 1)
print maxref, minref
try:
    eref, lndosref, Nrt_ref = readnew.e_lndos_ps(ref)
except:
    eref, lndosref = readnew.e_lndos(ref)

for method in methods:
    dirname = 'data/comparison/%s%s' % (filebase, method)
    dirnametm = 'data/comparison/%s%s-tm' % (filebase, method)
    try:
        r = glob('data/%s%s-movie/*lndos.dat' % (filebase, method))
        if len(r) == 0:
            # print(" ... but it has no data in data/%s%s-movie/*lndos.dat" % (filebase,method))
Exemple #4
0
    plt.cla()
    ax.plot(best_e, best_lndos, ':', color='0.5')

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

        try:
            e, lndos, ps, lndostm = readnew.e_lndos_ps_lndostm(basename)
            colors.plot(e, lndos, method=suffix)
            #if lndostm is not None and suffix[:2] != 'sa':
            #    colors.plot(e, lndostm, method=suffix+'-tm')
            datname = basename+'-lndos.dat'
            min_T = readnew.minT(datname)
            too_lo, too_hi = readnew.too_low_high_energy(datname)
            ax.axvline(-readnew.max_entropy_state(datname), color='r', linestyle=':')
            min_important_energy = int(readnew.min_important_energy(datname))
            ax.axvline(-min_important_energy, color='b', linestyle=':')
            if too_lo is not None and suffix[:3] == 'sad':
              ax.axvline(-too_lo, color='b', linestyle='--')
            if too_lo is not None and suffix[:3] == 'sad':
              ax.axvline(-too_hi, color='r', linestyle='--')
            # Uncomment the following to plot a line at the
            # min_important_energy with slope determined by min_T
            # ax.plot(e, (e+min_important_energy)/min_T + lndos[min_important_energy], colors[suffix_index]+'--')
            # ax.axvline(-readnew.converged_state(datname), color=colors.color(suffix), linestyle=':')
            # Uncomment the following to plot the lnw along with the lndos
            # e, lnw = readnew.e_lnw(basename)
            # ax.plot(e, -lnw, colors[suffix_index]+':')
        except (KeyboardInterrupt, SystemExit):
            raise
Exemple #5
0
for j in range(len(split2)):
    methods.append('-%s' %split2[j])

# For SAMC compatibility with LVMC
lvextra1 = glob('data/%s-samc*-movie' % filebase)
split3 = [i.split('%s-'%filebase, 1)[-1] for i in lvextra1]
split4 = [i.split('-m', 1)[0] for i in split3]
for j in range(len(split4)):
    methods.append('-%s' %split4[j])

print methods

ref = reference
if ref[:len('data/')] != 'data/':
    ref = 'data/' + ref
maxref = int(readnew.max_entropy_state(ref))
minref = int(readnew.min_important_energy(ref))
n_energies = int(minref - maxref+1)
print maxref, minref
try:
    eref, lndosref, Nrt_ref = readnew.e_lndos_ps(ref)
except:
    eref, lndosref = readnew.e_lndos(ref)

for method in methods:
    dirname = 'data/comparison/%s%s' % (filebase,method)
    dirnametm = 'data/comparison/%s%s-tm' % (filebase,method)
    try:
        r = glob('data/%s%s-movie/*lndos.dat' % (filebase,method))
        if len(r)==0:
            # print(" ... but it has no data in data/%s%s-movie/*lndos.dat" % (filebase,method))
Exemple #6
0
all_methods = [ '-tmi3', '-tmi2', '-tmi', '-toe', '-tmmc']
methods = []
prettymethods = []

T = []
u = []

energy = []
lndos = []
ps = []
hist = []

fref = 'data/lv/ww%.2f-ff%.2f-%gx%g-tmi3-dos.dat' % (ww,ff,lenx,lenyz)
energy_ref,lndos_ref = readnew.e_lndos(fref)
max_entropy_state = readnew.max_entropy_state(fref)

for method in all_methods:
    try:
        fbase = 'data/lv/ww%.2f-ff%.2f-%gx%g%s-movie/%s' % (ww,ff,lenx,lenyz,method,number)
        myT,myu,mycv,mys,myminT = readnew.T_u_cv_s_minT(fbase)
        myenergy,mylndos,myps = readnew.e_lndos_ps(fbase)
        _, myhist = readnew.e_hist(fbase)

    except:
        continue
    energy.append(myenergy[:len(lndos_ref)])
    lndos.append(mylndos[:len(lndos_ref)])
    ps.append(myps[:len(lndos_ref)])
    newhist = np.zeros_like(lndos_ref)
    newhist[:len(myhist)] = myhist