if args.ylimits_fe.lower() != "none":
    ylimits_fe = [float(s) for s in args.ylimits_fe.split()]
else:
    ylimits_fe = None

MARKERS = ["<", ">", "^", "v", "s", "d", "."]

plot_lines(xs,
           ys,
           yerrs=yerrs,
           xlabel=args.fe_xlabel,
           ylabel=args.fe_ylabel,
           out=args.fe_out,
           legends=data_estimator_pairs,
           legend_pos="best",
           legend_ncol=args.legend_ncol_fe,
           legend_fontsize=8,
           markers=MARKERS,
           xlimits=xlimits_fe,
           ylimits=ylimits_fe,
           lw=1.0,
           markersize=4,
           alpha=1.,
           n_xtics=8,
           n_ytics=8)

# plot pmf rmse
start_pmf_ind = args.bin_ind_to_start_to_plot

xs = []
ys = []
yerrs = []
예제 #2
0
weights = weights.ravel()

#----------------------------------------------------------------------
# 1d nmp_core_angle
print("1d nmp_core_angle")
x_range = [float(s) for s in args.xrange.split()]
print("x_range", x_range)

xhist, xcenters = make_1d_hist(x, weights, args.bins_1d_x, range=x_range)

xpmf = -KB * TEMPERATURE * np.log(xhist)

out = "prob_1d_x.pdf"
xlabel = "nmp core angle (deg)"
ylabel = "Probability"
plot_lines([xcenters], [xhist], xlabel=xlabel, ylabel=ylabel, out=out)

out = "pmf_1d_x.pdf"
ylabel = "PMF (kcal/mol)"
plot_lines([xcenters], [xpmf], xlabel=xlabel, ylabel=ylabel, out=out)

#----------------------------------------------------------------------
# 1d lid_core_angle
print("1d lid_core_angle")
y_range = [float(s) for s in args.yrange.split()]
print("y_range", y_range)

yhist, ycenters = make_1d_hist(y, weights, args.bins_1d_y, range=y_range)

ypmf = -KB * TEMPERATURE * np.log(yhist)
"""
plot wham 1d pmf and probability
"""

from _plots import plot_lines
from _wham import load_1d_pmf_prob

wham_pmf_file = "pmf.dat"
x, pmf, pmf_err, prob, prob_err = load_1d_pmf_prob(wham_pmf_file)

xlabel = "lid core angle (deg)"
ylabel = "PMF (kcal/mol)"
out = "pmf.pdf"
plot_lines([x], [pmf], yerrs=[pmf_err], xlabel=xlabel, ylabel=ylabel, out=out)

ylabel = "Probability"
out = "prob.pdf"
plot_lines([x], [prob],
           yerrs=[prob_err],
           xlabel=xlabel,
           ylabel=ylabel,
           out=out)
예제 #4
0
    centers = bin_centers(pmf_bin_edges)
    exact_pmf = U0(centers)

    return centers, exact_pmf


pmf_bin_edges = np.linspace(args.left_most_edge, args.right_most_edge,
                            args.pmf_nbins + 1)
bin_centers, exact_pmf = _exact_pmf(args.system_type, pmf_bin_edges)

if args.xlimits.lower() != "none":
    xlimits = [float(s) for s in args.xlimits.split()]
else:
    xlimits = None

if args.ylimits.lower() != "none":
    ylimits = [float(s) for s in args.ylimits.split()]
else:
    ylimits = None

plot_lines([bin_centers], [exact_pmf],
           xlabel=args.xlabel,
           ylabel=args.ylabel,
           xlimits=xlimits,
           ylimits=ylimits,
           out=args.out,
           lw=2.0)

print("DONE")
    ys.append(y)

if args.xlimits.lower() != "none":
    xlimits = [float(s) for s in args.xlimits.split()]
else:
    xlimits = None

if args.ylimits.lower() != "none":
    ylimits = [float(s) for s in args.ylimits.split()]
else:
    ylimits = None

plot_lines(xs,
           ys,
           xlabel=args.xlabel,
           ylabel=args.ylabel,
           out=args.out,
           legends=labels_without_us,
           legend_pos="best",
           legend_ncol=args.legend_ncol,
           legend_fontsize=8,
           markers=markers,
           colors=colors,
           xlimits=xlimits,
           ylimits=ylimits,
           lw=1.0,
           markersize=3,
           alpha=1.,
           n_xtics=8,
           n_ytics=8)