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 scipy
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/may_2018/03_week/all_data_folder/second_start_extended_combined_may19.feather")
data = data.reset_index(drop=True)
# data["BiasedEnergy"] = data["TotalE"] + 0.2*data["AMH_4H"]
data["BiasedEnergy"] = data["Lipid"] + data["Rg"] + data["Membrane"] + data["AMH-Go"] + 0.2*data["AMH_4H"]
data["BiasEnergy"] = 0.02 * (data["BiasTo"] - data["DisReal"])**2
data["Energy_with_all_bias"] = data["BiasEnergy"] + data["BiasedEnergy"]

In [4]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 370
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/more_bins/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(18, 30), end=(29,1),save=False, xlabel="Distance", ylabel="AverageZ", plot1d=False, zmax=zmax,res=res)
# print(getBound(location2, res=res, zmax=zmax))
xmin,xmax,ymin,ymax = getBound(location2, res=res, zmax=zmax)


pre transition state


In [15]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 370
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/more_bins/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(18, 30), end=(29,1),save=False, xlabel="Distance", ylabel="AverageZ", plot1d=False, zmax=zmax,res=res)
# print(getBound(location2, res=res, zmax=zmax))
xmin,xmax,ymin,ymax = getBound(location2, res=res, zmax=zmax)
plt.ylim(-8, 0)
plt.xlim(40, 80)
# plt.clim(0, 20)
# plt.colorbar()


Out[15]:
(40, 80)

In [38]:
t_pos = data.query("TempT == 373 and DisReal > 52 and DisReal < 57 and z_average > -4 and z_average < 0").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("Energy_with_all_bias").head(n=20)
# chosen = t_pos.sort_values("Energy_with_all_bias").head(n=20)
chosen.to_csv("/Users/weilu/Research/data/low_e_jun01_pre.csv")

In [18]:
t_pos.hist("Lipid1",bins=50)


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

at transition state


In [20]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 370
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/more_bins/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(18, 30), end=(29,1),save=False, xlabel="Distance", ylabel="AverageZ", plot1d=False, zmax=zmax,res=res)
# print(getBound(location2, res=res, zmax=zmax))
xmin,xmax,ymin,ymax = getBound(location2, res=res, zmax=zmax)
plt.ylim(-8, 0)
plt.xlim(40, 80)
# plt.clim(0, 20)
# plt.colorbar()


Out[20]:
(40, 80)

In [51]:
t_pos = data.query("TempT == 373 and DisReal > 57 and DisReal <63 and z_average > -5 and z_average < -2").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5 and Lipid10 < -0.5").sort_values("Energy_with_all_bias").head(n=10)
# chosen = t_pos.sort_values("Energy_with_all_bias").head(n=20)
chosen.to_csv("/Users/weilu/Research/data/low_e_jun01_transition.csv")

In [50]:
t_pos.query("Lipid1 < -0.5").plot.hexbin("Energy_with_all_bias", "Lipid10", cmap="seismic", sharex=False)


Out[50]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a1a41e240>

In [41]:
chosen["Lipid10"]


Out[41]:
1809   -1.539335
1810   -1.492583
101    -2.004417
1824   -1.290158
114    -2.036322
715    -0.507082
106    -1.930354
1823   -0.967124
113    -1.639273
1825   -1.801742
42     -0.722760
43     -1.407829
41     -1.119277
Name: Lipid10, dtype: float64

In [29]:
t_pos.query("Lipid1 < -0.5 and Lipid6 < -0.5").sort_values("Energy_with_all_bias").head(n=20)


Out[29]:
level_0 AMH AMH-Go AMH_3H AMH_4H BiasTo DisReal Dis_h56 Distance Energy ... z_average z_h1 z_h2 z_h3 z_h4 z_h5 z_h6 BiasedEnergy BiasEnergy Energy_with_all_bias
1809 307888 -195.630242 -435.155569 -256.611899 -309.100543 64.0 58.183612 19.117130 53.955815 -736.440977 ... -3.372721 -1.120181 -6.685898 -4.955295 -10.356982 -8.509524 -4.613997 -537.957084 0.676607 -537.280477
852 222680 -212.492575 -426.742858 -280.660929 -322.856403 66.0 61.794507 23.979250 -48.982575 -698.168487 ... -2.493581 -3.412816 -9.158446 -5.865533 -7.015594 -1.613935 -2.160496 -527.957597 0.353723 -527.603873
2184 418784 -202.883003 -426.597887 -268.332371 -314.045236 70.0 58.645122 26.143309 53.643294 -755.443350 ... -2.323231 -2.429134 -6.090470 -6.003408 -8.892851 -5.687133 -4.399457 -529.470401 2.578665 -526.891736
101 26825 -199.648358 -425.305810 -273.748964 -333.705235 76.0 62.819403 47.702800 53.283447 -723.012908 ... -4.260705 0.139279 -6.230079 -6.442975 -10.699556 -6.137595 -16.491721 -530.114741 3.474563 -526.640178
94 26038 -208.510674 -430.119814 -276.016418 -320.356026 76.0 59.524977 24.224513 58.393343 -728.250229 ... -2.747517 -1.340868 -5.378715 -5.859207 -7.833290 -7.282965 -4.424369 -532.032658 5.428528 -526.604131
979 224932 -200.999176 -424.964917 -268.205085 -314.214457 66.0 61.513355 25.585336 15.120150 -757.444224 ... -2.930676 0.095223 -6.989153 -9.343414 -8.763971 -4.947870 -5.669710 -526.520846 0.402600 -526.118246
855 222692 -212.117022 -428.949862 -274.930920 -315.779656 66.0 58.304995 25.048162 -50.516437 -696.965462 ... -2.739929 -0.467787 -8.357556 -5.537234 -9.871371 -5.828420 -4.298823 -527.272362 1.184262 -526.088100
54 23504 -203.173196 -427.494189 -269.880197 -315.403807 76.0 62.247608 12.586580 30.725986 -730.314199 ... -4.241929 -5.544556 -9.178300 -7.867663 -8.649030 -6.375447 -4.008420 -529.720337 3.782566 -525.937772
2715 580048 -208.429187 -424.416328 -273.843307 -318.042329 66.0 59.913774 25.402670 -20.440483 -707.163751 ... -2.957331 -2.383170 -7.417953 -9.693094 -6.990099 -3.684163 -4.300805 -526.572130 0.740843 -525.831287
831 222424 -208.500164 -420.544978 -274.221226 -318.412940 66.0 61.444471 18.582937 -30.424102 -764.721182 ... -2.475907 -2.184501 -9.018082 -6.716107 -9.031155 -4.425669 -5.255468 -526.152329 0.415057 -525.737272
3023 585741 -205.590513 -424.835540 -266.596363 -312.892384 66.0 61.510270 27.663459 61.236966 -748.585380 ... -3.567792 -1.822974 -8.392898 -7.492330 -10.293985 -5.360528 -6.608474 -525.238362 0.403153 -524.835208
2890 582938 -208.170719 -425.274958 -268.888721 -315.565898 66.0 60.382575 25.155048 44.218346 -740.279154 ... -2.072679 -1.298619 -6.579887 -10.298974 -6.881801 -7.026276 -4.282315 -524.557407 0.631109 -523.926298
2185 418788 -209.170727 -423.160869 -270.003824 -316.414544 70.0 60.011881 25.519077 57.156796 -740.899096 ... -2.901282 -1.588733 -7.268564 -5.158878 -9.573811 -7.027214 -4.388643 -525.269339 1.995250 -523.274089
2767 580969 -207.500873 -419.180389 -274.419193 -319.159743 66.0 62.168897 20.376856 -15.834948 -718.895511 ... -2.429632 -0.330907 -5.280038 -5.899951 -10.524730 -8.366222 -3.552831 -523.268301 0.293547 -522.974754
2889 582934 -199.444272 -426.226597 -261.854898 -308.421515 66.0 59.125702 23.532604 48.910934 -746.689716 ... -2.752155 -3.291837 -8.802374 -11.646004 -7.853802 -3.844650 -2.622916 -523.864884 0.945120 -522.919764
1824 380180 -208.061244 -418.957813 -275.330351 -334.298486 76.0 60.666659 39.362515 35.550336 -739.062584 ... -4.668732 -1.465789 -6.224099 -6.559817 -10.549062 -6.279480 -21.435293 -527.570428 4.702227 -522.868201
805 221914 -203.281412 -420.903618 -268.756059 -314.024096 66.0 62.989386 27.760758 27.292178 -723.455757 ... -3.337388 -0.618825 -7.664474 -7.720646 -10.784186 -6.799462 -7.976852 -522.263435 0.181276 -522.082159
950 224401 -199.417503 -425.681589 -261.475693 -307.181621 66.0 57.831081 24.689610 48.087210 -754.651713 ... -3.198339 -0.984886 -8.154063 -5.880041 -9.803197 -9.561973 -6.575451 -522.967061 1.334625 -521.632436
1162 228622 -204.136704 -422.966143 -271.332616 -309.340516 66.0 57.128272 18.050762 -37.118292 -729.601746 ... -2.350094 -0.952849 -8.304294 -8.363146 -8.623820 -3.682796 -2.957453 -522.966405 1.574151 -521.392254
980 224936 -202.859992 -418.675942 -267.070088 -314.213437 66.0 62.502711 25.801454 10.388485 -729.281251 ... -3.096155 -2.458667 -6.394231 -7.265577 -8.579678 -5.920386 -5.427298 -521.586025 0.244621 -521.341405

20 rows × 53 columns

post trainsition


In [52]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 370
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/more_bins/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(18, 30), end=(29,1),save=False, xlabel="Distance", ylabel="AverageZ", plot1d=False, zmax=zmax,res=res)
# print(getBound(location2, res=res, zmax=zmax))
xmin,xmax,ymin,ymax = getBound(location2, res=res, zmax=zmax)
plt.ylim(-8, 0)
plt.xlim(40, 80)
# plt.clim(0, 20)
# plt.colorbar()


Out[52]:
(40, 80)

In [54]:
t_pos = data.query("TempT == 373 and DisReal > 63 and DisReal <72 and z_average > -6 and z_average < -3").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("Energy_with_all_bias").head(n=20)
# chosen = t_pos.sort_values("Energy_with_all_bias").head(n=20)
chosen.to_csv("/Users/weilu/Research/data/low_e_jun01_post_transition.csv")

In [55]:
chosen


Out[55]:
level_0 AMH AMH-Go AMH_3H AMH_4H BiasTo DisReal Dis_h56 Distance Energy ... z_average z_h1 z_h2 z_h3 z_h4 z_h5 z_h6 BiasedEnergy BiasEnergy Energy_with_all_bias
4010 446101 -211.480423 -442.463754 -286.204801 -345.759750 80.0 66.936457 50.557520 -64.268538 -733.547034 ... -4.976259 -1.394228 -6.643697 -4.078782 -9.780926 -9.066586 -15.639029 -550.266247 3.413123 -546.853124
2839 388904 -221.503388 -436.726296 -291.605144 -345.176318 76.0 65.741900 45.936472 -55.943603 -741.000204 ... -5.869313 -2.672310 -6.559123 -6.108043 -10.470321 -8.651620 -19.190212 -544.426074 2.104572 -542.321502
4015 446133 -213.112447 -439.145305 -289.273137 -347.660227 80.0 67.062016 57.472450 -47.939616 -738.877963 ... -5.763330 -3.748541 -8.568946 -3.402772 -11.275554 -8.917268 -18.321435 -544.521828 3.347829 -541.173999
4013 446125 -209.451212 -436.911669 -285.341764 -342.279061 80.0 69.031551 52.115058 -46.543365 -708.575044 ... -4.951642 -0.677398 -7.152916 -5.391908 -11.183478 -9.321433 -16.967458 -540.502155 2.406137 -538.096018
505 26769 -212.502047 -432.283242 -284.108653 -345.343903 76.0 69.887765 63.889698 60.153880 -762.170015 ... -4.411739 -1.505991 -6.577402 -3.687029 -10.050159 -10.331140 -15.308807 -537.751250 0.747188 -537.004061
569 28377 -211.101138 -428.622490 -285.091278 -342.449126 76.0 68.912845 45.648562 -10.651692 -707.005817 ... -5.963440 -1.719226 -7.853797 -6.875862 -10.784236 -7.533348 -18.696292 -537.018407 1.004555 -536.013852
239 22277 -202.186215 -430.985317 -277.861108 -338.611440 76.0 69.594168 46.242939 -52.808616 -740.588945 ... -5.500809 -2.048178 -6.209699 -3.764542 -10.130583 -9.405525 -19.748512 -535.671116 0.820694 -534.850423
4014 446129 -207.600808 -433.650512 -284.874895 -343.534088 80.0 66.615807 54.887784 -44.059781 -745.538545 ... -5.800334 -2.747858 -9.419299 -4.241098 -12.719748 -9.414943 -16.538970 -537.048270 3.582732 -533.465538
568 28365 -207.214669 -428.678001 -279.481647 -337.742500 76.0 70.805104 50.827103 2.186179 -729.899974 ... -3.491304 0.333993 -5.603651 -1.682577 -9.441809 -8.717918 -16.279346 -533.237648 0.539739 -532.697909
3637 416993 -213.974771 -432.285433 -283.488804 -325.225638 70.0 68.413256 20.869282 65.738819 -735.073151 ... -4.355289 -2.938984 -10.520999 -10.438956 -7.884285 -1.999664 -4.131186 -532.317022 0.050355 -532.266667
4020 446153 -218.924307 -434.669732 -290.140110 -343.611160 80.0 66.020107 53.977987 -60.667803 -721.806330 ... -5.440438 -0.303600 -7.152898 -5.623939 -10.568709 -12.964864 -15.789399 -535.204667 3.908748 -531.295918
543 27397 -212.084337 -432.648025 -287.607980 -343.430750 76.0 68.321083 50.241477 8.093328 -699.138528 ... -5.889171 -1.598715 -6.151286 -0.867239 -9.181193 -17.699486 -20.647653 -531.975144 1.179315 -530.795828
575 28429 -200.693359 -424.773057 -273.493757 -333.706773 76.0 71.413661 56.281308 -2.018128 -740.015782 ... -5.325413 -0.100392 -6.316062 -4.652214 -10.309873 -11.555529 -21.319595 -530.953067 0.420690 -530.532377
4016 446137 -214.962985 -427.105238 -284.235463 -334.491148 80.0 65.340862 59.125437 -46.143545 -746.707614 ... -5.360031 -2.405346 -8.336494 -4.800097 -8.650347 -6.013376 -22.375479 -534.732178 4.297807 -530.434371
4018 446145 -203.743942 -429.051506 -274.857001 -334.947562 80.0 66.895127 56.166531 -51.738827 -749.106874 ... -5.894091 -1.081719 -7.207967 -6.559293 -11.151075 -7.630941 -22.014183 -533.101654 3.434754 -529.666900
4022 446161 -203.667352 -425.190842 -276.798774 -334.102619 80.0 70.160395 51.383012 -59.064280 -747.133193 ... -5.591876 -2.371950 -7.043812 -4.908712 -11.345381 -9.428008 -18.492082 -531.488826 1.936356 -529.552469
4009 446097 -202.319146 -424.259724 -275.420463 -334.284197 80.0 70.695499 50.032869 -65.795765 -730.866002 ... -5.037388 -0.595712 -6.308466 -5.530896 -9.205614 -8.241701 -19.952801 -531.050822 1.731475 -529.319347
2186 228832 -211.483525 -427.413298 -276.233647 -318.928657 66.0 63.485843 24.180937 -63.033278 -756.898569 ... -3.951987 -2.624168 -7.198137 -7.236925 -10.475400 -9.036326 -5.986729 -529.084324 0.126420 -528.957904
512 26861 -215.737067 -422.403880 -289.170966 -345.337835 76.0 66.815424 72.045591 54.222840 -690.435599 ... -5.547676 -0.592264 -6.868703 -5.508089 -10.873647 -7.458156 -16.465050 -529.994269 1.687129 -528.307140
329 23948 -205.677384 -429.765714 -272.896064 -319.530844 76.0 69.921961 20.899628 16.125406 -705.054513 ... -3.892404 -0.945163 -7.583568 -7.171835 -10.770997 -9.203308 -4.550224 -528.595577 0.738851 -527.856726

20 rows × 53 columns

5-6 out region

zoom to 50 - 130


In [5]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 370
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/more_bins/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(18, 30), end=(29,1),save=False, xlabel="Distance", ylabel="AverageZ", plot1d=False, zmax=zmax,res=res)
# print(getBound(location2, res=res, zmax=zmax))
xmin,xmax,ymin,ymax = getBound(location2, res=res, zmax=zmax)
plt.ylim(-15, 0)
plt.xlim(50, 120)
# plt.clim(0, 20)
# plt.colorbar()


Out[5]:
(50, 120)

In [193]:
t_pos = data.query("TempT == 373 and DisReal > 80 and DisReal < 100 and z_average > -8 and z_average < -4").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("Energy_with_all_bias").head(n=20)
chosen.to_csv("/Users/weilu/Research/data/low_e_jun01_h56.csv")

In [197]:
t_pos.query("Lipid1 < -0.5").sort_values("Energy_with_all_bias").head(n=20)


Out[197]:
level_0 AMH AMH-Go AMH_3H AMH_4H BiasTo DisReal Dis_h56 Distance Energy ... z_average z_h1 z_h2 z_h3 z_h4 z_h5 z_h6 BiasedEnergy BiasEnergy Energy_with_all_bias
7922 600066 -218.142307 -446.992027 -291.678962 -352.354453 94.0 93.045966 62.599341 -33.528161 -739.972991 ... -7.928949 -3.226523 -9.011228 -6.757330 -14.131343 -14.803465 -21.232008 -548.922365 0.018204 -548.904161
7921 600062 -212.394362 -443.980428 -286.857215 -349.705965 94.0 89.735826 62.417495 -38.614652 -761.752478 ... -6.611168 -2.650674 -6.301858 -6.033335 -9.673215 -10.093627 -20.069953 -544.805595 0.363664 -544.441931
9008 653790 -214.252021 -436.923250 -285.205326 -345.318451 92.0 82.772092 58.521394 69.845324 -737.297739 ... -4.478611 0.097867 -6.508623 -4.419184 -9.199424 -6.788752 -17.728036 -545.132696 1.703086 -543.429611
2077 240410 -220.312986 -437.590957 -290.558738 -346.437659 94.0 94.635741 65.483675 38.657025 -733.150749 ... -6.246558 -0.183788 -6.445593 -4.796985 -9.924937 -17.313959 -19.361403 -543.242774 0.008083 -543.234691
1049 28461 -210.956131 -441.325110 -279.734301 -341.120978 76.0 80.201087 62.110460 -32.345150 -746.558349 ... -7.025193 -3.172057 -7.528709 -4.070789 -9.033173 -12.842535 -25.990765 -543.154244 0.352983 -542.801261
2854 270713 -211.361449 -437.038069 -287.883144 -345.241391 98.0 97.091568 71.533853 -96.869755 -772.208512 ... -6.390107 -2.693870 -6.815748 -4.249246 -9.322100 -16.711451 -17.488690 -542.273375 0.016505 -542.256870
6716 446065 -212.398077 -440.203450 -284.330981 -344.442563 80.0 83.013829 67.293783 -82.875897 -711.944040 ... -5.828299 -1.815328 -5.904521 -4.346957 -10.804010 -6.916591 -20.667553 -541.813732 0.181663 -541.632068
6690 445885 -208.093119 -436.829162 -286.090277 -344.267325 80.0 81.883750 63.799134 -69.686281 -726.046091 ... -6.148379 -0.260000 -4.974692 -3.671368 -10.373978 -14.422206 -21.623450 -540.727587 0.070970 -540.656617
7776 563495 -208.908227 -437.178089 -282.820087 -343.123115 78.0 82.207193 69.044239 -80.949390 -753.426505 ... -5.874535 -1.388256 -6.618534 -3.846508 -8.456262 -12.426866 -21.845310 -540.876040 0.354010 -540.522030
8522 619536 -209.730173 -435.139497 -285.360462 -343.690619 104.0 96.789610 67.003272 95.343535 -735.130488 ... -6.596803 -1.326120 -7.209749 -4.823753 -8.103709 -19.455100 -21.162817 -540.816427 1.039794 -539.776632
7778 563503 -208.436583 -436.837397 -283.238919 -343.463335 78.0 81.885067 56.982906 -76.685979 -724.020549 ... -7.114902 -1.477568 -6.612649 -3.199120 -10.453508 -16.777874 -25.190495 -539.798110 0.301875 -539.496235
1050 28473 -220.135601 -437.217229 -288.001001 -344.205189 76.0 82.991120 59.262175 -46.431646 -695.112952 ... -5.860363 -1.736144 -6.739031 -4.830234 -9.022601 -15.413089 -16.632460 -540.455567 0.977515 -539.478051
7781 563515 -206.870561 -438.635809 -281.591238 -338.710943 78.0 80.438295 56.187564 -74.028878 -732.064724 ... -5.460732 -0.545938 -4.768490 -3.701174 -9.765834 -11.239591 -19.515109 -539.522952 0.118906 -539.404046
1189 86301 -211.960730 -433.898772 -288.850065 -343.979583 80.0 82.855169 58.199864 76.025872 -760.927061 ... -5.386483 -0.389457 -6.562827 -5.948995 -9.201132 -6.871661 -16.303929 -538.857740 0.163040 -538.694700
8436 615664 -220.172608 -434.375236 -293.490150 -346.232024 104.0 97.984068 68.400507 97.231447 -723.571190 ... -6.078925 -3.106545 -7.654687 -4.219001 -9.031671 -13.851543 -17.208749 -538.912540 0.723829 -538.188711
1063 28753 -214.422406 -435.485956 -294.187917 -348.320962 76.0 80.309756 62.441801 -4.856663 -699.791206 ... -7.393932 -2.138212 -8.414449 -5.969417 -11.707585 -13.769266 -19.604829 -538.547087 0.371480 -538.175607
8007 605130 -212.480672 -435.874502 -281.993553 -342.886565 94.0 92.213645 68.460968 -20.396868 -762.221972 ... -4.706191 -0.564139 -5.381373 -4.617875 -8.572165 -12.342966 -15.949221 -538.147457 0.063821 -538.083636
2800 270421 -217.402294 -435.218341 -286.262799 -347.543004 98.0 97.090140 71.985975 -61.814981 -753.150084 ... -5.882859 -0.750126 -5.237230 -6.577398 -9.833065 -12.076057 -17.387600 -538.013094 0.016557 -537.996537
8527 619556 -214.674099 -439.749728 -294.699730 -349.979451 104.0 87.399507 67.526418 84.622477 -736.302262 ... -6.652500 -1.482072 -6.822858 -5.439398 -8.437352 -11.065111 -23.253700 -543.488331 5.511527 -537.976803
6329 387148 -206.661892 -435.570556 -282.275930 -342.914038 76.0 83.713251 60.623246 10.576354 -736.566069 ... -6.517047 -3.287793 -7.576438 -3.541026 -9.750046 -12.812499 -19.557466 -539.053267 1.189885 -537.863382

20 rows × 53 columns

notice two caveats

  1. At relative high temp(373), helix 6 is in the membrane half the time(energy term can pick out those I want)
  2. helix 1 could be seperated from the rest 5 helix.(energy term cannot pick them out)

In [198]:
t_pos["chosen"] = (t_pos["Lipid1"] < -0.5) &(t_pos["z_h6"] < -10) & (t_pos["z_h3"] > -15)
a = t_pos["chosen"]
a.value_counts()


Out[198]:
False    5743
True     4181
Name: chosen, dtype: int64

In [194]:
t_pos.hist("z_h6",bins=50)


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

In [186]:
t_pos.hist("Lipid1",bins=50)


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

3-4 out region

zoom to 120 - 200


In [201]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 370
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/more_bins/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(18, 30), end=(29,1),save=False, xlabel="Distance", ylabel="AverageZ", plot1d=False, zmax=zmax,res=res)
# print(getBound(location2, res=res, zmax=zmax))
xmin,xmax,ymin,ymax = getBound(location2, res=res, zmax=zmax)
# plt.ylim(-15, 0)
# plt.xlim(50, 120)



In [203]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 370
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/more_bins/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(18, 30), end=(29,1),save=False, xlabel="Distance", ylabel="AverageZ", plot1d=False, zmax=zmax,res=res)
# print(getBound(location2, res=res, zmax=zmax))
xmin,xmax,ymin,ymax = getBound(location2, res=res, zmax=zmax)
plt.ylim(-20, -5)
plt.xlim(120, 200)


Out[203]:
(120, 200)

In [208]:
t_pos = data.query("TempT == 373 and DisReal > 140 and DisReal < 180 and z_average > -14 and z_average < -8").reset_index(drop=True)
chosen = t_pos.sort_values("Energy_with_all_bias").head(n=20)
chosen.to_csv("/Users/weilu/Research/data/low_e_jun01_h34.csv")

Next, additional state visible under high force


In [213]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 370
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/higer_force_0.2/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, title="high_force_AverageZ_Dis", start=(11, 36), end=(26,0),save=False, plot1d=False, xlabel="Distance", ylabel="AverageZ", zmax=zmax,res=res)
# print(getBound(location2, res=res, zmax=zmax))
xmin,xmax,ymin,ymax = getBound(location2, res=res, zmax=zmax)


zoom to 120 - 300


In [6]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 370
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/higer_force_0.2/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, title="high_force_AverageZ_Dis", start=(11, 36), end=(26,0),save=False, plot1d=False, xlabel="Distance", ylabel="AverageZ", zmax=zmax,res=res)
# print(getBound(location2, res=res, zmax=zmax))
xmin,xmax,ymin,ymax = getBound(location2, res=res, zmax=zmax)
plt.ylim(-20, -5)
plt.xlim(120, 300)


Out[6]:
(120, 300)

In [7]:
t_pos = data.query("TempT == 373 and DisReal > 220 and DisReal < 250 and z_average > -14 and z_average < -10").reset_index(drop=True)
chosen = t_pos.sort_values("Energy_with_all_bias").head(n=20)
chosen.to_csv("/Users/weilu/Research/data/low_e_jun01_h12.csv")

In [ ]:

complete out


In [10]:
t_pos = data.query("TempT == 373 and DisReal > 260 and z_average < -16").reset_index(drop=True)
chosen = t_pos.sort_values("Energy_with_all_bias").head(n=20)
chosen.to_csv("/Users/weilu/Research/data/low_e_jun01_out.csv")