In [1]:
import os
import sys
import random
import time
from random import seed, randint
import argparse
import platform
from datetime import datetime
import imp
import numpy as np
import fileinput
from itertools import product
import pandas as pd
from scipy.interpolate import griddata
from scipy.interpolate import interp2d
import seaborn as sns
from os import listdir

import matplotlib.pyplot as plt
import seaborn as sns
from scipy.interpolate import griddata
import matplotlib as mpl
sys.path.insert(0,'..')
from notebookFunctions import *
# from .. import notebookFunctions

%matplotlib inline
plt.rcParams['figure.figsize'] = (10,6.180)    #golden ratio
# %matplotlib notebook
%load_ext autoreload
%autoreload 2

In [26]:
fig, ax = plt.subplots()
ax.plot(x_DMPC, f_DMPC, 'r', label='DMPC')
ax.plot(x_DOPC, f_DOPC, 'b', label='DOPC')
ax.plot(x_POPC, f_POPC, 'y', label='POPC')
ax.plot(x_DPPC, f_DPPC, 'black', label='DPPC')
# Now add the legend with some customizations.
legend = ax.legend(loc='upper right', shadow=True)



In [19]:
x_DMPC = np.array(range(len(f_DMPC)))
x_DOPC = np.array(range(len(f_DOPC)))
x_POPC = np.array(range(len(f_POPC)))
x_DPPC = np.array(range(len(f_DPPC)))
plt.plot(x_DMPC, f_DMPC, x_DOPC, f_DOPC, x_POPC, f_POPC, x_DPPC, f_DPPC)



In [7]:
pre = "/Users/weilu/Research/server/apr_2018/02_week"
temp = 260
location = pre + "/sixth_DMPC/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f_DMPC = shortest_path(location2, start=(1, 14), end=(28,24), save=False, xlabel="z_h6", ylabel="Qw")
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location2 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location2, zmax=100)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)


<matplotlib.colors.LinearSegmentedColormap object at 0x110423e10>
Out[7]:
[<matplotlib.lines.Line2D at 0x1a1ca0eb70>]

In [8]:
pre = "/Users/weilu/Research/server/apr_2018/02_week"
temp = 260
location = pre + "/sixth_DOPC/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f_DOPC = shortest_path(location2, start=(1, 14), end=(28,24), save=False, xlabel="z_h6", ylabel="Qw")
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location2 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location2, zmax=100)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)


<matplotlib.colors.LinearSegmentedColormap object at 0x110423e10>
Out[8]:
[<matplotlib.lines.Line2D at 0x116523908>]

In [9]:
pre = "/Users/weilu/Research/server/apr_2018/02_week"
temp = 260
location = pre + "/sixth_DPPC/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f_DPPC = shortest_path(location2, start=(1, 14), end=(28,24), save=False, xlabel="z_h6", ylabel="Qw")
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location2 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location2, zmax=100)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)


<matplotlib.colors.LinearSegmentedColormap object at 0x110423e10>
Out[9]:
[<matplotlib.lines.Line2D at 0x1a1cf80940>]

In [10]:
pre = "/Users/weilu/Research/server/apr_2018/02_week"
temp = 260
location = pre + "/sixth_POPC/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f_POPC = shortest_path(location2, start=(1, 14), end=(28,24), save=False, xlabel="z_h6", ylabel="Qw")
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location2 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location2, zmax=100)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)


<matplotlib.colors.LinearSegmentedColormap object at 0x110423e10>
Out[10]:
[<matplotlib.lines.Line2D at 0x1a1cbed1d0>]

In [ ]: