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


The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload

In [31]:
data = pd.read_feather("/Users/weilu/Research/server/apr_2018/twelve/force_0.02_rg_0.1_lipid_0.5_mem_1_go_0.8/rerun_0_01_May_025941.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])
rerun0 = data
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 0x1a21ea2080>

In [27]:
data = pd.read_feather("/Users/weilu/Research/server/apr_2018/twelve/force_0.02_rg_0.1_lipid_0.5_mem_1_go_0.8/rerun_1_27_Apr_215043.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])
rerun1 = data
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[27]:
<seaborn.axisgrid.FacetGrid at 0x1a15989128>

In [35]:
data = pd.read_feather("/Users/weilu/Research/server/apr_2018/twelve/force_0.02_rg_0.1_lipid_0.5_mem_1_go_0.8/rerun_2_01_May_025941.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])
rerun2 = data
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[35]:
<seaborn.axisgrid.FacetGrid at 0x1a157f0358>

In [33]:
data = pd.read_feather("/Users/weilu/Research/server/apr_2018/twelve/force_0.02_rg_0.1_lipid_0.5_mem_1_go_0.8/rerun_3_01_May_025941.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])
rerun3 = data
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[33]:
<seaborn.axisgrid.FacetGrid at 0x1a2b25a518>

In [32]:
rerun0.query("Temp == 410 and Qw > 0.45").groupby("Step")["Qw"].count().reset_index().plot("Step", "Qw")


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-32-2af624f2283b> in <module>()
----> 1 rerun0.query("Temp == 410 and Qw > 0.45").groupby("Step")["Qw"].count().reset_index().plot("Step", "Qw")

~/anaconda3/lib/python3.6/site-packages/pandas/plotting/_core.py in __call__(self, x, y, kind, ax, subplots, sharex, sharey, layout, figsize, use_index, title, grid, legend, style, logx, logy, loglog, xticks, yticks, xlim, ylim, rot, fontsize, colormap, table, yerr, xerr, secondary_y, sort_columns, **kwds)
   2625                           fontsize=fontsize, colormap=colormap, table=table,
   2626                           yerr=yerr, xerr=xerr, secondary_y=secondary_y,
-> 2627                           sort_columns=sort_columns, **kwds)
   2628     __call__.__doc__ = plot_frame.__doc__
   2629 

~/anaconda3/lib/python3.6/site-packages/pandas/plotting/_core.py in plot_frame(data, x, y, kind, ax, subplots, sharex, sharey, layout, figsize, use_index, title, grid, legend, style, logx, logy, loglog, xticks, yticks, xlim, ylim, rot, fontsize, colormap, table, yerr, xerr, secondary_y, sort_columns, **kwds)
   1867                  yerr=yerr, xerr=xerr,
   1868                  secondary_y=secondary_y, sort_columns=sort_columns,
-> 1869                  **kwds)
   1870 
   1871 

~/anaconda3/lib/python3.6/site-packages/pandas/plotting/_core.py in _plot(data, x, y, subplots, ax, kind, **kwds)
   1692         plot_obj = klass(data, subplots=subplots, ax=ax, kind=kind, **kwds)
   1693 
-> 1694     plot_obj.generate()
   1695     plot_obj.draw()
   1696     return plot_obj.result

~/anaconda3/lib/python3.6/site-packages/pandas/plotting/_core.py in generate(self)
    241     def generate(self):
    242         self._args_adjust()
--> 243         self._compute_plot_data()
    244         self._setup_subplots()
    245         self._make_plot()

~/anaconda3/lib/python3.6/site-packages/pandas/plotting/_core.py in _compute_plot_data(self)
    350         if is_empty:
    351             raise TypeError('Empty {0!r}: no numeric data to '
--> 352                             'plot'.format(numeric_data.__class__.__name__))
    353 
    354         self.data = numeric_data

TypeError: Empty 'DataFrame': no numeric data to plot

In [30]:
rerun1.query("Temp == 410 and Qw > 0.45").groupby("Step")["Qw"].count().reset_index().plot("Step", "Qw")


Out[30]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a13b7ae10>

In [36]:
rerun2.query("Temp == 410 and Qw > 0.45").groupby("Step")["Qw"].count().reset_index().plot("Step", "Qw")


Out[36]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a13983278>

In [34]:
rerun3.query("Temp == 410 and Qw > 0.45").groupby("Step")["Qw"].count().reset_index().plot("Step", "Qw")


Out[34]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a139b7940>

In [37]:
rerun3.query("Temp == 470 and Qw > 0.45").groupby("Step")["Qw"].count().reset_index().plot("Step", "Qw")


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

In [29]:
rerun1.query("Temp == 410 and Qw > 0.3").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)


Out[29]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a1941a780>

In [57]:
rerun3.query("Temp == 300").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)


Out[57]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a194a2438>

In [58]:
rerun3.query("Temp == 300 and Qw < 0.33 and DisReal < 80").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)


Out[58]:
<matplotlib.axes._subplots.AxesSubplot at 0x102d70e80>

In [59]:
t = rerun3.query("Temp == 300 and Qw < 0.33 and DisReal < 80")
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 300")


Out[59]:
count mean std min 25% 50% 75% max
BiasTo Run
54.0 9 321.0 55.609532 4.368647 38.940268 52.410744 55.998107 58.454149 66.447976
56.0 2 416.0 56.398919 4.580072 42.366799 53.507801 56.314688 59.862136 69.496328
7 439.0 57.319567 4.399934 40.192677 54.499575 57.580332 60.235295 69.056468
8 375.0 56.670165 4.636787 35.474628 53.333859 56.825244 59.734155 68.323366
58.0 0 381.0 57.703302 4.574761 45.324787 54.629510 57.816423 60.622452 70.011126
4 449.0 55.792468 6.304172 39.425367 51.502447 56.327778 60.166149 71.782349
6 338.0 58.110274 4.647568 44.991476 54.810290 58.161794 61.308806 69.944583
11 382.0 58.383531 4.535408 43.364665 55.688487 58.575513 61.428713 70.658472
60.0 1 351.0 58.989125 4.570026 44.971859 55.452325 59.006528 62.205657 71.470052
2 325.0 59.313462 4.760364 42.618521 56.333766 59.568966 62.213097 73.333610
4 433.0 59.847708 4.130921 47.575543 57.251158 59.830235 62.573777 70.241143
6 372.0 58.989798 4.498839 43.751593 56.296126 59.217275 62.064706 68.872140
10 334.0 59.846566 4.294560 48.880700 56.835304 60.183060 62.845185 69.053491
62.0 0 352.0 61.068625 4.672283 47.860711 58.079220 60.720150 64.282046 74.760864
1 327.0 61.016549 4.278745 48.849924 58.283119 60.796262 63.552172 75.487867
5 417.0 61.151903 4.458575 49.325087 58.078218 61.246776 64.283899 75.141571
6 326.0 61.056868 4.364853 49.635589 57.981446 60.880921 64.088025 72.950100
64.0 0 345.0 62.015613 4.240573 51.512040 59.349600 62.203531 64.723419 76.377983
1 324.0 62.354792 4.586693 44.191145 59.095329 62.717842 65.454429 75.425490
2 369.0 61.856993 4.002707 51.069388 59.509032 62.154285 64.298524 72.068602
7 354.0 62.157223 4.295324 47.748596 59.212288 62.124281 65.266940 73.348713
66.0 1 371.0 63.230383 4.380755 48.594718 60.369544 63.362788 66.015897 74.062625
2 308.0 63.292475 4.400642 50.542268 60.584161 63.296398 66.470211 77.234998
5 334.0 63.751778 4.545359 51.689988 60.722049 63.936426 66.777293 75.949178
6 359.0 63.359985 3.992054 49.015707 60.552658 63.328822 66.239910 74.691210
7 321.0 63.027917 4.455500 51.708824 60.035243 62.815664 66.228420 76.321274
9 309.0 63.913690 4.476331 48.609211 61.158125 64.173397 66.874046 75.471801
68.0 7 325.0 64.781359 4.297152 52.844976 61.905827 65.072144 67.773898 74.352430
8 388.0 64.607339 4.090759 50.618519 61.936447 64.752276 67.459467 74.214496
10 333.0 64.291550 4.131974 51.102245 61.529665 64.537021 67.310660 75.196662
... ... ... ... ... ... ... ... ... ...
70.0 8 390.0 65.362608 4.078329 53.220158 62.812089 65.288247 67.956778 77.384620
10 463.0 65.494745 4.138627 53.698802 62.696853 65.374921 68.229244 77.569563
72.0 1 306.0 66.749768 4.129399 53.959970 64.178174 66.761768 69.273820 78.745069
2 309.0 67.101246 3.756118 56.454732 64.331687 67.276728 69.470341 77.488685
5 378.0 66.690291 4.190097 53.134214 64.423030 66.689972 69.585124 76.323408
8 382.0 66.641034 3.958673 55.038239 64.064010 66.745427 69.264518 79.688296
74.0 5 318.0 68.116895 3.971104 54.257423 65.552772 68.126690 70.716205 77.344362
76.0 4 358.0 69.486426 3.935444 58.384469 66.636096 69.481535 72.201711 79.514399
6 328.0 69.389189 3.936033 55.560262 66.961892 69.400855 71.982511 79.732821
10 412.0 69.237773 3.810899 53.220824 66.698502 69.315296 71.797865 79.392709
78.0 2 303.0 70.074652 4.044854 60.176055 67.352704 70.077618 72.855395 79.982242
4 310.0 69.712492 3.935628 56.719741 66.986083 70.185170 72.669445 79.021403
8 362.0 70.496312 3.838739 59.444951 67.866865 70.443461 73.085730 79.600166
9 347.0 69.858195 4.104885 58.992714 67.175231 69.851607 72.797813 79.036089
80.0 3 455.0 70.787766 3.832940 58.930611 67.814187 70.793136 73.655304 79.494622
4 390.0 70.749116 3.956784 57.252132 68.146179 70.887153 73.484101 79.486620
5 330.0 71.489499 3.749602 59.841100 69.335543 71.648134 73.980027 79.987680
6 390.0 71.352831 3.861309 60.480874 68.873472 71.661885 74.061172 79.910850
82.0 7 437.0 73.059149 3.873909 60.879104 70.369966 73.307655 76.021078 79.968222
8 376.0 72.991434 3.841731 60.559852 70.297639 73.198884 75.949094 79.988344
9 498.0 72.263809 3.831781 59.845934 69.661051 72.485177 75.090750 79.922699
11 467.0 72.260043 3.818118 61.759172 69.945835 72.470906 74.940891 79.957140
84.0 6 445.0 72.517279 3.784402 61.936795 70.118969 72.838871 75.118833 79.865274
7 476.0 72.690320 3.690384 61.077870 69.990865 73.053554 75.261641 79.616858
8 535.0 72.696598 3.617915 60.440987 70.247629 72.757848 75.239863 79.886630
11 432.0 73.056046 3.615129 62.276898 70.521549 73.111647 75.895526 79.932188
86.0 2 413.0 73.312305 3.450859 63.895237 70.946278 73.377823 75.865866 79.950175
88.0 0 327.0 75.033170 3.242098 64.471985 73.113150 75.498743 77.450702 79.958773
92.0 2 438.0 75.895893 2.752942 65.499140 74.363371 76.384747 77.927396 79.995771
10 428.0 75.772566 2.803081 67.935052 73.930237 76.296288 78.058560 79.997924

64 rows × 8 columns


In [3]:
rerun1.query("Temp == 300").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)


Out[3]:
<matplotlib.axes._subplots.AxesSubplot at 0x1111af160>

In [5]:
rerun1.query("Temp == 300 and Qw < 0.33 and DisReal < 80").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)


Out[5]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a249f91d0>

In [8]:
rerun1.query("Temp == 300 and Qw < 0.33 and DisReal < 80").plot.hexbin("Lipid6", "Lipid1", cmap="seismic", sharex=False)


Out[8]:
<matplotlib.axes._subplots.AxesSubplot at 0x11426d9e8>

In [11]:
t = rerun1.query("Temp == 300 and Qw < 0.33 and DisReal < 80")
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 300")


Out[11]:
count mean std min 25% 50% 75% max
BiasTo Run
48.0 10 386.0 50.349961 5.172397 36.310372 47.046215 50.570074 53.802971 65.390136
50.0 3 507.0 52.464905 4.826395 34.195744 49.389336 52.468052 55.449855 66.503454
7 433.0 51.865832 4.570383 35.999084 48.501295 51.610424 55.275781 63.949775
54.0 9 405.0 55.591624 4.825440 41.084091 52.257899 55.728241 58.664277 69.323986
11 424.0 55.899278 4.495658 40.948843 52.513443 55.937170 59.186890 71.446668
56.0 2 425.0 56.824749 4.442692 44.148995 53.779036 57.049983 60.100480 67.904244
4 343.0 56.565824 4.726212 45.563690 53.383555 56.423129 59.867951 69.008634
7 303.0 57.007332 4.848640 43.673075 53.723613 56.887736 60.285418 69.958928
8 328.0 57.112806 4.432104 44.383334 53.934231 56.968738 59.944127 69.405299
9 474.0 56.719263 4.424913 44.966168 53.677215 56.696666 59.638673 69.960121
58.0 0 316.0 57.598513 4.709305 40.136259 54.005366 58.064425 60.704801 73.736013
2 558.0 58.261211 4.370479 43.138478 55.695732 58.443520 61.155292 69.564824
8 361.0 55.834508 6.135967 37.290488 51.947798 56.609309 60.232501 70.974578
11 433.0 57.879335 4.385939 42.785878 54.982112 57.944199 60.944837 70.777170
60.0 1 453.0 59.485709 4.503133 45.569861 56.552579 59.234439 62.641668 71.912645
7 434.0 60.027246 4.481930 46.574558 56.848872 60.199163 62.952127 73.283802
10 519.0 59.398593 4.322628 42.556277 56.689272 59.615466 62.333895 69.454161
11 391.0 59.301992 4.627003 46.375800 56.270742 59.378775 62.522001 72.023392
62.0 3 412.0 61.033590 4.407907 48.599105 58.125885 60.873236 63.964379 75.773386
5 344.0 60.946401 4.373208 46.832647 58.267256 61.224659 63.728156 73.533464
8 380.0 60.843327 4.452904 47.873822 58.230446 60.801741 63.976214 72.012517
9 351.0 60.795959 4.698969 47.609656 57.983177 60.780764 63.802268 72.281601
64.0 1 424.0 62.306035 4.490952 50.360029 59.385870 62.127334 65.398961 73.246604
6 411.0 62.295929 4.062271 49.657256 59.905365 62.115365 64.642700 79.076892
9 367.0 62.030062 4.260128 50.411677 59.560359 61.941652 64.858083 77.053130
66.0 2 390.0 64.214225 4.471624 53.026092 61.349062 64.127269 67.292457 76.412401
3 363.0 63.827573 4.348244 51.539569 60.899296 64.112860 66.790450 77.038339
6 430.0 63.274270 4.153892 50.278971 60.501918 63.448719 66.120727 75.581180
9 467.0 63.227000 4.524872 49.126490 60.310858 63.317222 66.224458 76.241597
10 467.0 63.320190 4.206340 51.706448 60.752748 63.389291 66.257810 73.895677
... ... ... ... ... ... ... ... ... ...
72.0 1 308.0 67.105596 3.988249 56.072676 64.518065 67.375670 69.584635 78.148230
5 396.0 66.737392 4.054141 53.525067 64.114736 66.994003 69.225926 77.474852
6 396.0 66.745762 4.073717 53.577162 64.389394 66.752070 69.788252 76.980522
11 355.0 67.054092 3.940224 54.912721 64.155054 67.183713 69.637264 78.417552
74.0 2 301.0 68.204817 3.962156 55.829562 65.625379 68.221858 70.854200 79.012154
8 411.0 68.363125 4.169125 56.075861 65.656876 68.182977 71.249189 79.905088
11 326.0 67.579947 4.053612 57.130135 64.565261 67.696924 70.403293 78.713050
76.0 7 358.0 68.781488 4.096660 54.608736 66.355319 68.931705 71.672270 79.026646
11 426.0 68.766794 3.984070 55.831264 65.892502 68.750538 71.577247 78.723874
78.0 1 351.0 69.622144 4.075867 58.976733 66.778689 69.710970 72.256620 79.918020
4 384.0 70.428799 4.142322 57.418675 67.627569 70.444487 73.133195 79.826006
8 483.0 70.184181 3.894328 56.562572 67.534485 70.069279 73.255960 79.015984
9 398.0 70.385278 3.877417 59.145722 67.487369 70.293185 73.338875 79.788394
80.0 3 450.0 71.103704 3.997840 59.092794 68.187268 71.138455 73.919578 79.813916
4 323.0 70.937934 3.735063 59.999225 68.389160 70.853948 73.358006 79.972879
5 401.0 71.280302 3.731541 57.293351 68.886310 71.226378 73.972694 79.893148
7 363.0 70.819407 4.023257 58.089475 68.232618 70.742925 73.618134 79.841618
82.0 7 530.0 72.472299 3.583265 61.375541 69.969362 72.637772 75.051171 79.840131
9 417.0 72.572387 3.489375 61.230097 70.276459 72.691883 75.245712 79.749375
84.0 0 353.0 72.941866 3.851974 61.411706 70.265705 73.396166 75.674708 79.919922
6 384.0 72.728958 3.738355 60.628963 70.491960 72.999163 75.487230 79.987342
8 368.0 72.511106 3.509828 60.883472 70.414363 72.494318 75.266119 79.764346
11 418.0 72.566080 3.853540 59.859003 69.860998 72.886412 75.442045 79.943748
86.0 2 431.0 73.278687 3.432616 61.184152 71.296807 73.579474 75.696372 79.979453
7 367.0 74.039735 3.558561 62.079075 71.672760 74.335113 76.804868 79.985870
88.0 0 323.0 74.726907 3.327593 62.457663 72.696545 75.075746 77.184729 79.995749
3 378.0 74.751426 3.326440 61.376174 72.642145 75.370817 77.351191 79.981976
9 368.0 74.344644 3.223439 64.245493 72.187502 74.766136 76.897463 79.986850
90.0 1 433.0 75.244142 2.932223 63.459957 73.374371 75.693443 77.510499 79.959867
9 304.0 74.926230 3.328174 63.409408 72.491060 75.512788 77.360695 79.998024

66 rows × 8 columns


In [48]:
rerun3.query("Temp == 300").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)


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

In [49]:
rerun1.query("Temp == 300").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)


Out[49]:
<matplotlib.axes._subplots.AxesSubplot at 0x102d39908>

In [14]:
rerun1.query("Temp == 300").plot.hexbin("DisReal", "z_h6", cmap="seismic", sharex=False)


Out[14]:
<matplotlib.axes._subplots.AxesSubplot at 0x114af14e0>

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


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

In [29]:
rerun1.query("Temp == 300 and DisReal > 50 and z_h6 > -10").plot.hexbin("DisReal", "TotalE", cmap="seismic", sharex=False)


Out[29]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a45e22128>

In [36]:
rerun1.query("Temp == 300")["Lipid4"].hist(bins=50)


Out[36]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a45e3f160>

In [ ]:
rerun1.query("Temp == 300")["Lipid4"].hist(bins=50)

In [33]:
rerun1.query("Temp == 300 and DisReal >50")["Lipid4"].hist(bins=50)


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

In [35]:
t["Lipid4"].max()


Out[35]:
0.85846204409374294

In [37]:
t.min()


Out[37]:
Step             3.000400e+07
Run              0.000000e+00
Temp             3.000000e+02
Qw               1.370902e-01
Energy          -9.278468e+02
DisReal          5.000483e+01
Dis_h56          6.710499e+00
z_average       -1.187149e+01
abs_z_average    8.305289e+00
z_h1            -7.983797e+00
z_h2            -1.203628e+01
z_h3            -3.692447e+01
z_h4            -3.807466e+01
z_h5            -1.531464e+01
z_h6            -9.960542e+00
Distance        -3.117980e+01
AMH-Go          -4.841644e+02
Membrane        -4.470640e+01
Rg               2.709757e+00
rg1              5.378946e-01
rg2              4.601441e-01
rg3              2.074243e-06
rg4              7.900925e-08
rg5              3.985535e-01
rg6              4.499740e-01
rg_all           2.709757e+00
Lipid           -1.669554e+01
Lipid1          -8.508448e+00
Lipid2          -2.143902e+00
Lipid3          -1.469574e+00
Lipid4          -1.703276e+00
Lipid5           1.744623e-03
Lipid6          -2.102832e+00
Lipid7          -2.039454e+00
Lipid8          -2.060487e+00
Lipid9          -8.708428e-01
Lipid10         -2.057677e+00
Lipid11         -2.124074e+00
Lipid12         -2.143502e+00
Lipid13         -2.131216e+00
Lipid14         -2.143222e+00
Lipid15         -2.145796e+00
TotalE          -9.395992e+02
BiasTo           1.000000e+02
dtype: float64

In [30]:
t.mean()


Out[30]:
Step             3.492012e+07
Run              5.722035e+00
Temp             3.000000e+02
Qw               2.791516e-01
Energy          -8.529150e+02
DisReal          6.898342e+01
Dis_h56          2.441343e+01
z_average       -2.226738e+00
abs_z_average    1.039043e+01
z_h1            -1.734524e+00
z_h2            -6.574426e+00
z_h3            -7.348944e+00
z_h4            -8.360311e+00
z_h5            -4.690087e+00
z_h6            -3.456860e+00
Distance         6.291615e+01
AMH-Go          -4.277923e+02
Membrane        -3.800192e+01
Rg               7.370153e+00
rg1              8.948035e-01
rg2              1.059860e+00
rg3              1.762143e+00
rg4              1.262527e+00
rg5              9.144830e-01
rg6              1.476337e+00
rg_all           7.370153e+00
Lipid           -1.165119e+01
Lipid1          -6.423660e+00
Lipid2          -1.035618e+00
Lipid3           2.024773e-02
Lipid4           4.266674e-02
Lipid5           3.464634e-03
Lipid6          -4.149927e-01
Lipid7          -1.362610e-01
Lipid8          -8.471225e-02
Lipid9          -9.081563e-03
Lipid10          2.317721e-01
Lipid11          2.248202e-01
Lipid12         -7.094789e-02
Lipid13         -1.511405e+00
Lipid14         -1.865502e+00
Lipid15         -6.219823e-01
TotalE          -8.645662e+02
dtype: float64

In [26]:
def select(t, i=100):
    return t.groupby(["BiasTo", "Run"])["DisReal"].describe().query(f"count > {i}")

In [27]:
t = rerun1.query("Temp == 300 and DisReal > 50 and z_h6 > -10")
b = select(t,300)

In [28]:
b


Out[28]:
count mean std min 25% 50% 75% max
BiasTo Run
54.0 9 315.0 56.497022 3.626845 50.030841 53.772347 56.516503 58.781095 66.447976
56.0 2 380.0 57.230019 3.858434 50.010446 54.298710 56.884262 60.175382 69.496328
7 478.0 57.637799 3.913047 50.037686 54.726826 57.620867 60.251579 69.056468
8 356.0 57.198967 4.115024 50.039683 53.971660 57.058132 59.954773 68.323366
58.0 0 368.0 58.111254 4.175623 50.047456 55.083698 57.994409 60.653235 70.011126
4 368.0 57.918478 4.686929 50.095536 54.525873 57.503970 61.085095 71.782349
6 333.0 58.387850 4.322981 50.004829 55.075531 58.229031 61.351622 69.944583
11 377.0 58.707428 4.047791 50.034044 56.124062 58.676417 61.451405 70.658472
60.0 1 344.0 59.230079 4.318804 50.124625 55.821415 59.314297 62.232510 71.470052
2 316.0 59.719799 4.283054 50.021556 56.964954 59.823460 62.274652 73.333610
4 430.0 59.969640 3.968517 50.054836 57.325776 59.868658 62.620906 70.241143
6 370.0 59.265528 4.119872 50.099968 56.643213 59.279874 62.104881 68.872140
10 332.0 59.941543 4.170192 50.096730 56.957436 60.188117 62.862042 69.053491
62.0 0 364.0 61.000488 4.603946 50.094185 57.969802 60.621367 64.171266 74.760864
1 327.0 61.047905 4.226562 50.814615 58.345636 60.796262 63.552172 75.487867
5 415.0 61.208498 4.393796 50.172183 58.134588 61.397876 64.291142 75.141571
6 361.0 60.806899 4.408753 50.383843 57.773867 60.796132 63.833580 72.950100
64.0 0 349.0 61.949173 4.267800 51.512040 59.288620 62.125452 64.723343 76.377983
1 333.0 62.325047 4.499096 50.141872 59.060544 62.663201 65.403949 75.425490
2 400.0 61.842861 4.060724 51.069388 59.497596 62.232979 64.497385 72.068602
7 359.0 62.177457 4.292459 52.425857 59.163549 62.100260 65.281349 73.983541
66.0 1 372.0 63.267848 4.291060 51.032984 60.371308 63.395511 65.981716 74.062625
2 312.0 63.330755 4.496194 50.542268 60.584161 63.290539 66.470211 81.014894
5 335.0 63.727993 4.559381 51.689988 60.585168 63.917248 66.767353 75.949178
6 358.0 63.400053 3.924687 53.249591 60.566652 63.359353 66.250730 74.691210
7 322.0 63.013032 4.456566 51.708824 60.004718 62.798396 66.224074 76.321274
9 309.0 63.964340 4.356261 50.175598 61.158125 64.173397 66.874046 75.471801
68.0 7 326.0 64.774976 4.292083 52.844976 61.932320 65.034896 67.765354 74.352430
8 391.0 64.571668 4.105989 50.618519 61.877602 64.690915 67.449288 74.214496
10 333.0 64.291550 4.131974 51.102245 61.529665 64.537021 67.310660 75.196662
... ... ... ... ... ... ... ... ... ...
78.0 4 315.0 69.804616 4.066021 56.719741 67.002305 70.200905 72.705159 82.295215
8 375.0 70.550822 3.862257 59.444951 67.899966 70.532088 73.097819 81.007142
9 348.0 69.888341 4.137365 58.992714 67.179596 69.853020 72.838680 80.349180
80.0 1 360.0 79.084215 5.346536 65.499362 75.326782 79.269878 82.583088 95.050468
3 459.0 70.878083 3.937007 58.930611 67.853229 70.832491 73.678906 82.206068
4 392.0 70.803125 4.018252 57.252132 68.154833 70.892567 73.491593 81.416960
5 337.0 71.697741 3.979840 59.841100 69.387700 71.787929 74.220820 82.880659
6 410.0 71.335394 4.012043 58.654694 68.835172 71.631064 74.061172 82.129794
82.0 7 447.0 73.567878 4.524396 60.879104 70.384324 73.434358 76.623656 88.839722
8 431.0 74.120203 4.766199 60.559852 70.762720 73.906738 77.304610 89.325640
9 517.0 72.439729 4.005941 59.845934 69.720882 72.506503 75.157843 83.974005
10 363.0 80.950712 5.202243 67.004589 77.104817 81.206439 83.909958 100.439135
11 518.0 73.253183 4.930418 60.007782 70.293246 72.807577 75.925396 93.606607
84.0 6 471.0 72.934963 4.148645 61.936795 70.174066 73.062498 75.679284 83.683494
7 487.0 72.889845 3.881517 61.077870 70.235767 73.184701 75.521013 83.466602
8 564.0 73.079357 3.998019 60.440987 70.424787 72.957331 75.740005 87.005234
11 451.0 73.345057 3.837879 62.276898 70.662739 73.287462 76.203754 82.962709
86.0 2 452.0 74.054148 4.123051 63.895237 71.160919 73.822281 76.746180 86.893056
4 430.0 84.170519 5.331678 67.300648 80.708517 84.492920 87.857805 97.387688
6 461.0 84.593250 5.136181 69.999454 81.501125 84.507493 88.006578 98.114418
88.0 0 382.0 76.127436 4.107661 64.471985 73.569800 76.278029 78.764154 89.323299
2 411.0 86.020279 5.085502 69.645518 82.979153 85.540921 89.580703 98.583187
6 304.0 76.042764 4.778843 62.924239 72.470603 75.687438 78.990337 94.561017
11 446.0 86.203738 5.001746 71.174513 82.933114 86.196577 89.809386 99.343494
90.0 1 371.0 78.111852 5.304753 64.406312 74.510031 77.750659 81.248680 94.767027
92.0 2 565.0 77.360763 3.753268 65.499140 74.869149 77.380194 79.767369 88.292691
10 556.0 77.392225 4.020762 67.935052 74.588109 77.475604 79.672841 90.590759
96.0 3 351.0 92.466851 7.223669 76.098706 86.633742 92.292776 97.691197 115.231406
98.0 2 365.0 88.239723 4.538555 77.184772 85.340897 87.791126 91.150228 101.893368
9 497.0 87.974189 4.733511 72.130998 84.998769 88.288127 91.129445 104.647937

78 rows × 8 columns


In [ ]:


In [19]:
rerun1.query("Temp == 300").plot.hexbin("DisReal", "z_h4", cmap="seismic", sharex=False)


Out[19]:
<matplotlib.axes._subplots.AxesSubplot at 0x113f0e4a8>

In [20]:
pre = "/Users/weilu/Research/server/apr_2018/04_week"
temp = 340
location = pre + "/twelve/_280-350/2d_z_h56/force_0.0/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(24, 10), end=(5,24), save=False, xlabel="z_H6", ylabel="Qw", zmax=15)
# 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=120)
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 0x1a08432320>
Out[20]:
[<matplotlib.lines.Line2D at 0x1a1590d4e0>]

In [38]:
pre = "/Users/weilu/Research/server/apr_2018/04_week"
temp = 300
location = pre + "/twelve/_280-350/2d_z_qw/force_0.0/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(4, 10), end=(25,24), save=False, xlabel="z_H6", ylabel="Qw", zmax=20)
# 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=120)
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 0x1a08432320>
Out[38]:
[<matplotlib.lines.Line2D at 0x1a14e32630>]

In [44]:
pre = "/Users/weilu/Research/server/apr_2018/04_week"
temp = 280
location = pre + "/twelve/_280-350/2d_z_qw/force_0.0/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(4, 14), end=(25,24), save=False, xlabel="z_H6", ylabel="Qw", zmax=30)
# 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=120)
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 0x10df7aef0>
Out[44]:
[<matplotlib.lines.Line2D at 0x11494f668>]

In [50]:
pre = "/Users/weilu/Research/server/apr_2018/04_week"
temp = 300
location = pre + "/twelve/_280-350/2d_z_qw/force_0.0/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(4, 14), end=(25,24), save=False, xlabel="z_H6", ylabel="Qw", zmax=30)
# 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=120)
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 0x1a08432320>
Out[50]:
[<matplotlib.lines.Line2D at 0x1a16eeb4a8>]

In [56]:
b = rerun1.query("BiasTo == '92.0'").groupby(["Run", "Temp"])["Step"].count().reset_index()
c = b.pivot(index="Run", columns="Temp", values="Step").reset_index()
c


Out[56]:
Temp Run 280 290 300 310 320 335 350 365 380 410 440 470
0 0 84.0 212.0 360.0 474.0 406.0 201.0 111.0 95.0 117.0 169.0 163.0 108.0
1 1 22.0 48.0 150.0 182.0 202.0 315.0 345.0 355.0 359.0 98.0 210.0 214.0
2 2 826.0 706.0 496.0 283.0 101.0 57.0 23.0 8.0 NaN NaN NaN NaN
3 3 2.0 13.0 85.0 133.0 213.0 369.0 461.0 349.0 293.0 289.0 199.0 94.0
4 4 8.0 26.0 64.0 104.0 130.0 149.0 153.0 229.0 245.0 498.0 460.0 434.0
5 5 4.0 22.0 90.0 113.0 201.0 262.0 254.0 260.0 256.0 356.0 344.0 338.0
6 6 18.0 82.0 180.0 227.0 309.0 285.0 295.0 328.0 330.0 156.0 104.0 186.0
7 7 886.0 755.0 453.0 250.0 118.0 32.0 6.0 NaN NaN NaN NaN NaN
8 8 NaN 4.0 36.0 104.0 226.0 300.0 378.0 421.0 423.0 322.0 224.0 62.0
9 9 NaN 4.0 36.0 86.0 170.0 198.0 160.0 128.0 172.0 383.0 537.0 626.0
10 10 638.0 584.0 434.0 340.0 228.0 130.0 62.0 32.0 42.0 10.0 NaN NaN
11 11 12.0 44.0 116.0 204.0 196.0 202.0 252.0 295.0 263.0 219.0 259.0 438.0

In [53]:
r = (1000/300)**(1/11)

In [55]:
[round(300*r**i) for i in range(12)]


Out[55]:
[300, 335, 373, 417, 465, 519, 579, 645, 720, 803, 896, 1000]

In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]: