In [2]:
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

i235d


In [55]:
plt.plot(range(len(f)), i235d,range(len(f)), orignal_2, range(len(f)), i255d)
plt.savefig("/Users/weilu/Dropbox/GlpG_paper_2018/figures/mutation.png")



In [51]:
pre = "/Users/weilu/Research/server/apr_2018/01_week/"
temp = 260
location = pre + "/sixth_i255d/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False)
# 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)
i255d = f



In [52]:
pre = "/Users/weilu/Research/server/apr_2018/01_week/"
temp = 260
location = pre + "/sixth_i235d/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False)
# 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)
i235d = f



In [53]:
pre = "/Users/weilu/Research/server/apr_2018/01_week/"
temp = 260
location = pre + "/sixth_orignal/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False)
# 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)
orignal_2 = f


higher force


In [40]:
pre = "/Users/weilu/Research/server/apr_2018/01_week/"
temp = 260
location = pre + "/sixth_orignal/_280-350/2d_z_qw/force_0.4/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False)
# 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 0x11528fb70>
Out[40]:
[<matplotlib.lines.Line2D at 0x1a2f91e5c0>]

In [4]:
pre = "/Users/weilu/Research/server/apr_2018/01_week/"
temp = 260
location = pre + "/sixth_i255d/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False)
# 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)
i255d = f



In [25]:
pre = "/Users/weilu/Research/server/mar_2018/05_week/"
temp = 260
location = pre + "/sixth_i235d/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False)
# 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)


---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-25-de5f98cb66b4> in <module>()
      7 # plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
      8 location2 = location + f"evpb-{temp}.dat"
----> 9 (xi,yi,zi) = plot2d(location2, zmax=100)
     10 plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
     11 # plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)

~/opt/notebook/notebookFunctions.py in plot2d(location, temp, zmin, zmax, xlabel, ylabel, title, outname)
     84 def plot2d(location, temp="450", zmin=0, zmax=30, xlabel="xlabel", ylabel="ylabel", title="", outname=None):
     85     titlefontsize = 28
---> 86     data = np.loadtxt(location)
     87     xi, yi, zi = getxyz(data, zmin=zmin, zmax=zmax)
     88     # plt.contour(xi, yi, zi, 50, linewidths=0.25,colors='k')

~/anaconda3/lib/python3.6/site-packages/numpy/lib/npyio.py in loadtxt(fname, dtype, comments, delimiter, converters, skiprows, usecols, unpack, ndmin)
    896                 fh = iter(open(fname, 'U'))
    897             else:
--> 898                 fh = iter(open(fname))
    899         else:
    900             fh = iter(fname)

FileNotFoundError: [Errno 2] No such file or directory: '/Users/weilu/Research/server/mar_2018/05_week//sixth_i235d/_280-350/2d_z_qw/force_0.2/evpb-260.dat'

In [262]:
t = np.loadtxt(location2)

In [263]:
tt = np.where(np.isnan(t), 32, t)

In [259]:
t = t[~np.isnan(t).any(axis=1)]

In [264]:
plt.scatter(tt[:,1], tt[:,2], tt[:,3])


Out[264]:
<matplotlib.collections.PathCollection at 0x1a4a6186a0>

In [238]:
plt.scatter(t[:,1], t[:,2], t[:,3])


Out[238]:
<matplotlib.collections.PathCollection at 0x1a3c42f9b0>

In [269]:
pre = "/Users/weilu/Research/server/mar_2018/05_week"
temp = 260
location = pre + "/sixth_i235d/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False, zmax=32)
# 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)


Ninth freeEnergy

apply 0.06 force, check force 0.05 later. q 0.3, z=-20 is a region I hope the expected distance to be 80.


In [329]:
t = np.loadtxt(location2)

In [333]:
plt.scatter(t[:,1], t[:,2], t[:,3])


Out[333]:
<matplotlib.collections.PathCollection at 0x1a2eceae10>

In [339]:
tt


Out[339]:
array([[  5.00000000e+00,  -4.06340000e+01,   1.48000000e-01, ...,
          0.00000000e+00,  -1.30005700e+03,  -1.32762600e+03],
       [  6.00000000e+00,  -4.06340000e+01,   1.75000000e-01, ...,
          0.00000000e+00,  -1.31851000e+03,  -1.34470900e+03],
       [  3.40000000e+01,  -3.89110000e+01,   1.21000000e-01, ...,
          0.00000000e+00,  -1.20744800e+03,  -1.23625200e+03],
       ..., 
       [  8.75000000e+02,   9.32900000e+00,   1.48000000e-01, ...,
          0.00000000e+00,  -1.46979300e+03,  -1.48809600e+03],
       [  8.76000000e+02,   9.32900000e+00,   1.75000000e-01, ...,
          0.00000000e+00,  -1.37493100e+03,  -1.40183000e+03],
       [  8.77000000e+02,   9.32900000e+00,   2.02000000e-01, ...,
          0.00000000e+00,  -1.38906000e+03,  -1.41404800e+03]])

In [342]:
res = 30
xi = np.linspace(min(t[:,1]), max(t[:,1]), res)
yi = np.linspace(min(t[:,2]), max(t[:,2]), res)

In [344]:
yi


Out[344]:
array([ 0.013     ,  0.03989655,  0.0667931 ,  0.09368966,  0.12058621,
        0.14748276,  0.17437931,  0.20127586,  0.22817241,  0.25506897,
        0.28196552,  0.30886207,  0.33575862,  0.36265517,  0.38955172,
        0.41644828,  0.44334483,  0.47024138,  0.49713793,  0.52403448,
        0.55093103,  0.57782759,  0.60472414,  0.63162069,  0.65851724,
        0.68541379,  0.71231034,  0.7392069 ,  0.76610345,  0.793     ])

In [341]:
xi


Out[341]:
array([-40.634     , -38.91113793, -37.18827586, -35.46541379,
       -33.74255172, -32.01968966, -30.29682759, -28.57396552,
       -26.85110345, -25.12824138, -23.40537931, -21.68251724,
       -19.95965517, -18.2367931 , -16.51393103, -14.79106897,
       -13.0682069 , -11.34534483,  -9.62248276,  -7.89962069,
        -6.17675862,  -4.45389655,  -2.73103448,  -1.00817241,
         0.71468966,   2.43755172,   4.16041379,   5.88327586,
         7.60613793,   9.329     ])

In [356]:
mask = np.ones((res,res))*32
zi = t[:,3]
index_list = t[:,0]
count = 0
for i in range(res):
    for j in range(res):
        pos = i*res + j
        if count < len(index_list):
            if pos == int(index_list[count]):
                mask[i][j] = zi[count]
                count += 1

In [359]:
plt.imshow(mask.T)


Out[359]:
<matplotlib.image.AxesImage at 0x1a488a67b8>

In [353]:
index_li


Out[353]:
(440,)

In [338]:
t = np.loadtxt(location2)
tt = np.where(np.isnan(t), 32, t)
# t = t[~np.isnan(t).any(axis=1)] 
t = tt
plt.scatter(t[:,1], t[:,2], c=t[:,3], cmap="jet")
plt.colorbar()


Out[338]:
<matplotlib.colorbar.Colorbar at 0x1a443e7a20>

In [102]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 300
location = pre + "/ninth_freeEnergy_5_less_temp/_280-350/2d_z_qw/less_bias_force_0.1/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), block=[-15,-10,0.0,0.1], plot1d=True, save=False)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, 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 0x1a13027940>
Out[102]:
[<matplotlib.lines.Line2D at 0x1a4cb1ecf8>]

In [89]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 300
location = pre + "/ninth_freeEnergy_5_less_temp/_280-350/2d_z_qw/quick/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), block=[-15,-10,0.0,0.1], plot1d=True, save=False)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, 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 0x1a13027940>
Out[89]:
[<matplotlib.lines.Line2D at 0x1a543aa2b0>]

In [95]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 300
location = pre + "/ninth_freeEnergy_5/_280-350/2d_z_qw/force_0.1/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), block=[-15,-10,0.0,0.1], plot1d=True, save=False)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, 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 0x1a13027940>
Out[95]:
[<matplotlib.lines.Line2D at 0x1a5437a400>]

In [20]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 320
location = pre + "/ninth_freeEnergy_5_less_temp/_280-350/2d_z_qw/force_0.0/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), block=[-15,-10,0.0,0.2], plot1d=True, save=False)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, 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 0x1a13027940>
Out[20]:
[<matplotlib.lines.Line2D at 0x1a1e629320>]

In [379]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 300
location = pre + "/ninth_freeEnergy_5_less_temp/_280-350/2d_z_qw/high_temp/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), block=[-15,-10,0.0,0.1], plot1d=True, save=False)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, 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 0x112feeda0>
Out[379]:
[<matplotlib.lines.Line2D at 0x1a49248710>]

In [321]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 290
location = pre + "/ninth_freeEnergy_5_less_temp/_280-350/2d_z_qw/force_0.0/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), block=[-20,-15,0.6,0.7], plot1d=True, save=False)
# 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 0x112feeda0>
Out[321]:
[<matplotlib.lines.Line2D at 0x1a526be5f8>]

In [ ]:
block = (0.6, )

In [173]:
np.searchsorted(xi, 20)


Out[173]:
2

In [172]:
xi


Out[172]:
array([ 16.497     ,  19.26941379,  22.04182759,  24.81424138,
        27.58665517,  30.35906897,  33.13148276,  35.90389655,
        38.67631034,  41.44872414,  44.22113793,  46.99355172,
        49.76596552,  52.53837931,  55.3107931 ,  58.0832069 ,
        60.85562069,  63.62803448,  66.40044828,  69.17286207,
        71.94527586,  74.71768966,  77.49010345,  80.26251724,
        83.03493103,  85.80734483,  88.57975862,  91.35217241,
        94.12458621,  96.897     ])

In [376]:
pre = "/Users/weilu/Research/server/mar_2018/05_week"
temp = 290
location = pre + "/ninth_freeEnergy_3/_280-350/2d_z_qw/force_0.0/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), block=[-20,-15,0.6,0.7], plot1d=True, save=False)
# 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 0x112feeda0>
Out[376]:
[<matplotlib.lines.Line2D at 0x1a46b78a58>]

In [57]:
pre = "/Users/weilu/Research/server/mar_2018/05_week"
temp = 280
location = pre + "/ninth_freeEnergy/_280-350/2d_z_qw/force_0.05/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False)
# 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)


---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-57-73b290df60a4> in <module>()
      3 location = pre + "/ninth_freeEnergy/_280-350/2d_z_qw/force_0.05/"
      4 location2 = location + f"pmf-{temp}.dat"
----> 5 path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False)
      6 # plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
      7 # plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)

~/opt/notebook/notebookFunctions.py in shortest_path(location, temp, start, end, res, zmin, zmax, xlabel, ylabel, title, save, plot1d, plot2d)
    147 
    148 def shortest_path(location, temp="450", start=(4,5), end=-1, res=30, zmin=0, zmax=30, xlabel="xlabel", ylabel="ylabel", title="", save=False, plot1d=True, plot2d=True):
--> 149     data = np.loadtxt(location)
    150     xi, yi, zi = getxyz(data, res=res, zmin=zmin, zmax=zmax)
    151     zi = np.where(np.isnan(zi), 50, zi)

~/anaconda3/lib/python3.6/site-packages/numpy/lib/npyio.py in loadtxt(fname, dtype, comments, delimiter, converters, skiprows, usecols, unpack, ndmin)
    896                 fh = iter(open(fname, 'U'))
    897             else:
--> 898                 fh = iter(open(fname))
    899         else:
    900             fh = iter(fname)

FileNotFoundError: [Errno 2] No such file or directory: '/Users/weilu/Research/server/mar_2018/05_week/ninth_freeEnergy/_280-350/2d_z_qw/force_0.05/pmf-280.dat'

In [138]:
data = pd.read_feather("/Users/weilu/Research/server/mar_2018/ninth/force_0.06_rg_0.15_lipid_1.0_mem_1_go_0.8/rerun_1_31_Mar_182712.feather")
dic = {"T0":280, "T1":290, "T2":300, "T3":310, "T4":320, "T5":335, "T6":350, "T7":365, "T8":380, "T9":410, "T10":440, "T11":470}
a = data
a["Temp"] = a["Temp"].apply(lambda x: dic[x])

In [139]:
rerun1 = data

In [ ]:


In [145]:
rerun1.query("Temp == 300 and DisReal > 60 and Qw > 0.2 and z_h6 < -10").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)


Out[145]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a52c4fa58>

In [ ]:
t = a.query("Temp < 400").groupby(["BiasTo","Temp"])[["DisReal","Run"]].mean().reset_index()
t["Diff"] = t["DisReal"]-t["BiasTo"].apply(pd.to_numeric)
t["BiasTo"] = t["BiasTo"].apply(pd.to_numeric)
fg = sns.FacetGrid(data=t.query("Temp == 320"), hue='Temp', size=8, aspect=1.61)
fg.map(plt.scatter, 'BiasTo', 'Diff').add_legend()

In [6]:
a.query("Temp == 300 and DisReal > 60 and DisReal < 90").plot.hexbin("z_h3", "z_h6", cmap="seismic", sharex=False)


Out[6]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a229faa58>

In [37]:
a = data.query("(z_h6 > -10 and z_h1 < -10) or (z_h6 < -10 and z_h1 > -10)")
a.query("Temp == 300").plot.hexbin("z_h1", "z_h6", cmap="seismic", sharex=False)


Out[37]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a3cab86a0>

rerun 3


In [47]:
data = pd.read_feather("/Users/weilu/Research/server/mar_2018/sixth/rg_0.15_lipid_1.0_mem_1_go_0.8/rerun_3_31_Mar_175942.feather")
dic = {"T0":280, "T1":290, "T2":300, "T3":310, "T4":320, "T5":335, "T6":350, "T7":365, "T8":380, "T9":410, "T10":440, "T11":470}
a = data
a["Temp"] = a["Temp"].apply(lambda x: dic[x])

In [48]:
data.plot.hexbin("Lipid1", "Qw", cmap="seismic", sharex=False)


Out[48]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a25d9b128>

In [49]:
data.query("Lipid1 > -1 and Qw > 0.3 and Temp==300").groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 100")


Out[49]:
count mean std min 25% 50% 75% max
BiasTo Run
66.0 0 186.0 68.655783 6.069770 51.929840 64.680835 68.514751 72.338925 86.389636
70.0 5 447.0 71.610629 5.329203 53.209198 68.114881 71.951678 75.127247 87.952586
74.0 5 210.0 70.917855 5.260775 57.541260 68.013596 70.700056 74.053002 86.654484
86.0 3 206.0 84.545661 5.465229 69.445193 80.958664 85.056198 88.536706 98.376434
10 308.0 83.031149 4.920991 69.492482 79.694361 83.285074 86.126439 96.154586

In [41]:
data = pd.read_feather("/Users/weilu/Research/server/mar_2018/ninth/force_0.06_rg_0.15_lipid_1.0_mem_1_go_0.8/rerun_3_01_Apr_144311.feather")
dic = {"T0":280, "T1":290, "T2":300, "T3":310, "T4":320, "T5":335, "T6":350, "T7":365, "T8":380, "T9":410, "T10":440, "T11":470}
a = data
a["Temp"] = a["Temp"].apply(lambda x: dic[x])

In [42]:
rerun3 = data

In [43]:
data.plot.hexbin("Lipid1", "Qw", cmap="seismic", sharex=False)


Out[43]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a24e503c8>

In [46]:
data.query("Lipid1 > -1 and Qw > 0.3 and Temp==300").groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 100")


Out[46]:
count mean std min 25% 50% 75% max
BiasTo Run
32.0 5 251.0 40.292235 5.489174 23.835159 36.310415 40.245681 43.478896 55.163690
34.0 5 427.0 44.520444 5.775708 29.743104 40.395054 44.587846 48.293983 61.693888
38.0 11 274.0 47.559146 5.457731 33.921784 43.546506 47.727943 51.198142 62.930494
44.0 9 176.0 53.074193 5.358604 38.866388 49.543183 52.910667 56.846417 71.040948
70.0 4 491.0 75.647939 5.247338 60.779750 72.205434 75.664376 78.897513 93.266709
72.0 8 493.0 77.361571 4.989067 59.765368 73.984486 77.373719 80.873908 92.141764
74.0 5 667.0 79.329147 4.986871 64.103251 75.847867 79.438294 82.698738 94.980508
8 597.0 80.370943 4.771834 63.743749 77.312220 80.329319 83.590274 94.733364
76.0 2 609.0 82.491103 4.934288 66.209328 79.096101 82.395038 85.988688 95.370163
80.0 7 562.0 84.350539 4.959073 65.585395 81.343990 84.517576 87.745680 98.049908
8 579.0 84.737909 4.741354 71.252220 81.686929 84.882222 87.652842 99.617263
9 400.0 84.401657 6.255276 54.487521 81.209347 84.654996 88.362040 98.423390
88.0 1 471.0 91.795462 4.692006 75.885403 88.808540 91.562989 94.946491 104.763696
10 410.0 91.388021 5.199348 76.722241 87.640631 91.437215 94.909218 109.214974
90.0 9 252.0 92.393759 5.219676 75.182513 88.625179 92.940121 96.037827 104.600972
10 300.0 93.348850 4.670225 81.132513 90.162427 93.418551 96.657641 104.599181
92.0 8 417.0 97.186096 5.360534 83.360010 94.081603 97.227186 100.556798 112.103506
11 165.0 93.902001 4.733001 80.469762 90.909465 93.782722 96.981611 106.129501
96.0 5 374.0 97.038085 4.784950 85.480114 93.273428 97.224546 100.512618 109.939788
9 419.0 98.018156 4.413905 86.849407 95.165249 98.127517 100.761499 110.303018

In [31]:
t = a.query("Temp < 400").groupby(["BiasTo","Temp"])[["DisReal","Run"]].mean().reset_index()
t["Diff"] = t["DisReal"]-t["BiasTo"].apply(pd.to_numeric)
t["BiasTo"] = t["BiasTo"].apply(pd.to_numeric)
fg = sns.FacetGrid(data=t, hue='Temp', size=8, aspect=1.61)
fg.map(plt.scatter, 'BiasTo', 'Diff').add_legend()


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

In [202]:
data["BiasTo"] = data["BiasTo"].apply(pd.to_numeric)

In [199]:
data["Diff"] = data["DisReal"]-data["BiasTo"].apply(pd.to_numeric)

Good news. It seems the unwanted state is not stable.

Because of this, I will continue the rerun. too see low DisReal region continue to increase


In [206]:
rerun1.query("z_h6 < -20 and Qw > 0.25 and Qw < 0.35").plot.hexbin("DisReal", "TotalE", cmap="seismic", sharex=False)


Out[206]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a4b818b38>

In [197]:
data.query("z_h6 < -20 and Qw > 0.25 and Qw < 0.35").plot.hexbin("DisReal", "TotalE", cmap="seismic", sharex=False)


Out[197]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a4a947198>

In [371]:
rerun5Real.query("z_h6 < -20 and Qw > 0.25 and Qw < 0.35").plot.hexbin("DisReal", "TotalE", cmap="seismic", sharex=False)


Out[371]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a451b0240>

In [372]:
rerun5Real.query("z_h6 < -20 and Qw > 0.25 and Qw < 0.35").plot.hexbin("DisReal", "Lipid1", cmap="seismic", sharex=False)


Out[372]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a48fc6550>

Rerun 5


In [15]:
data = pd.read_feather("/Users/weilu/Research/server/mar_2018/ninth/force_0.06_rg_0.15_lipid_1.0_mem_1_go_0.8/rerun_5_02_Apr_175521.feather")
dic = {"T0":280, "T1":290, "T2":300, "T3":310, "T4":320, "T5":335, "T6":350, "T7":365, "T8":380, "T9":410, "T10":440, "T11":470}
a = data
a["Temp"] = a["Temp"].apply(lambda x: dic[x])

In [16]:
rerun5 = data
# data["BiasTo"] = data["BiasTo"].apply(pd.to_numeric)

In [68]:
t = a.query("Temp < 400").groupby(["BiasTo","Temp"])[["DisReal","Run"]].mean().reset_index()
t["Diff"] = t["DisReal"]-t["BiasTo"].apply(pd.to_numeric)
t["BiasTo"] = t["BiasTo"].apply(pd.to_numeric)
fg = sns.FacetGrid(data=t, hue='Temp', size=8, aspect=1.61)
fg.map(plt.scatter, 'BiasTo', 'Diff').add_legend()


Out[68]:
<seaborn.axisgrid.FacetGrid at 0x1a20b9f4e0>

In [52]:
rerun5Real.query("Temp < 350").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)


Out[52]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a212f4630>

In [70]:
rerun5Real.query("Temp == 300 and z_h6 < -10").plot.hexbin("BiasTo", "Qw", cmap="seismic", sharex=False)


Out[70]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a5444fdd8>

In [54]:
rerun5Real.query("z_h6 < -15 and Qw < 0.19 and Temp < 350").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)


Out[54]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a1ed249b0>

In [61]:
t = rerun5Real.query("BiasTo == '100.0' and Run == 0").plot.hexbin("Step", "Temp", cmap="seismic", sharex=False)



In [58]:
t = rerun5Real.query("BiasTo == '100.0' and Run == 0").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)



In [57]:
t = rerun5Real.query("z_h6 < -15 and Qw < 0.19 and Temp < 350")
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 100")


Out[57]:
count mean std min 25% 50% 75% max
BiasTo Run
100.0 0 230.0 107.072088 5.153847 93.235307 103.400793 106.848808 110.632756 120.600588
1 339.0 107.043334 5.600557 91.117362 103.245228 106.877536 110.732350 124.544074
2 449.0 107.839734 5.617927 92.053543 103.806973 108.007643 111.226408 123.357252
3 400.0 106.830253 5.315044 93.020161 103.334509 106.501556 110.355048 126.184945
4 158.0 107.811192 4.786222 94.181941 104.437156 107.898609 111.401471 119.581089
6 744.0 107.591178 5.372206 90.837970 103.700418 107.572788 111.361550 124.064562
7 186.0 109.609476 4.720362 96.796927 106.599706 109.633136 112.447317 121.515520
8 362.0 107.620310 5.639909 89.253292 103.638417 107.085253 111.569685 123.243733
9 391.0 107.026119 5.565790 91.681514 103.697908 106.916169 110.867390 122.735879
11 216.0 105.590120 5.327599 88.764096 101.932631 105.708156 108.933231 117.549827
72.0 0 339.0 79.265596 5.690559 63.096307 75.411585 79.513764 83.162601 94.614666
78.0 3 166.0 84.380311 5.974263 71.283865 80.273110 84.147604 88.868709 101.296249
5 109.0 86.873984 5.737264 73.104251 83.072319 86.343598 90.091803 108.808916
6 121.0 85.279693 5.237668 70.989417 81.952301 85.561814 88.624054 97.884075
9 547.0 85.253129 6.150029 60.982805 81.607472 85.503989 89.381441 105.239871
10 187.0 85.301296 5.967258 71.117278 81.210871 84.818902 88.908395 99.846333
82.0 1 173.0 85.884242 4.373618 72.164111 83.270612 85.474863 88.406404 98.461885
3 159.0 86.842390 5.169531 75.263222 83.287231 86.523719 90.424681 101.599415
84.0 0 156.0 93.047780 5.116210 79.613867 89.526740 93.445192 96.671618 105.858604
5 281.0 92.413691 4.856579 78.820845 89.039614 92.540071 95.603369 106.493886
10 496.0 92.625104 4.875297 78.227571 89.252434 92.855612 95.950964 105.469970
11 165.0 87.448740 4.601817 68.126908 84.404328 87.573403 90.479759 99.116534
86.0 2 251.0 94.524562 5.635701 81.085311 91.247538 94.375071 98.292984 108.471354
3 244.0 93.408414 5.959654 77.583265 89.264098 93.806136 97.624417 107.011850
7 626.0 94.202531 5.532827 79.726481 90.665729 94.029748 98.139173 111.287618
10 239.0 94.797664 5.479752 78.249111 90.857005 95.047504 98.340450 109.806169
11 178.0 89.402917 5.024600 76.523367 86.481688 89.408867 92.857348 102.556737
90.0 0 243.0 96.956475 5.903734 82.500279 92.754985 97.044650 101.392487 116.384127
1 566.0 97.984208 5.462500 81.122583 94.113920 97.996140 101.826097 112.432023
2 579.0 97.900211 5.238162 77.083149 94.324371 97.811426 101.678932 111.945631
4 296.0 97.702412 5.673630 75.908231 94.081282 98.046794 101.398384 111.170978
5 234.0 97.757442 5.970999 80.150913 93.502057 97.876515 102.010565 112.344342
6 184.0 98.252066 5.750023 84.259257 94.351271 98.017863 101.950174 113.144814
7 268.0 98.671854 5.730473 77.847929 94.991306 98.660549 102.459253 115.351663
8 408.0 96.850653 5.664726 79.993956 92.892204 96.715015 100.616301 116.428001
92.0 1 315.0 99.976896 5.628666 83.091559 96.447123 100.006642 103.897363 113.489342
4 143.0 100.311195 5.625827 82.178171 97.128857 100.502532 104.368217 111.953441
6 274.0 99.499096 5.633787 81.196646 95.712738 99.680241 103.062175 114.059849
94.0 2 310.0 102.164023 4.959530 83.428131 98.919469 101.890004 105.692167 117.855877
3 995.0 101.058061 5.365371 83.172388 97.527977 100.792283 104.484260 120.253494
4 1309.0 101.787575 5.303878 86.526134 98.271980 101.855274 105.361320 120.292577
5 489.0 101.300986 5.653833 86.254887 96.981911 101.554410 105.010189 119.083281
7 918.0 100.604986 5.270230 85.558950 97.005727 100.622963 104.012274 119.213760
9 484.0 101.634491 5.464040 86.529547 97.859663 101.345062 105.202869 124.247219
10 703.0 100.391077 5.617240 83.827680 96.494296 100.764651 104.136632 117.552206
96.0 0 185.0 103.545191 5.737606 87.100828 98.857623 103.827285 107.637627 118.932397
1 521.0 103.049820 5.573078 89.386118 99.250161 102.707328 107.006924 120.421626
4 998.0 103.459632 5.629293 86.217056 99.555789 103.132477 107.217653 122.447667
6 444.0 102.711040 5.564602 82.770653 98.948561 102.964231 106.635865 120.547370
8 525.0 103.492121 5.239027 86.470044 99.960068 103.508069 106.547276 118.741354
10 126.0 104.043881 5.030920 91.554190 100.195912 104.055943 107.613296 115.383548
11 518.0 103.476490 5.523780 89.063803 99.656770 103.331352 107.358655 121.047127
98.0 2 326.0 105.193381 5.650755 86.618622 101.397177 104.790038 109.175442 123.354012
3 112.0 106.379511 4.649796 95.234224 103.479200 106.377168 109.468345 122.740330
5 283.0 104.724798 5.666254 89.484171 101.126413 104.713893 108.065489 123.686233
11 158.0 104.475030 5.454415 92.136594 100.482878 104.402892 108.496207 120.151856

In [280]:
data.query("Temp < 350").plot.hexbin("TotalE", "Qw", cmap="seismic", sharex=False)


Out[280]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a67fdd4e0>

In [281]:
data.query("Temp < 350").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)


Out[281]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a67fe97b8>

In [295]:
t = data.query("Temp < 350 and DisReal > 60 and Qw > 0.18 and Lipid1 > -1")
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 100")


Out[295]:
count mean std min 25% 50% 75% max
BiasTo Run
56.0 10 1256.0 66.820079 4.296343 60.044115 63.368288 66.358890 69.530842 82.354064
70.0 4 1652.0 75.930618 5.086345 60.003176 72.480929 75.920739 79.491868 93.096026
72.0 8 2469.0 77.579076 4.987029 60.307852 74.230567 77.567436 81.038579 95.598008
74.0 5 2251.0 79.425321 5.214753 60.444895 76.004328 79.264136 82.858309 97.355344
8 2102.0 79.286566 5.314780 61.141134 75.739501 79.361913 83.064293 96.591458
76.0 2 1888.0 82.508506 5.156855 66.447159 78.990138 82.512010 86.102403 97.549200
78.0 2 2500.0 83.375966 5.096266 67.127944 80.057110 83.327756 86.768287 99.300269
80.0 1 2456.0 84.457202 4.977827 64.441522 81.200525 84.467712 87.792535 101.191245
2 118.0 83.773226 5.316375 71.852107 80.742306 84.004202 87.743108 96.204696
3 176.0 84.029784 5.384112 70.940725 80.358973 84.077892 87.302763 100.642210
7 2454.0 84.593961 5.023706 68.099753 81.288804 84.641437 87.922134 100.303462
8 2470.0 84.354282 5.015871 69.026456 80.998557 84.399900 87.806844 102.467243
9 2484.0 84.533552 4.944677 66.803309 81.270637 84.597032 87.626704 101.957387
82.0 7 1707.0 85.864871 5.135288 67.887647 82.529074 86.032246 89.285328 103.566591
9 1812.0 86.203190 4.994182 70.705391 82.993966 86.340866 89.518782 102.780962
84.0 7 2500.0 87.601858 4.936961 70.844029 84.358287 87.624615 91.013595 102.879505
88.0 0 319.0 91.019058 5.378250 73.192750 87.508919 90.893821 94.673136 106.747162
1 2480.0 91.372438 4.743301 74.005688 88.308472 91.318962 94.462678 105.837332
6 803.0 90.869652 4.956622 71.389748 87.735978 90.748577 94.088437 104.932534
9 764.0 87.907171 5.055785 75.019161 84.432165 88.019275 91.352074 103.313797
10 2474.0 92.073276 4.772843 75.886319 88.780522 92.066518 95.281773 112.263772
90.0 9 1202.0 92.427654 4.739478 77.523036 89.348735 92.513453 95.550816 107.962728
10 1203.0 93.081179 4.628795 79.619364 90.015158 93.014806 96.042680 109.446510
11 1132.0 92.375410 4.770930 75.469863 89.298786 92.639249 95.630375 105.954901
92.0 8 2500.0 95.244479 4.915523 77.309143 91.903495 95.204158 98.575696 110.788866
11 2500.0 94.053825 4.669505 77.182232 90.811113 94.150966 97.272661 109.083715
96.0 5 2500.0 97.013984 4.678806 80.594875 93.758124 97.092534 100.317067 114.679359
9 2500.0 97.215364 4.671423 81.498933 93.997105 97.139151 100.450282 114.352519
98.0 10 2118.0 98.473181 4.666779 83.685739 95.322738 98.410803 101.712885 115.530619

In [ ]:
t = data.query("Temp < 350 and DisReal > 60 and Qw > 0.18")

In [386]:
t = rerun3.query("Temp < 350 and DisReal > 60 and Qw > 0.18")
t.hist("Lipid1")


Out[386]:
array([[<matplotlib.axes._subplots.AxesSubplot object at 0x1a415dbda0>]], dtype=object)

In [387]:
t = rerun5Real.query("Temp < 350 and DisReal > 60 and Qw > 0.18")
t.hist("Lipid1")


Out[387]:
array([[<matplotlib.axes._subplots.AxesSubplot object at 0x1a2ebeab38>]], dtype=object)

Rerun 7


In [5]:
data = pd.read_feather("/Users/weilu/Research/server/mar_2018/ninth/force_0.06_rg_0.15_lipid_1.0_mem_1_go_0.8/rerun_7_04_Apr_231330.feather")
dic = {"T0":280, "T1":290, "T2":300, "T3":310, "T4":320, "T5":335, "T6":350, "T7":365, "T8":380, "T9":410, "T10":440, "T11":470}
a = data
a["Temp"] = a["Temp"].apply(lambda x: dic[x])

In [14]:
rerun7 = data
# data["BiasTo"] = data["BiasTo"].apply(pd.to_numeric)

In [6]:
t = data.query("Temp < 350 and DisReal > 60 and Qw > 0.18")
t.hist("Lipid1")


Out[6]:
array([[<matplotlib.axes._subplots.AxesSubplot object at 0x1a21e912e8>]], dtype=object)

In [9]:
data.query("Temp < 350").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)


Out[9]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a21e913c8>

In [20]:
rerun7.query("Temp < 350")["Step"].count()


Out[20]:
540000

In [17]:
t = rerun5.query("Temp < 350 and DisReal > 60 and Qw > 0.18 and Lipid1 > -1")
t["Step"].count()


Out[17]:
53939

In [18]:
t = rerun7.query("Temp < 350 and DisReal > 60 and Qw > 0.18 and Lipid1 > -1")
t["Step"].count()


Out[18]:
52305

In [10]:
t = data.query("Temp < 350 and DisReal > 60 and Qw > 0.18 and Lipid1 > -1")
t.plot.hexbin("Lipid1", "z_h1", cmap="seismic", sharex=False)


Out[10]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a215447b8>

In [283]:
data.query("Temp < 350 and DisReal > 60 and Qw > 0.18").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)


Out[283]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a59b3e198>

In [277]:
data.query("Qw > 0.58").groupby("Temp")["DisReal"].describe()


Out[277]:
count mean std min 25% 50% 75% max
Temp
280 34395.0 42.940793 5.531507 24.547152 38.811300 42.836657 47.382027 59.594937
290 22489.0 42.784274 5.330718 21.744802 38.877496 42.851639 46.927034 57.014944
300 11801.0 43.579822 5.151529 25.652358 39.889707 44.021430 47.580846 58.152470
310 5845.0 44.908710 4.777508 27.114228 41.968282 45.678484 48.428579 55.947778
320 2639.0 45.515907 4.648256 26.487897 42.868365 46.234237 48.820234 56.778925
335 574.0 45.595006 4.176323 31.826684 42.863389 46.208786 48.586064 54.507667
350 82.0 45.239074 4.337481 32.754204 42.069960 46.152603 48.677832 52.897284
365 5.0 46.504712 3.444580 41.733659 45.157007 46.514402 48.106523 51.011969

In [220]:
t = data.query("z_h6 < -20 and Qw > 0.25 and Qw < 0.35 and DisReal > 60")
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 100")


Out[220]:
count mean std min 25% 50% 75% max
BiasTo Run
60.0 5 113.0 66.512154 3.886832 60.147610 63.580878 66.285957 69.405557 77.179416
68.0 11 180.0 73.756180 6.057438 60.749281 69.398390 73.617739 77.737753 92.431294
70.0 0 469.0 74.191685 5.318893 60.414137 70.405310 74.056265 78.122878 89.513138
74.0 2 101.0 76.827775 5.457357 66.320898 72.989188 76.996523 80.230168 89.134214
11 144.0 75.486415 4.963238 62.432900 71.845102 74.953984 79.007245 87.323786
76.0 3 235.0 78.447992 5.253855 66.259977 74.608759 78.511404 81.494020 95.362849
80.0 5 217.0 79.799922 4.855510 67.250980 76.633111 80.259033 83.007123 96.753831
11 198.0 79.955361 5.238624 65.716158 76.483398 80.330906 83.365813 93.809286
82.0 3 114.0 82.243958 3.904281 72.643975 79.513151 81.941932 85.159661 91.372623
84.0 6 416.0 85.558974 4.732438 70.555359 82.467007 85.292550 88.945509 98.381981
8 415.0 86.876651 6.218563 70.161543 82.480690 87.035292 91.161424 104.109995
86.0 6 199.0 91.192025 5.494117 75.331115 88.039038 91.072395 94.250562 106.096975
88.0 2 262.0 90.216668 5.130045 75.261177 86.876216 90.352033 93.509445 104.125687
5 351.0 87.891460 5.725054 73.764376 83.802720 87.646519 91.993305 105.204918
92.0 2 542.0 89.927684 5.273472 70.467923 86.323840 89.760363 93.542206 105.406497
94.0 1 106.0 90.242444 6.574085 77.091854 84.989310 90.004269 95.004842 106.691579
96.0 7 812.0 96.576466 5.142513 79.397742 93.199597 96.335172 100.062148 110.993673
98.0 1 818.0 97.598809 4.302016 86.262144 94.911896 97.646100 100.322980 112.100967
6 441.0 97.337894 5.101396 81.527405 94.271081 97.383584 100.831160 109.210235

In [216]:
data.query("z_h6 < -20 and Qw > 0.25 and Qw < 0.35 and DisReal > 60").plot.hexbin("z_h4", "TotalE", cmap="seismic", sharex=False)


Out[216]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a4b46f390>

In [196]:
data.query("z_h6 < -20 and Qw > 0.25 and Qw < 0.35").hist("DisReal", bins=50)


Out[196]:
array([[<matplotlib.axes._subplots.AxesSubplot object at 0x1a4a99ada0>]], dtype=object)

In [193]:
data.query("z_h6 < -20 and Qw > 0.25 and Qw < 0.35").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)


Out[193]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a4a625cc0>

In [40]:
data.query("Temp == 300").plot.hexbin("z_h3", "z_h6", cmap="seismic", sharex=False)


Out[40]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a3ca9f828>

In [42]:
a = data.query("(z_h3 < -10) or (z_h6 < -10)")
a.query("Temp == 300").plot.hexbin("z_h3", "z_h6", cmap="seismic", sharex=False)


Out[42]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a299f2588>

In [66]:
data.columns


Out[66]:
Index(['Step', 'Run', 'Temp', 'Qw', 'Energy', 'DisReal', '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 [88]:
data.query("Temp <= 300").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)


Out[88]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a43e3fd30>

In [87]:
data.query("Temp <= 300 and DisReal > 60").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)


Out[87]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a259706d8>

In [91]:
data.columns


Out[91]:
Index(['Step', 'Run', 'Temp', 'Qw', 'Energy', 'DisReal', '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 [94]:
data.query("Temp == 300 and DisReal > 60").plot.hexbin("Lipid1", "Qw", cmap="seismic", sharex=False)


Out[94]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a431b42b0>

In [96]:
data.query("Temp == 300").plot.hexbin("abs_z_average", "z_h6", cmap="seismic", sharex=False)


Out[96]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a435ea860>

In [126]:
data.query("Temp == 300 and Qw < 0.6 and DisReal > 60 and Lipid1 > -1").plot.hexbin("abs_z_average", "Qw", cmap="seismic", sharex=False)


Out[126]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a25a95b38>

In [130]:
data.query("Temp == 300 and Qw < 0.6 and DisReal > 60").shape


Out[130]:
(35124, 43)

In [129]:
t = data.query("Temp == 300 and Qw < 0.6 and DisReal > 60 and Lipid1 > -1")
print(t.shape)
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 500")


(11439, 43)
Out[129]:
count mean std min 25% 50% 75% max
BiasTo Run
72.0 8 538.0 77.631154 4.978481 64.034331 74.265102 77.679578 81.148599 92.402795
74.0 5 671.0 79.352226 4.992393 64.103251 75.905704 79.439485 82.716725 94.980508
8 597.0 80.370943 4.771834 63.743749 77.312220 80.329319 83.590274 94.733364
76.0 2 609.0 82.491103 4.934288 66.209328 79.096101 82.395038 85.988688 95.370163
80.0 7 570.0 84.330678 4.942327 65.585395 81.343990 84.503898 87.671476 98.049908
8 583.0 84.765906 4.744009 71.252220 81.699702 84.902951 87.689288 99.617263
82.0 7 591.0 86.381836 4.886817 74.129515 82.791748 86.400281 89.636735 101.037585
9 515.0 86.697468 4.841471 71.817455 83.436906 86.703616 90.212749 101.873019
88.0 1 503.0 91.928638 4.759968 75.885403 88.872399 91.672946 95.171128 105.171102
90.0 11 817.0 92.899936 4.619934 79.678197 89.964819 92.984239 95.992677 107.310590
98.0 10 540.0 98.684912 4.785347 85.058600 95.322567 98.759484 102.196297 111.325873

In [128]:
t = data.query("Temp == 300 and Qw < 0.6 and DisReal > 60 and z_h6 < -10")
print(t.shape)
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 500")


(15583, 43)
Out[128]:
count mean std min 25% 50% 75% max
BiasTo Run
100.0 11 544.0 84.293570 3.425672 75.519237 81.961637 84.397217 86.622628 94.611569
72.0 5 548.0 73.933853 4.387406 61.049616 71.126700 74.101592 77.014725 86.079380
6 570.0 77.566640 4.805078 63.593634 74.509323 77.478254 80.691643 92.106523
78.0 5 520.0 82.549008 4.721425 70.541042 79.102200 82.721582 85.779293 95.670568
10 540.0 82.675814 4.635266 68.840841 79.520502 82.781726 85.958293 96.702022
80.0 0 568.0 79.695028 4.399605 67.366476 76.710162 79.807395 82.590351 96.141058
84.0 8 530.0 83.894069 5.306648 70.917908 80.118754 83.161541 87.110482 100.301417
11 553.0 86.657368 4.707773 73.011489 83.747428 86.888678 89.551823 100.057218
86.0 11 531.0 87.787863 4.444919 76.416774 84.737965 87.608177 90.635270 102.053831
88.0 2 595.0 84.620395 4.761268 70.773094 81.346685 84.557121 87.582304 98.051481
92.0 2 564.0 91.000057 5.468401 78.150078 87.060316 90.448845 94.965484 108.250962
96.0 7 963.0 95.072311 5.525327 77.822069 91.490362 94.993429 98.830402 110.993673

In [125]:
data.query("Temp == 300 and Qw < 0.6 and DisReal > 60 and z_h6 < -10").plot.hexbin("abs_z_average", "Qw", cmap="seismic", sharex=False)


Out[125]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a43fc2908>

In [124]:
data.query("Temp == 300 and Qw < 0.6 and DisReal > 60").plot.hexbin("abs_z_average", "Qw", cmap="seismic", sharex=False)


Out[124]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a44fa2fd0>

In [120]:
t = data.query("Temp == 300 and Qw < 0.6 and Lipid1 < -1 and DisReal < 60")
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 500")


Out[120]:
count mean std min 25% 50% 75% max
BiasTo Run
30.0 11 501.0 34.550022 3.497956 24.170195 32.341842 34.733842 36.927544 44.118947
32.0 8 523.0 35.867688 3.378665 24.100050 33.797883 35.808496 38.302579 45.959715
10 645.0 36.086853 2.985883 26.805858 34.255239 35.990810 38.118236 47.008506
34.0 6 514.0 32.001355 3.933645 19.487454 29.375800 32.185595 34.763219 43.226268
36.0 6 683.0 36.538337 3.075776 26.712718 34.600427 36.581137 38.632251 45.696680
9 535.0 37.053009 3.487852 27.163052 34.778089 36.952146 39.300564 46.858792
10 599.0 36.493984 3.050589 28.673133 34.313042 36.475634 38.632653 45.187989
38.0 0 542.0 38.292865 3.117689 29.507186 36.509181 38.429570 40.372452 47.251375
1 714.0 37.156266 3.051513 27.119173 35.145635 37.288075 39.339564 46.587213
2 646.0 38.042212 2.957526 29.438891 36.105246 37.955290 40.029292 47.525100
42.0 6 707.0 38.366364 2.976499 28.001329 36.458438 38.554256 40.285623 47.530492
9 636.0 38.318101 2.830133 30.080318 36.520623 38.279709 40.229305 45.076937
44.0 7 653.0 39.187825 2.832088 31.375651 37.427158 39.179752 41.124606 47.085678
46.0 5 582.0 39.461132 2.802785 29.656917 37.685658 39.756264 41.339765 46.331141
9 592.0 39.515688 2.656214 31.390946 37.743350 39.514984 41.435002 46.551716
48.0 2 532.0 39.997772 2.763595 32.714515 38.160923 40.078110 41.975311 47.424742
5 617.0 40.078830 2.917347 30.190290 38.052028 40.208077 42.158398 49.065847
50.0 4 572.0 40.516251 2.894581 29.218862 38.590035 40.625680 42.319545 49.911833
6 579.0 40.452561 2.723055 31.306359 38.851076 40.420034 42.158544 47.852737
52.0 6 585.0 42.891324 3.309122 34.838188 40.494285 42.791672 45.103617 53.407546
54.0 3 593.0 43.652043 3.418296 34.941781 41.392058 43.590167 45.989911 55.849975
8 504.0 43.468905 3.307635 33.128995 41.161186 43.479570 45.611239 52.045254
56.0 1 557.0 44.201995 3.411782 33.753458 41.816051 44.090526 46.363673 54.841648
7 542.0 44.164520 3.429523 32.235866 41.796897 44.247860 46.500655 55.349855
58.0 7 824.0 42.481098 2.637412 33.582897 40.764434 42.498365 44.173776 50.799169
60.0 8 608.0 42.638195 2.560345 34.202688 40.911645 42.578285 44.345535 49.555813
10 543.0 42.848207 2.621652 34.645227 41.066412 42.700465 44.606472 51.479163
62.0 0 597.0 43.277374 2.653459 32.995607 41.460755 43.142450 45.150519 53.672116
7 634.0 43.225784 2.627363 35.509930 41.493669 43.174808 45.023711 50.970356
9 684.0 43.219135 2.749727 34.961009 41.375080 43.101129 44.931003 53.977729
64.0 7 666.0 47.337949 2.991526 37.048099 45.439008 47.615525 49.520250 54.931101
10 588.0 46.540005 3.096186 38.317320 44.321463 46.640451 48.617557 54.942772
68.0 4 590.0 44.379569 2.656873 36.506250 42.625571 44.344091 46.021600 53.099925
70.0 1 678.0 45.143000 2.616832 36.997997 43.303478 45.142127 46.904454 53.147709
11 679.0 45.274321 2.628822 36.256916 43.455996 45.276506 47.127284 53.834286
74.0 1 549.0 50.903293 3.274476 40.958378 48.939727 50.828384 53.000226 59.523403
76.0 0 522.0 51.331612 3.403327 42.337286 49.037508 51.416541 53.997385 59.633690
4 526.0 51.618093 3.490510 40.795565 49.258330 51.623358 53.998894 59.458026

In [114]:
data.query("Temp == 300 and Qw < 0.6 and Lipid1 < -1 and DisReal < 60").plot.hexbin("z_h1", "Qw", cmap="seismic", sharex=False)


Out[114]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a4573e7b8>

In [85]:
data.query("Temp <= 300 and DisReal > 60").plot.hexbin("abs_z_average", "Qw", cmap="seismic", sharex=False)


Out[85]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a4631c438>

In [64]:
data.query("Temp == 300").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)


Out[64]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a471194e0>

In [34]:
a = data.query("(z_h6 > -10 and z_h1 < -10) or (z_h6 < -10 and z_h1 > -10)")

In [ ]:


In [35]:
a.query("Temp == 300").plot.hexbin("z_h1", "z_h6", cmap="seismic", sharex=False)


Out[35]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a22079908>

I hope we don't see this, for rerun 3.

(h6 inside, h1 outside)


In [59]:
rerun1.query("Temp <= 300 and z_h1 < -10")["DisReal"].count()


Out[59]:
23027

In [60]:
rerun1.query("Temp <= 300 and z_h1 < -10").plot.hexbin("DisReal", "z_h6", cmap="seismic", sharex=False)


Out[60]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a44ad06d8>

In [300]:
rerun5.query("Temp <= 300 and z_h1 < -10").plot.hexbin("DisReal", "z_h6", cmap="seismic", sharex=False)


Out[300]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a4c006d30>

In [7]:
data.query("Temp <= 300 and z_h1 < -10").plot.hexbin("DisReal", "z_h6", cmap="seismic", sharex=False)


Out[7]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a5239eb70>

Good, decrease in number


In [61]:
data.query("Temp <= 300")["DisReal"].count()


Out[61]:
270000

In [62]:
data.query("Temp <= 300 and z_h1 < -10")["DisReal"].describe()


Out[62]:
count    15664.000000
mean        86.338072
std         16.724329
min         23.835159
25%         84.224392
50%         91.396990
75%         96.274063
max        115.018263
Name: DisReal, dtype: float64

In [63]:
data.query("Temp <= 300 and z_h1 < -10").plot.hexbin("DisReal", "z_h6", cmap="seismic", sharex=False)


Out[63]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a42dd2e10>

enhance h1, h2 connection.

check if it increase the unfolding force, and if the helix 5,6 unfold first. (how strong h1,h2 bond needs to be)


In [32]:
data = pd.read_feather("/Users/weilu/Research/server/mar_2018/05_week/unfold_strengthen_h1_h2/05_Apr_222515.feather")

In [33]:
data.query("Qw > 0.1").plot.hexbin("Steps", "Qw", by="Temp", cmap="cool", sharex=False)


Out[33]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a5c524b38>

In [76]:
data.query("Steps < 4e7 and Qw > 0.1").plot.hexbin("Steps", "Qw", by="Temp", cmap="cool", sharex=False)


Out[76]:
<matplotlib.axes._subplots.AxesSubplot at 0x10d9f6cc0>

In [16]:
data.query("Folder == 'force_3_' and Steps < 3e7 and Qw > 0.1").plot.hexbin("Steps", "Qw", by="Temp", cmap="cool", sharex=False)


Out[16]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a4d733a20>

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

In [39]:
fg = sns.FacetGrid(data=data.query("Steps < 4e7 and Qw > 0.1 and Folder=='force_7_'"), hue='Run', size=8, aspect=1.61)
fg.map(plt.scatter, 'Steps', 'Qw').add_legend()


Out[39]:
<seaborn.axisgrid.FacetGrid at 0x1a2409cf98>

In [29]:
fg = sns.FacetGrid(data=data.query("Steps < 4e7 and Qw > 0.1 and Folder=='force_6_' and Run ==0"), hue='Run', size=8, aspect=1.61)
fg.map(plt.scatter, 'Steps', 'Qw').add_legend()


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

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


Out[34]:
<seaborn.axisgrid.FacetGrid at 0x1a27025cf8>

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


Out[77]:
<seaborn.axisgrid.FacetGrid at 0x1a4ff850f0>

In [36]:
a = data.query("(z_h6 > -10 and z_h1 < -10) or (z_h6 < -10 and z_h1 > -10)")

In [37]:
a.query("Folder == 'force_7_'").plot.hexbin("z_h1", "z_h6", cmap="cool", sharex=False)


Out[37]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a9e110208>

In [38]:
a.query("Folder == 'force_8_'").plot.hexbin("z_h1", "z_h6", cmap="cool", sharex=False)


Out[38]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a9690c630>

In [80]:
a.query("Folder == 'force_6_'").plot.hexbin("z_h1", "z_h6", cmap="cool", sharex=False)


Out[80]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a23c9e198>

In [15]:
data["Folder"].unique()


Out[15]:
array(['force_2_mem_1.0_', 'force_1_mem_1.0_', 'force_3_',
       'force_2_mem_0.8_', 'force_1_mem_0.8_', 'force_4_'], dtype=object)

In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]: