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 [2]:
data = pd.read_feather("/Users/weilu/Research/server/apr_2018/02_week/unfold_strengthen_h1_h2/24_Apr_220419.feather")

In [3]:
data["Run"] = data["Run"].apply(pd.to_numeric)

In [7]:
fg = sns.FacetGrid(data=data.query("Steps < 2e7"), hue='Folder', size=8, aspect=1.61)
fg.map(plt.scatter, 'Steps', 'Qw').add_legend()


Out[7]:
<seaborn.axisgrid.FacetGrid at 0x1a16273780>

In [19]:
data = pd.read_feather("/Users/weilu/Research/server/apr_2018/03_week/unfold_strengthen_h1_h2_change_lipid/26_Apr_000504.feather")

In [20]:
data["Run"] = data["Run"].apply(pd.to_numeric)

In [22]:
fg = sns.FacetGrid(data=data.query("Steps < 1e7"), hue='Folder', size=8, aspect=1.61)
fg.map(plt.scatter, 'Steps', 'Qw').add_legend()


Out[22]:
<seaborn.axisgrid.FacetGrid at 0x1a154601d0>

In [32]:
fg = sns.FacetGrid(data=data.query("Steps < 1e7 and Distance < 100"), hue='Folder', size=8, aspect=1.61)
fg.map(plt.scatter, 'Steps', 'Distance').add_legend()


Out[32]:
<seaborn.axisgrid.FacetGrid at 0x1a156ae128>

In [31]:
fg = sns.FacetGrid(data=data.query("Steps < 1e7 and Distance < 100 and Folder == 'pressure_0.0_'"), hue='Folder', size=8, aspect=1.61)
fg.map(plt.scatter, 'Steps', 'Distance').add_legend()


Out[31]:
<seaborn.axisgrid.FacetGrid at 0x1a154073c8>

In [29]:
fg = sns.FacetGrid(data=data.query("Steps < 1e7 and Distance < 100 and Folder == 'pressure_0.0_'"), hue='Folder', size=8, aspect=1.61)
fg.map(plt.scatter, 'Distance', 'Qw').add_legend()


Out[29]:
<seaborn.axisgrid.FacetGrid at 0x1a3ef90358>

In [28]:
fg = sns.FacetGrid(data=data.query("Steps < 1e7 and Distance < 100"), hue='Folder', size=8, aspect=1.61)
fg.map(plt.scatter, 'Distance', 'Qw').add_legend()


Out[28]:
<seaborn.axisgrid.FacetGrid at 0x1a2c04f5f8>

In [23]:
data.columns


Out[23]:
Index(['Steps', 'Qw', 'Energy', 'Run', 'Distance', 'AMH-Go', 'Membrane', 'Rg',
       'rg1', 'rg2', 'rg3', 'rg4', 'rg5', 'rg6', 'rg_all', 'Lipid', 'Lipid1',
       'Lipid2', 'Lipid3', 'Lipid4', 'Lipid5', 'Lipid6', 'Lipid7', 'Lipid8',
       'Lipid9', 'Lipid10', 'Lipid11', 'Lipid12', 'Lipid13', 'Lipid14',
       'Lipid15', 'TotalE', 'Folder'],
      dtype='object')

In [11]:
data = pd.read_feather("/Users/weilu/Research/server/apr_2018/03_week/all_data_folder/third_with_h56rerun_1_24_Apr_230220.feather")

In [12]:
data.columns


Out[12]:
Index(['Step', 'Run', 'Temp', 'Qw', 'Energy', 'DisReal', 'Dis_h56',
       'z_average', 'abs_z_average', 'z_h1', 'z_h2', 'z_h3', 'z_h4', 'z_h5',
       'z_h6', 'Distance', 'AMH-Go', 'Membrane', 'Rg', 'rg1', 'rg2', 'rg3',
       'rg4', 'rg5', 'rg6', 'rg_all', 'Lipid', 'Lipid1', 'Lipid2', 'Lipid3',
       'Lipid4', 'Lipid5', 'Lipid6', 'Lipid7', 'Lipid8', 'Lipid9', 'Lipid10',
       'Lipid11', 'Lipid12', 'Lipid13', 'Lipid14', 'Lipid15', 'TotalE',
       'BiasTo'],
      dtype='object')

In [18]:
pre = "/Users/weilu/Research/server/apr_2018/03_week"
temp = 340
location = pre + "/third/_280-350/2d_z_qw/temp_340/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(24, 14), end=(2,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 0x1a109caef0>
Out[18]:
[<matplotlib.lines.Line2D at 0x1a1527bc88>]

In [14]:
pre = "/Users/weilu/Research/server/apr_2018/03_week"
temp = 300
location = pre + "/third/_280-350/2d_z_qw/quick2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(4, 14), end=(25,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 0x1a109caef0>
Out[14]:
[<matplotlib.lines.Line2D at 0x1a4e983358>]

In [10]:
pre = "/Users/weilu/Research/server/apr_2018/03_week"
temp = 300
location = pre + "/third/_280-350/2d_z_qw/quick/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(4, 14), end=(25,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 0x1a109caef0>
Out[10]:
[<matplotlib.lines.Line2D at 0x1a20fd1668>]

In [ ]: