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 [96]:
data = pd.read_feather("/Users/weilu/Research/server/aug_2018/02_week/freeEnergy/all_data_folder/include_h14_aug18.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["EnergyAllTerms"] = data["Lipid"] + data["Rg"] + data["Membrane"] + data["AMH-Go"]
data["BiasEnergy"] = 0.02 * (data["BiasTo"] - data["DisReal"])**2
data["Energy_with_all_bias"] = data["BiasEnergy"] + data["BiasedEnergy"]
data["z_h56"] = data["z_h5"] + data["z_h6"]
In [185]:
pre = "/Users/weilu/Research/server/aug_2018/02_week/freeEnergy"
temp = 330
location = pre + "/combined_more_rc/_280-350/2d_zAverage_dis/force_0.1/"
location2 = location + f"pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(18, 30), end=(29,1),save=False, title="without_perturbation", plot1d=2, 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)
In [187]:
t_pos = data.query("TempT <= 373 and TempT > 300 and DisReal > 20 and DisReal < 40 and z_average > -3 and z_average < -1").reset_index(drop=True)
chosen = t_pos.sort_values("EnergyAllTerms").head(20)
# chosen = t_pos.query("Lipid1 < -0.5").sort_values("EnergyAllTerms").head(20)
chosen.to_csv("/Users/weilu/Desktop/native.csv")
In [172]:
pre = "/Users/weilu/Research/server/aug_2018/02_week/freeEnergy"
temp = 330
location = pre + "/combined_more_rc/_280-350/2d_zAverage_dis/force_0.1/"
location2 = location + f"pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(18, 30), end=(29,1), plot1d=0,save=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(-10, 10)
plt.xlim(0,150)
Out[172]:
In [179]:
t_pos = data.query("TempT <= 373 and TempT > 300 and DisReal > 58 and DisReal < 65 and z_average > -3 and z_average < -2").reset_index(drop=True)
chosen = t_pos.sort_values("EnergyAllTerms").head(20)
# chosen = t_pos.query("Lipid1 < -0.5").sort_values("EnergyAllTerms").head(20)
chosen.to_csv("/Users/weilu/Desktop/aug_no_perturb_trans.csv")
In [181]:
t_pos = data.query("TempT <= 373 and TempT > 300 and DisReal > 58 and DisReal < 65 and z_average > -3 and z_average < -2").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("EnergyAllTerms").head(20)
chosen.to_csv("/Users/weilu/Desktop/aug_no_perturb_trans_2.csv")
In [174]:
pre = "/Users/weilu/Research/server/aug_2018/02_week/freeEnergy"
temp = 330
location = pre + "/combined_more_rc/_280-350/2d_zAverage_dis/force_0.1/"
location2 = location + f"pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(18, 30), end=(29,1), plot1d=0,save=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(-10, 10)
plt.xlim(0,150)
Out[174]:
In [178]:
# this looks like the same as I1
t_pos = data.query("TempT <= 373 and TempT > 300 and DisReal > 70 and DisReal < 90 and z_average > -3 and z_average < -2").reset_index(drop=True)
# chosen = t_pos.query("Lipid1 < -0.5").sort_values("EnergyAllTerms").head(20)
chosen = t_pos.sort_values("EnergyAllTerms").head(20)
chosen.to_csv("/Users/weilu/Desktop/aug_no_perturb_inter.csv")
In [182]:
# this looks like the same as I1
t_pos = data.query("TempT <= 373 and TempT > 300 and DisReal > 70 and DisReal < 90 and z_average > -3 and z_average < -2").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("EnergyAllTerms").head(20)
chosen.to_csv("/Users/weilu/Desktop/aug_no_perturb_inter_2.csv")
In [94]:
pre = "/Users/weilu/Research/server/aug_2018/02_week/freeEnergy"
temp = 330
location = pre + "/combined_more_rc/_280-350/2d_zAverage_dis/force_0.1/"
location2 = location + f"pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(18, 30), end=(29,1), plot1d=0,save=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(-15, -5)
plt.xlim(100, 200)
Out[94]:
In [100]:
t_pos = data.query("TempT <= 373 and DisReal > 140 and DisReal < 160 and z_average > -12 and z_average < -10").reset_index(drop=True)
chosen = t_pos.sort_values("EnergyAllTerms").head(n=10)
chosen.to_csv("/Users/weilu/Desktop/aug_no_perturb.csv")
In [ ]:
In [ ]:
In [127]:
# this looks like the same as I1
t_pos = data.query("TempT <= 373 and TempT > 300 and DisReal > 80 and DisReal < 100 and z_average > -7 and z_average < -5").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("EnergyAllTerms").head(20)
chosen.to_csv("/Users/weilu/Desktop/aug_no_perturb_path.csv")
In [156]:
# this looks like the same as I1
t_pos = data.query("TempT <= 373 and TempT > 300 and DisReal > 80 and DisReal < 100 and z_average > -5 and z_average < -4").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("EnergyAllTerms").head(20)
chosen.to_csv("/Users/weilu/Desktop/aug_no_perturb_inter.csv")
In [126]:
pre = "/Users/weilu/Research/server/aug_2018/02_week/freeEnergy"
temp = 330
location = pre + "/combined_more_rc/_280-350/2d_zAverage_dis/force_0.1/"
location2 = location + f"pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(18, 30), end=(29,1), plot1d=0,save=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(-15, -2)
plt.xlim(50, 200)
Out[126]:
In [121]:
t_pos = data.query("TempT <= 373 and TempT > 300 and DisReal > 100 and DisReal < 110 and z_average > -9 and z_average < -7").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("EnergyAllTerms").head(20)
chosen.to_csv("/Users/weilu/Desktop/aug_no_perturb_trans.csv")
In [122]:
t_pos["TempT"].unique()
Out[122]:
In [128]:
a = t_pos["TempT"]
In [132]:
a.astype(str).describe()
Out[132]:
In [180]:
t_pos.hist("Lipid1")
Out[180]:
In [155]:
t_pos.plot.hexbin("EnergyAllTerms", "Qw", cmap="seismic", sharex=False)
Out[155]:
In [102]:
pre = "/Users/weilu/Research/server/aug_2018/02_week/freeEnergy"
temp = 330
location = pre + "/combined_more_rc/_280-350/2d_zAverage_dis/force_0.1/"
location2 = location + f"pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(18, 30), end=(29,1), plot1d=0,save=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(-8, 0)
plt.xlim(50, 200)
Out[102]:
In [107]:
t_pos = data.query("TempT <= 373 and DisReal > 70 and DisReal < 90 and z_average > -3 and z_average < -1").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("EnergyAllTerms").head(20)
chosen.to_csv("/Users/weilu/Desktop/aug_no_perturb_inter.csv")
In [97]:
data.columns
Out[97]:
In [81]:
# data["EnergyAllTerms"] = data["Lipid"] + data["Rg"] + data["Membrane"] + data["AMH-Go"]
In [69]:
a = data["BiasTo"].unique()
In [73]:
a.sort()
In [16]:
data["z_h5"].describe()
Out[16]:
In [74]:
a
Out[74]:
In [76]:
data.columns
Out[76]:
In [3]:
pre = "/Users/weilu/Research/server/aug_2018/02_week"
temp = 370
location = pre + "/freeEnergy/combined_more_force/_280-350/56_z_dis/force_0.1/"
location2 = location + f"perturbation-1-pmf-{temp}.dat" # perturbation 1 is 20% here
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(35,21), end=(5, 35),save=False, title="56_z_dis", xlabel="Z56", ylabel="Dis56", zmax=zmax,res=res)
# print(getBound(location2, res=res, zmax=zmax))
xmin,xmax,ymin,ymax = getBound(location2, res=res, zmax=zmax)
# plt.savefig("/Users/weilu/Dropbox/GlpG_paper_2018/figures/56_z_dis_1d.png", dpi=300)
In [8]:
pre = "/Users/weilu/Research/server/aug_2018/02_week"
temp = 370
location = pre + "/freeEnergy/combined_more_force/_280-350/56_z_dis/force_0.1/"
location2 = location + f"perturbation-1-pmf-{temp}.dat" # perturbation 1 is 20% here
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(35,21), end=(5, 35),save=False, plot1d=0, title="56_z_dis", xlabel="Z56", ylabel="Dis56", zmax=zmax,res=res)
# print(getBound(location2, res=res, zmax=zmax))
# xmin,xmax,ymin,ymax = getBound(location2, res=res, zmax=zmax)
# plt.savefig("/Users/weilu/Dropbox/GlpG_paper_2018/figures/56_z_dis_1d.png", dpi=300)
plt.ylim(20, 50)
plt.xlim(-30, 0)
Out[8]:
In [11]:
pre = "/Users/weilu/Research/server/aug_2018/02_week"
temp = 370
location = pre + "/freeEnergy/combined_more_force/_280-350/56_z_dis/force_0.1/"
location2 = location + f"perturbation-1-pmf-{temp}.dat" # perturbation 1 is 20% here
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(35,21), end=(5, 35),save=False, plot1d=0, title="56_z_dis", xlabel="Z56", ylabel="Dis56", zmax=zmax,res=res)
# print(getBound(location2, res=res, zmax=zmax))
# xmin,xmax,ymin,ymax = getBound(location2, res=res, zmax=zmax)
# plt.savefig("/Users/weilu/Dropbox/GlpG_paper_2018/figures/56_z_dis_1d.png", dpi=300)
plt.ylim(30, 45)
plt.xlim(-25, -5)
# plt.clim(0,18)
Out[11]:
In [85]:
t_pos = data.query("TempT <= 373 and Dis_h56 > 35 and Dis_h56 < 40 and z_h56 > -21 and z_h56 < -15").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("EnergyAllTerms").head(n=20)
chosen["Qw"]
chosen.to_csv("/Users/weilu/Desktop/56_pick_4.csv")
In [84]:
t_pos = data.query("TempT <= 373 and Dis_h56 > 34 and Dis_h56 < 36 and z_h56 > -17.5 and z_h56 < -13").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("EnergyAllTerms").head(n=20)
chosen["Qw"]
chosen.to_csv("/Users/weilu/Desktop/56_pick_3.csv")
In [75]:
chosen.reset_index(drop=True)
Out[75]:
In [71]:
t_pos = data.query("TempT <= 373 and Dis_h56 > 34 and Dis_h56 < 36 and z_h56 > -17.5 and z_h56 < -13").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("Energy_with_all_bias").head(n=20)
chosen["Qw"]
chosen.to_csv("/Users/weilu/Desktop/56_pick_2.csv")
In [67]:
tt.plot.hexbin("z_h56", "Dis_h56", cmap="seismic", sharex=False)
Out[67]:
In [47]:
t = data.query("TempT == 373 and Dis_h56 > 30 and Dis_h56 < 44 and z_h56 > -25 and z_h56 < -5")
t.plot.hexbin("z_h4", "Qw", cmap="seismic", sharex=False)
Out[47]:
In [64]:
t = data.query("TempT <= 373 and Dis_h56 > 30 and Dis_h56 < 44 and z_h56 > -25 and z_h56 < -5")
t.query("Lipid1 < -0.5").query("z_h4 > -14 and z_h4 < 0 and Qw > 0.3 and Qw < 0.5").plot.hexbin("z_h4", "Qw", cmap="seismic", sharex=False)
Out[64]:
In [65]:
tt = t.query("Lipid1 < -0.5").query("z_h4 > -14 and z_h4 < 0 and Qw > 0.3 and Qw < 0.5")
In [66]:
Out[66]:
In [55]:
chosen.query("Lipid1 < -0.5").sample(10)
Out[55]:
In [60]:
chosen = t.query("z_h4 > -14 and z_h4 < 0 and Qw > 0.3 and Qw < 0.5").query("Lipid1 < -0.5")
tt = chosen.sample(20)
tt.to_csv("/Users/weilu/Desktop/56_pick.csv")
In [63]:
# tt = pd.read_csv("/Users/weilu/Desktop/56_pick.csv", index_col=0)
tt["Qw"]
Out[63]:
In [42]:
t_pos = data.query("TempT == 373 and Dis_h56 > 34 and Dis_h56 < 36 and z_h56 > -17.5 and z_h56 < -15").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("Energy_with_all_bias").head(n=20)
chosen["Qw"]
Out[42]:
In [44]:
t_pos = data.query("TempT == 373 and Dis_h56 > 34 and Dis_h56 < 36 and z_h56 > -17.5 and z_h56 < -15").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("Energy_with_all_bias").head(n=20)
# chosen = t_pos.query("z_h4 > -10 and z_h4 < 10").sort_values("AMH_4H").head(n=20)
# chosen = t_pos.sort_values("Energy_with_all_bias").head(n=20)
chosen.to_csv("/Users/weilu/Desktop/56.csv")
In [46]:
chosen.plot.hexbin("z_h4", "Qw", cmap="seismic", sharex=False)
Out[46]:
In [33]:
t_pos.plot.hexbin("z_h4", "AMH_4H", cmap="seismic", sharex=False)
Out[33]:
In [22]:
t_pos.hist("AMH_4H")
Out[22]:
In [40]:
t_pos = data.query("TempT == 373 and Dis_h56 > 38 and Dis_h56 < 40 and z_h56 > -21.5 and z_h56 < -18.5").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("Energy_with_all_bias").head(n=20)
chosen
Out[40]:
In [28]:
t_pos = data.query("TempT == 373 and Dis_h56 > 38 and Dis_h56 < 40 and z_h56 > -21.5 and z_h56 < -18.5").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("Energy_with_all_bias").head(n=20)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("AMH_4H").head(n=20)
chosen
Out[28]:
In [31]:
t_pos = data.query("TempT == 373 and Dis_h56 > 38 and Dis_h56 < 40 and z_h56 > -21.5 and z_h56 < -18.5").reset_index(drop=True)
chosen = t_pos.query("Lipid1 < -0.5").sort_values("Energy_with_all_bias").head(n=20)
chosen = t_pos.query("z_h4 > -10 and z_h4 < 10").sort_values("AMH_4H").head(n=20)
# chosen = t_pos.sort_values("Energy_with_all_bias").head(n=20)
chosen.to_csv("/Users/weilu/Desktop/56_highest_barrier.csv")
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]:
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]:
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]:
In [41]:
chosen["Lipid10"]
Out[41]:
In [29]:
t_pos.query("Lipid1 < -0.5 and Lipid6 < -0.5").sort_values("Energy_with_all_bias").head(n=20)
Out[29]:
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]:
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]:
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]:
In [45]:
t = data.query("TempT == 373 and DisReal < 100 and Lipid1 < -0.3 and Lipid15 < -0.3 and DisReal > 50 and Lipid10 > -0.25")
t.plot.hexbin("Qw", "Lipid10", cmap="seismic", sharex=False)
Out[45]:
In [46]:
t.plot.hexbin("Qw", "DisReal", cmap="seismic", sharex=False)
Out[46]:
In [58]:
t_pos = data.query("TempT == 373 and DisReal < 100 and Lipid1 < -0.3 and Lipid15 < -0.3 and DisReal > 50 and Lipid10 > -0.25")
chosen = t_pos.sort_values("Energy_with_all_bias").head(n=20)
chosen.to_csv("/Users/weilu/Research/data/low_e_path1.csv")
In [57]:
t = data.query("TempT == 373 and Lipid1 > -0.5 and Qw > 0.3 and DisReal > 50")
t.plot.hexbin("Qw", "DisReal", cmap="seismic", sharex=False)
Out[57]:
In [59]:
t_pos = data.query("TempT == 373 and Lipid1 > -0.5 and Qw > 0.3 and DisReal > 50")
chosen = t_pos.sort_values("Energy_with_all_bias").head(n=20)
chosen.to_csv("/Users/weilu/Research/data/low_e_path2.csv")
In [ ]:
t_pos = data.query("TempT == 373 and DisReal > 80 and DisReal < 100 and z_average > -8 and z_average < -4").reset_index(drop=True)
t_pos.plot.hexbin("Energy_with_all_bias", "Lipid1", cmap="seismic", sharex=False)
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]:
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]:
In [194]:
t_pos.hist("z_h6",bins=50)
Out[194]:
In [186]:
t_pos.hist("Lipid1",bins=50)
Out[186]:
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]:
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")
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)
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]:
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 [ ]:
# zoom z -3, dis 240
In [17]:
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(0, -5)
plt.xlim(220, 250)
Out[17]:
In [34]:
t_pos = data.query("DisReal > 220 and DisReal < 250 and z_average > -5 and z_average < 0").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_jun23.csv")
In [21]:
t_pos = data.query("TempT == 373 and DisReal > 220 and DisReal < 250 and z_average > -5 and z_average < 0").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_jun23.csv")
In [22]:
chosen
Out[22]:
In [35]:
chosen["DisReal"]
Out[35]:
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")