In [2]:
import matplotlib as mpl
import matplotlib.pyplot as plt
from scipy.interpolate import griddata
from scipy.interpolate import interp2d
import sys
import argparse
import os
import numpy as np
from numpy.random import uniform
import pandas as pd
from itertools import product
import datetime
import glob
# %matplotlib inline
%matplotlib notebook

In [26]:
def expand_grid(dictionary):
    return pd.DataFrame([row for row in product(*dictionary.values())],
                        columns=dictionary.keys())
def readPMF(pmf_list_data, pre):
    pmf_list_data = expand_grid(pmf_list)
    all_pmf_list = []
    for index, row in pmf_list_data.iterrows():
    #     print(index)
    #     print("--")
    #     print(row)
        force = row["force"]
        temp = row["temp"]
        perturbation = row["perturbation"]
        if perturbation == 0:
            location = pre + f"/force_{force}/pmf-{temp}.dat"
            change = "none"
            upOrDown = "none"
        else:
            location = pre + f"/force_{force}/perturbation-{perturbation}-pmf-{temp}.dat"
            change = perturbation_table[perturbation].split("_")[-1]
            upOrDown = perturbation_table[perturbation].split("_")[0]
    #     print(location)
        name_list = ["f", "df", "e", "s"]
        names = ["bin", "x"] + name_list
        try:
            data = pd.read_table(location, skiprows=2, sep='\s+', names=names).assign(upOrDown=upOrDown, change=change, force=force, temp=temp, perturbation=perturbation_table[perturbation])
            all_pmf_list.append(data)
        except:
            print(row, "not available")
    return pd.concat(all_pmf_list).dropna().reset_index()

In [60]:
def expand_grid(dictionary):
    return pd.DataFrame([row for row in product(*dictionary.values())],
                        columns=dictionary.keys())
def readPMF(pre):
    perturbation_table = {0:"original", 1:"p_mem",
                          2:"m_mem", 3:"p_lipid",
                          4:"m_lipid", 5:"p_go",
                          6:"m_go", 7:"p_rg", 8:"m_rg"}
    pmf_list = {
    "perturbation":list(perturbation_table.keys()),
    "force":["0.0", "0.1", "0.2"]
    }
    pmf_list_data = expand_grid(pmf_list)
    all_pmf_list = []
    for index, row in pmf_list_data.iterrows():
    #     print(index)
    #     print("--")
    #     print(row)
        force = row["force"]
        perturbation = row["perturbation"]
        if perturbation == 0:
            location = pre + f"/force_{force}/pmf-*.dat"
            pmf_list = glob.glob(location)
            change = "none"
            upOrDown = "none"
        else:
            location = pre + f"/force_{force}/perturbation-{perturbation}-pmf-*.dat"
            pmf_list = glob.glob(location)
            change = perturbation_table[perturbation].split("_")[-1]
            upOrDown = perturbation_table[perturbation].split("_")[0]
    #     print(location)
        name_list = ["f", "df", "e", "s"]
        names = ["bin", "x"] + name_list
        for location in pmf_list:
#             print(location)
            temp = re.findall(r'pmf-(\d+)', location)
            if len(temp) != 1:
                raise ValueError('Not expected to see more than one or none')
            else:
                temp = temp[0]
            data = pd.read_table(location, skiprows=2, sep='\s+', names=names).assign(upOrDown=upOrDown, change=change, force=force, temp=temp, perturbation=perturbation_table[perturbation])
            all_pmf_list.append(data)

    return pd.concat(all_pmf_list).dropna().reset_index()

In [66]:
pre = "/Users/weilu/Research/davinci/all_freeEnergy_calculation_nov11/"
pre = pre + "next_gen_native_based_memb_3_rg_0.4_lipid_0.6_topology/1d_dis"
data = readPMF(pre)

In [74]:
import datetime

In [94]:
datetime.datetime.today().strftime("%d_%h")


Out[94]:
'14_Nov'

In [78]:
print(datetime.date())


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-78-3ccbc339ae28> in <module>()
----> 1 print(datetime.date())

TypeError: Required argument 'year' (pos 1) not found

In [ ]:
# pre = "/Users/weilu/Research/davinci/all_freeEnergy_calculation/rgWidth_memb_3_rg_0.1_lipid_1_extended/1d_dis/"
pre = "/Users/weilu/Research/davinci/all_freeEnergy_calculation_nov11/next_gen_native_based_memb_3_rg_0.4_lipid_0.6_topology/1d_dis"
perturbation_table = {0:"original", 1:"p_mem", 2:"m_mem", 3:"p_lipid", 4:"m_lipid", 5:"p_go", 6:"m_go", 7:"p_rg", 8:"m_rg"}
pmf_list = {
    "temp":[*range(450, 610, 10)],
    "perturbation":list(perturbation_table.keys()),
    "force":["0.0", "0.1", "0.2"]
}
data = readPMF(pmf_list, pre)
remove_columns = ['bin']
data = data.drop(remove_columns, axis=1)
data.to_feather("/Users/weilu/Research/data/pulling/nov14_pmf.feather")

In [27]:
# pre = "/Users/weilu/Research/davinci/all_freeEnergy_calculation/rgWidth_memb_3_rg_0.1_lipid_1_extended/1d_dis/"
pre = "/Users/weilu/Research/davinci/all_freeEnergy_calculation_nov11/next_gen_native_based_memb_3_rg_0.4_lipid_0.6_topology/1d_dis"
perturbation_table = {0:"original", 1:"p_mem", 2:"m_mem", 3:"p_lipid", 4:"m_lipid", 5:"p_go", 6:"m_go", 7:"p_rg", 8:"m_rg"}
pmf_list = {
    "temp":[*range(450, 610, 10)],
    "perturbation":list(perturbation_table.keys()),
    "force":["0.0", "0.1", "0.2"]
}
data = readPMF(pmf_list, pre)
remove_columns = ['bin']
data = data.drop(remove_columns, axis=1)
data.to_feather("/Users/weilu/Research/data/pulling/nov14_pmf.feather")


temp            450
perturbation      1
force           0.0
Name: 3, dtype: object not available
temp            450
perturbation      1
force           0.1
Name: 4, dtype: object not available
temp            450
perturbation      1
force           0.2
Name: 5, dtype: object not available
temp            450
perturbation      2
force           0.0
Name: 6, dtype: object not available
temp            450
perturbation      2
force           0.1
Name: 7, dtype: object not available
temp            450
perturbation      2
force           0.2
Name: 8, dtype: object not available
temp            450
perturbation      3
force           0.0
Name: 9, dtype: object not available
temp            450
perturbation      3
force           0.1
Name: 10, dtype: object not available
temp            450
perturbation      3
force           0.2
Name: 11, dtype: object not available
temp            450
perturbation      4
force           0.0
Name: 12, dtype: object not available
temp            450
perturbation      4
force           0.1
Name: 13, dtype: object not available
temp            450
perturbation      4
force           0.2
Name: 14, dtype: object not available
temp            450
perturbation      5
force           0.0
Name: 15, dtype: object not available
temp            450
perturbation      5
force           0.1
Name: 16, dtype: object not available
temp            450
perturbation      5
force           0.2
Name: 17, dtype: object not available
temp            450
perturbation      6
force           0.0
Name: 18, dtype: object not available
temp            450
perturbation      6
force           0.1
Name: 19, dtype: object not available
temp            450
perturbation      6
force           0.2
Name: 20, dtype: object not available
temp            450
perturbation      7
force           0.0
Name: 21, dtype: object not available
temp            450
perturbation      7
force           0.1
Name: 22, dtype: object not available
temp            450
perturbation      7
force           0.2
Name: 23, dtype: object not available
temp            450
perturbation      8
force           0.0
Name: 24, dtype: object not available
temp            450
perturbation      8
force           0.1
Name: 25, dtype: object not available
temp            450
perturbation      8
force           0.2
Name: 26, dtype: object not available
temp            460
perturbation      1
force           0.0
Name: 30, dtype: object not available
temp            460
perturbation      1
force           0.1
Name: 31, dtype: object not available
temp            460
perturbation      1
force           0.2
Name: 32, dtype: object not available
temp            460
perturbation      2
force           0.0
Name: 33, dtype: object not available
temp            460
perturbation      2
force           0.1
Name: 34, dtype: object not available
temp            460
perturbation      2
force           0.2
Name: 35, dtype: object not available
temp            460
perturbation      3
force           0.0
Name: 36, dtype: object not available
temp            460
perturbation      3
force           0.1
Name: 37, dtype: object not available
temp            460
perturbation      3
force           0.2
Name: 38, dtype: object not available
temp            460
perturbation      4
force           0.0
Name: 39, dtype: object not available
temp            460
perturbation      4
force           0.1
Name: 40, dtype: object not available
temp            460
perturbation      4
force           0.2
Name: 41, dtype: object not available
temp            460
perturbation      5
force           0.0
Name: 42, dtype: object not available
temp            460
perturbation      5
force           0.1
Name: 43, dtype: object not available
temp            460
perturbation      5
force           0.2
Name: 44, dtype: object not available
temp            460
perturbation      6
force           0.0
Name: 45, dtype: object not available
temp            460
perturbation      6
force           0.1
Name: 46, dtype: object not available
temp            460
perturbation      6
force           0.2
Name: 47, dtype: object not available
temp            460
perturbation      7
force           0.0
Name: 48, dtype: object not available
temp            460
perturbation      7
force           0.1
Name: 49, dtype: object not available
temp            460
perturbation      7
force           0.2
Name: 50, dtype: object not available
temp            460
perturbation      8
force           0.0
Name: 51, dtype: object not available
temp            460
perturbation      8
force           0.1
Name: 52, dtype: object not available
temp            460
perturbation      8
force           0.2
Name: 53, dtype: object not available
temp            470
perturbation      1
force           0.0
Name: 57, dtype: object not available
temp            470
perturbation      1
force           0.1
Name: 58, dtype: object not available
temp            470
perturbation      1
force           0.2
Name: 59, dtype: object not available
temp            470
perturbation      2
force           0.0
Name: 60, dtype: object not available
temp            470
perturbation      2
force           0.1
Name: 61, dtype: object not available
temp            470
perturbation      2
force           0.2
Name: 62, dtype: object not available
temp            470
perturbation      3
force           0.0
Name: 63, dtype: object not available
temp            470
perturbation      3
force           0.1
Name: 64, dtype: object not available
temp            470
perturbation      3
force           0.2
Name: 65, dtype: object not available
temp            470
perturbation      4
force           0.0
Name: 66, dtype: object not available
temp            470
perturbation      4
force           0.1
Name: 67, dtype: object not available
temp            470
perturbation      4
force           0.2
Name: 68, dtype: object not available
temp            470
perturbation      5
force           0.0
Name: 69, dtype: object not available
temp            470
perturbation      5
force           0.1
Name: 70, dtype: object not available
temp            470
perturbation      5
force           0.2
Name: 71, dtype: object not available
temp            470
perturbation      6
force           0.0
Name: 72, dtype: object not available
temp            470
perturbation      6
force           0.1
Name: 73, dtype: object not available
temp            470
perturbation      6
force           0.2
Name: 74, dtype: object not available
temp            470
perturbation      7
force           0.0
Name: 75, dtype: object not available
temp            470
perturbation      7
force           0.1
Name: 76, dtype: object not available
temp            470
perturbation      7
force           0.2
Name: 77, dtype: object not available
temp            470
perturbation      8
force           0.0
Name: 78, dtype: object not available
temp            470
perturbation      8
force           0.1
Name: 79, dtype: object not available
temp            470
perturbation      8
force           0.2
Name: 80, dtype: object not available
temp            480
perturbation      1
force           0.0
Name: 84, dtype: object not available
temp            480
perturbation      1
force           0.1
Name: 85, dtype: object not available
temp            480
perturbation      1
force           0.2
Name: 86, dtype: object not available
temp            480
perturbation      2
force           0.0
Name: 87, dtype: object not available
temp            480
perturbation      2
force           0.1
Name: 88, dtype: object not available
temp            480
perturbation      2
force           0.2
Name: 89, dtype: object not available
temp            480
perturbation      3
force           0.0
Name: 90, dtype: object not available
temp            480
perturbation      3
force           0.1
Name: 91, dtype: object not available
temp            480
perturbation      3
force           0.2
Name: 92, dtype: object not available
temp            480
perturbation      4
force           0.0
Name: 93, dtype: object not available
temp            480
perturbation      4
force           0.1
Name: 94, dtype: object not available
temp            480
perturbation      4
force           0.2
Name: 95, dtype: object not available
temp            480
perturbation      5
force           0.0
Name: 96, dtype: object not available
temp            480
perturbation      5
force           0.1
Name: 97, dtype: object not available
temp            480
perturbation      5
force           0.2
Name: 98, dtype: object not available
temp            480
perturbation      6
force           0.0
Name: 99, dtype: object not available
temp            480
perturbation      6
force           0.1
Name: 100, dtype: object not available
temp            480
perturbation      6
force           0.2
Name: 101, dtype: object not available
temp            480
perturbation      7
force           0.0
Name: 102, dtype: object not available
temp            480
perturbation      7
force           0.1
Name: 103, dtype: object not available
temp            480
perturbation      7
force           0.2
Name: 104, dtype: object not available
temp            480
perturbation      8
force           0.0
Name: 105, dtype: object not available
temp            480
perturbation      8
force           0.1
Name: 106, dtype: object not available
temp            480
perturbation      8
force           0.2
Name: 107, dtype: object not available
temp            490
perturbation      1
force           0.0
Name: 111, dtype: object not available
temp            490
perturbation      1
force           0.1
Name: 112, dtype: object not available
temp            490
perturbation      1
force           0.2
Name: 113, dtype: object not available
temp            490
perturbation      2
force           0.0
Name: 114, dtype: object not available
temp            490
perturbation      2
force           0.1
Name: 115, dtype: object not available
temp            490
perturbation      2
force           0.2
Name: 116, dtype: object not available
temp            490
perturbation      3
force           0.0
Name: 117, dtype: object not available
temp            490
perturbation      3
force           0.1
Name: 118, dtype: object not available
temp            490
perturbation      3
force           0.2
Name: 119, dtype: object not available
temp            490
perturbation      4
force           0.0
Name: 120, dtype: object not available
temp            490
perturbation      4
force           0.1
Name: 121, dtype: object not available
temp            490
perturbation      4
force           0.2
Name: 122, dtype: object not available
temp            490
perturbation      5
force           0.0
Name: 123, dtype: object not available
temp            490
perturbation      5
force           0.1
Name: 124, dtype: object not available
temp            490
perturbation      5
force           0.2
Name: 125, dtype: object not available
temp            490
perturbation      6
force           0.0
Name: 126, dtype: object not available
temp            490
perturbation      6
force           0.1
Name: 127, dtype: object not available
temp            490
perturbation      6
force           0.2
Name: 128, dtype: object not available
temp            490
perturbation      7
force           0.0
Name: 129, dtype: object not available
temp            490
perturbation      7
force           0.1
Name: 130, dtype: object not available
temp            490
perturbation      7
force           0.2
Name: 131, dtype: object not available
temp            490
perturbation      8
force           0.0
Name: 132, dtype: object not available
temp            490
perturbation      8
force           0.1
Name: 133, dtype: object not available
temp            490
perturbation      8
force           0.2
Name: 134, dtype: object not available
temp            500
perturbation      0
force           0.2
Name: 137, dtype: object not available
temp            500
perturbation      1
force           0.0
Name: 138, dtype: object not available
temp            500
perturbation      1
force           0.1
Name: 139, dtype: object not available
temp            500
perturbation      1
force           0.2
Name: 140, dtype: object not available
temp            500
perturbation      2
force           0.0
Name: 141, dtype: object not available
temp            500
perturbation      2
force           0.1
Name: 142, dtype: object not available
temp            500
perturbation      2
force           0.2
Name: 143, dtype: object not available
temp            500
perturbation      3
force           0.0
Name: 144, dtype: object not available
temp            500
perturbation      3
force           0.1
Name: 145, dtype: object not available
temp            500
perturbation      3
force           0.2
Name: 146, dtype: object not available
temp            500
perturbation      4
force           0.0
Name: 147, dtype: object not available
temp            500
perturbation      4
force           0.1
Name: 148, dtype: object not available
temp            500
perturbation      4
force           0.2
Name: 149, dtype: object not available
temp            500
perturbation      5
force           0.0
Name: 150, dtype: object not available
temp            500
perturbation      5
force           0.1
Name: 151, dtype: object not available
temp            500
perturbation      5
force           0.2
Name: 152, dtype: object not available
temp            500
perturbation      6
force           0.0
Name: 153, dtype: object not available
temp            500
perturbation      6
force           0.1
Name: 154, dtype: object not available
temp            500
perturbation      6
force           0.2
Name: 155, dtype: object not available
temp            500
perturbation      7
force           0.0
Name: 156, dtype: object not available
temp            500
perturbation      7
force           0.1
Name: 157, dtype: object not available
temp            500
perturbation      7
force           0.2
Name: 158, dtype: object not available
temp            500
perturbation      8
force           0.0
Name: 159, dtype: object not available
temp            500
perturbation      8
force           0.1
Name: 160, dtype: object not available
temp            500
perturbation      8
force           0.2
Name: 161, dtype: object not available
temp            510
perturbation      0
force           0.0
Name: 162, dtype: object not available
temp            510
perturbation      0
force           0.1
Name: 163, dtype: object not available
temp            510
perturbation      0
force           0.2
Name: 164, dtype: object not available
temp            510
perturbation      1
force           0.0
Name: 165, dtype: object not available
temp            510
perturbation      1
force           0.1
Name: 166, dtype: object not available
temp            510
perturbation      1
force           0.2
Name: 167, dtype: object not available
temp            510
perturbation      2
force           0.0
Name: 168, dtype: object not available
temp            510
perturbation      2
force           0.1
Name: 169, dtype: object not available
temp            510
perturbation      2
force           0.2
Name: 170, dtype: object not available
temp            510
perturbation      3
force           0.0
Name: 171, dtype: object not available
temp            510
perturbation      3
force           0.1
Name: 172, dtype: object not available
temp            510
perturbation      3
force           0.2
Name: 173, dtype: object not available
temp            510
perturbation      4
force           0.0
Name: 174, dtype: object not available
temp            510
perturbation      4
force           0.1
Name: 175, dtype: object not available
temp            510
perturbation      4
force           0.2
Name: 176, dtype: object not available
temp            510
perturbation      5
force           0.0
Name: 177, dtype: object not available
temp            510
perturbation      5
force           0.1
Name: 178, dtype: object not available
temp            510
perturbation      5
force           0.2
Name: 179, dtype: object not available
temp            510
perturbation      6
force           0.0
Name: 180, dtype: object not available
temp            510
perturbation      6
force           0.1
Name: 181, dtype: object not available
temp            510
perturbation      6
force           0.2
Name: 182, dtype: object not available
temp            510
perturbation      7
force           0.0
Name: 183, dtype: object not available
temp            510
perturbation      7
force           0.1
Name: 184, dtype: object not available
temp            510
perturbation      7
force           0.2
Name: 185, dtype: object not available
temp            510
perturbation      8
force           0.0
Name: 186, dtype: object not available
temp            510
perturbation      8
force           0.1
Name: 187, dtype: object not available
temp            510
perturbation      8
force           0.2
Name: 188, dtype: object not available
temp            520
perturbation      0
force           0.0
Name: 189, dtype: object not available
temp            520
perturbation      0
force           0.1
Name: 190, dtype: object not available
temp            520
perturbation      0
force           0.2
Name: 191, dtype: object not available
temp            520
perturbation      1
force           0.0
Name: 192, dtype: object not available
temp            520
perturbation      1
force           0.1
Name: 193, dtype: object not available
temp            520
perturbation      1
force           0.2
Name: 194, dtype: object not available
temp            520
perturbation      2
force           0.0
Name: 195, dtype: object not available
temp            520
perturbation      2
force           0.1
Name: 196, dtype: object not available
temp            520
perturbation      2
force           0.2
Name: 197, dtype: object not available
temp            520
perturbation      3
force           0.0
Name: 198, dtype: object not available
temp            520
perturbation      3
force           0.1
Name: 199, dtype: object not available
temp            520
perturbation      3
force           0.2
Name: 200, dtype: object not available
temp            520
perturbation      4
force           0.0
Name: 201, dtype: object not available
temp            520
perturbation      4
force           0.1
Name: 202, dtype: object not available
temp            520
perturbation      4
force           0.2
Name: 203, dtype: object not available
temp            520
perturbation      5
force           0.0
Name: 204, dtype: object not available
temp            520
perturbation      5
force           0.1
Name: 205, dtype: object not available
temp            520
perturbation      5
force           0.2
Name: 206, dtype: object not available
temp            520
perturbation      6
force           0.0
Name: 207, dtype: object not available
temp            520
perturbation      6
force           0.1
Name: 208, dtype: object not available
temp            520
perturbation      6
force           0.2
Name: 209, dtype: object not available
temp            520
perturbation      7
force           0.0
Name: 210, dtype: object not available
temp            520
perturbation      7
force           0.1
Name: 211, dtype: object not available
temp            520
perturbation      7
force           0.2
Name: 212, dtype: object not available
temp            520
perturbation      8
force           0.0
Name: 213, dtype: object not available
temp            520
perturbation      8
force           0.1
Name: 214, dtype: object not available
temp            520
perturbation      8
force           0.2
Name: 215, dtype: object not available
temp            530
perturbation      0
force           0.0
Name: 216, dtype: object not available
temp            530
perturbation      0
force           0.1
Name: 217, dtype: object not available
temp            530
perturbation      0
force           0.2
Name: 218, dtype: object not available
temp            530
perturbation      1
force           0.0
Name: 219, dtype: object not available
temp            530
perturbation      1
force           0.1
Name: 220, dtype: object not available
temp            530
perturbation      1
force           0.2
Name: 221, dtype: object not available
temp            530
perturbation      2
force           0.0
Name: 222, dtype: object not available
temp            530
perturbation      2
force           0.1
Name: 223, dtype: object not available
temp            530
perturbation      2
force           0.2
Name: 224, dtype: object not available
temp            530
perturbation      3
force           0.0
Name: 225, dtype: object not available
temp            530
perturbation      3
force           0.1
Name: 226, dtype: object not available
temp            530
perturbation      3
force           0.2
Name: 227, dtype: object not available
temp            530
perturbation      4
force           0.0
Name: 228, dtype: object not available
temp            530
perturbation      4
force           0.1
Name: 229, dtype: object not available
temp            530
perturbation      4
force           0.2
Name: 230, dtype: object not available
temp            530
perturbation      5
force           0.0
Name: 231, dtype: object not available
temp            530
perturbation      5
force           0.1
Name: 232, dtype: object not available
temp            530
perturbation      5
force           0.2
Name: 233, dtype: object not available
temp            530
perturbation      6
force           0.0
Name: 234, dtype: object not available
temp            530
perturbation      6
force           0.1
Name: 235, dtype: object not available
temp            530
perturbation      6
force           0.2
Name: 236, dtype: object not available
temp            530
perturbation      7
force           0.0
Name: 237, dtype: object not available
temp            530
perturbation      7
force           0.1
Name: 238, dtype: object not available
temp            530
perturbation      7
force           0.2
Name: 239, dtype: object not available
temp            530
perturbation      8
force           0.0
Name: 240, dtype: object not available
temp            530
perturbation      8
force           0.1
Name: 241, dtype: object not available
temp            530
perturbation      8
force           0.2
Name: 242, dtype: object not available
temp            540
perturbation      0
force           0.0
Name: 243, dtype: object not available
temp            540
perturbation      0
force           0.1
Name: 244, dtype: object not available
temp            540
perturbation      0
force           0.2
Name: 245, dtype: object not available
temp            540
perturbation      1
force           0.0
Name: 246, dtype: object not available
temp            540
perturbation      1
force           0.1
Name: 247, dtype: object not available
temp            540
perturbation      1
force           0.2
Name: 248, dtype: object not available
temp            540
perturbation      2
force           0.0
Name: 249, dtype: object not available
temp            540
perturbation      2
force           0.1
Name: 250, dtype: object not available
temp            540
perturbation      2
force           0.2
Name: 251, dtype: object not available
temp            540
perturbation      3
force           0.0
Name: 252, dtype: object not available
temp            540
perturbation      3
force           0.1
Name: 253, dtype: object not available
temp            540
perturbation      3
force           0.2
Name: 254, dtype: object not available
temp            540
perturbation      4
force           0.0
Name: 255, dtype: object not available
temp            540
perturbation      4
force           0.1
Name: 256, dtype: object not available
temp            540
perturbation      4
force           0.2
Name: 257, dtype: object not available
temp            540
perturbation      5
force           0.0
Name: 258, dtype: object not available
temp            540
perturbation      5
force           0.1
Name: 259, dtype: object not available
temp            540
perturbation      5
force           0.2
Name: 260, dtype: object not available
temp            540
perturbation      6
force           0.0
Name: 261, dtype: object not available
temp            540
perturbation      6
force           0.1
Name: 262, dtype: object not available
temp            540
perturbation      6
force           0.2
Name: 263, dtype: object not available
temp            540
perturbation      7
force           0.0
Name: 264, dtype: object not available
temp            540
perturbation      7
force           0.1
Name: 265, dtype: object not available
temp            540
perturbation      7
force           0.2
Name: 266, dtype: object not available
temp            540
perturbation      8
force           0.0
Name: 267, dtype: object not available
temp            540
perturbation      8
force           0.1
Name: 268, dtype: object not available
temp            540
perturbation      8
force           0.2
Name: 269, dtype: object not available
temp            550
perturbation      0
force           0.0
Name: 270, dtype: object not available
temp            550
perturbation      0
force           0.1
Name: 271, dtype: object not available
temp            550
perturbation      0
force           0.2
Name: 272, dtype: object not available
temp            550
perturbation      1
force           0.0
Name: 273, dtype: object not available
temp            550
perturbation      1
force           0.1
Name: 274, dtype: object not available
temp            550
perturbation      1
force           0.2
Name: 275, dtype: object not available
temp            550
perturbation      2
force           0.0
Name: 276, dtype: object not available
temp            550
perturbation      2
force           0.1
Name: 277, dtype: object not available
temp            550
perturbation      2
force           0.2
Name: 278, dtype: object not available
temp            550
perturbation      3
force           0.0
Name: 279, dtype: object not available
temp            550
perturbation      3
force           0.1
Name: 280, dtype: object not available
temp            550
perturbation      3
force           0.2
Name: 281, dtype: object not available
temp            550
perturbation      4
force           0.0
Name: 282, dtype: object not available
temp            550
perturbation      4
force           0.1
Name: 283, dtype: object not available
temp            550
perturbation      4
force           0.2
Name: 284, dtype: object not available
temp            550
perturbation      5
force           0.0
Name: 285, dtype: object not available
temp            550
perturbation      5
force           0.1
Name: 286, dtype: object not available
temp            550
perturbation      5
force           0.2
Name: 287, dtype: object not available
temp            550
perturbation      6
force           0.0
Name: 288, dtype: object not available
temp            550
perturbation      6
force           0.1
Name: 289, dtype: object not available
temp            550
perturbation      6
force           0.2
Name: 290, dtype: object not available
temp            550
perturbation      7
force           0.0
Name: 291, dtype: object not available
temp            550
perturbation      7
force           0.1
Name: 292, dtype: object not available
temp            550
perturbation      7
force           0.2
Name: 293, dtype: object not available
temp            550
perturbation      8
force           0.0
Name: 294, dtype: object not available
temp            550
perturbation      8
force           0.1
Name: 295, dtype: object not available
temp            550
perturbation      8
force           0.2
Name: 296, dtype: object not available
temp            560
perturbation      0
force           0.0
Name: 297, dtype: object not available
temp            560
perturbation      0
force           0.1
Name: 298, dtype: object not available
temp            560
perturbation      0
force           0.2
Name: 299, dtype: object not available
temp            560
perturbation      1
force           0.0
Name: 300, dtype: object not available
temp            560
perturbation      1
force           0.1
Name: 301, dtype: object not available
temp            560
perturbation      1
force           0.2
Name: 302, dtype: object not available
temp            560
perturbation      2
force           0.0
Name: 303, dtype: object not available
temp            560
perturbation      2
force           0.1
Name: 304, dtype: object not available
temp            560
perturbation      2
force           0.2
Name: 305, dtype: object not available
temp            560
perturbation      3
force           0.0
Name: 306, dtype: object not available
temp            560
perturbation      3
force           0.1
Name: 307, dtype: object not available
temp            560
perturbation      3
force           0.2
Name: 308, dtype: object not available
temp            560
perturbation      4
force           0.0
Name: 309, dtype: object not available
temp            560
perturbation      4
force           0.1
Name: 310, dtype: object not available
temp            560
perturbation      4
force           0.2
Name: 311, dtype: object not available
temp            560
perturbation      5
force           0.0
Name: 312, dtype: object not available
temp            560
perturbation      5
force           0.1
Name: 313, dtype: object not available
temp            560
perturbation      5
force           0.2
Name: 314, dtype: object not available
temp            560
perturbation      6
force           0.0
Name: 315, dtype: object not available
temp            560
perturbation      6
force           0.1
Name: 316, dtype: object not available
temp            560
perturbation      6
force           0.2
Name: 317, dtype: object not available
temp            560
perturbation      7
force           0.0
Name: 318, dtype: object not available
temp            560
perturbation      7
force           0.1
Name: 319, dtype: object not available
temp            560
perturbation      7
force           0.2
Name: 320, dtype: object not available
temp            560
perturbation      8
force           0.0
Name: 321, dtype: object not available
temp            560
perturbation      8
force           0.1
Name: 322, dtype: object not available
temp            560
perturbation      8
force           0.2
Name: 323, dtype: object not available
temp            570
perturbation      0
force           0.0
Name: 324, dtype: object not available
temp            570
perturbation      0
force           0.1
Name: 325, dtype: object not available
temp            570
perturbation      0
force           0.2
Name: 326, dtype: object not available
temp            570
perturbation      1
force           0.0
Name: 327, dtype: object not available
temp            570
perturbation      1
force           0.1
Name: 328, dtype: object not available
temp            570
perturbation      1
force           0.2
Name: 329, dtype: object not available
temp            570
perturbation      2
force           0.0
Name: 330, dtype: object not available
temp            570
perturbation      2
force           0.1
Name: 331, dtype: object not available
temp            570
perturbation      2
force           0.2
Name: 332, dtype: object not available
temp            570
perturbation      3
force           0.0
Name: 333, dtype: object not available
temp            570
perturbation      3
force           0.1
Name: 334, dtype: object not available
temp            570
perturbation      3
force           0.2
Name: 335, dtype: object not available
temp            570
perturbation      4
force           0.0
Name: 336, dtype: object not available
temp            570
perturbation      4
force           0.1
Name: 337, dtype: object not available
temp            570
perturbation      4
force           0.2
Name: 338, dtype: object not available
temp            570
perturbation      5
force           0.0
Name: 339, dtype: object not available
temp            570
perturbation      5
force           0.1
Name: 340, dtype: object not available
temp            570
perturbation      5
force           0.2
Name: 341, dtype: object not available
temp            570
perturbation      6
force           0.0
Name: 342, dtype: object not available
temp            570
perturbation      6
force           0.1
Name: 343, dtype: object not available
temp            570
perturbation      6
force           0.2
Name: 344, dtype: object not available
temp            570
perturbation      7
force           0.0
Name: 345, dtype: object not available
temp            570
perturbation      7
force           0.1
Name: 346, dtype: object not available
temp            570
perturbation      7
force           0.2
Name: 347, dtype: object not available
temp            570
perturbation      8
force           0.0
Name: 348, dtype: object not available
temp            570
perturbation      8
force           0.1
Name: 349, dtype: object not available
temp            570
perturbation      8
force           0.2
Name: 350, dtype: object not available
temp            580
perturbation      0
force           0.0
Name: 351, dtype: object not available
temp            580
perturbation      0
force           0.1
Name: 352, dtype: object not available
temp            580
perturbation      0
force           0.2
Name: 353, dtype: object not available
temp            580
perturbation      1
force           0.0
Name: 354, dtype: object not available
temp            580
perturbation      1
force           0.1
Name: 355, dtype: object not available
temp            580
perturbation      1
force           0.2
Name: 356, dtype: object not available
temp            580
perturbation      2
force           0.0
Name: 357, dtype: object not available
temp            580
perturbation      2
force           0.1
Name: 358, dtype: object not available
temp            580
perturbation      2
force           0.2
Name: 359, dtype: object not available
temp            580
perturbation      3
force           0.0
Name: 360, dtype: object not available
temp            580
perturbation      3
force           0.1
Name: 361, dtype: object not available
temp            580
perturbation      3
force           0.2
Name: 362, dtype: object not available
temp            580
perturbation      4
force           0.0
Name: 363, dtype: object not available
temp            580
perturbation      4
force           0.1
Name: 364, dtype: object not available
temp            580
perturbation      4
force           0.2
Name: 365, dtype: object not available
temp            580
perturbation      5
force           0.0
Name: 366, dtype: object not available
temp            580
perturbation      5
force           0.1
Name: 367, dtype: object not available
temp            580
perturbation      5
force           0.2
Name: 368, dtype: object not available
temp            580
perturbation      6
force           0.0
Name: 369, dtype: object not available
temp            580
perturbation      6
force           0.1
Name: 370, dtype: object not available
temp            580
perturbation      6
force           0.2
Name: 371, dtype: object not available
temp            580
perturbation      7
force           0.0
Name: 372, dtype: object not available
temp            580
perturbation      7
force           0.1
Name: 373, dtype: object not available
temp            580
perturbation      7
force           0.2
Name: 374, dtype: object not available
temp            580
perturbation      8
force           0.0
Name: 375, dtype: object not available
temp            580
perturbation      8
force           0.1
Name: 376, dtype: object not available
temp            580
perturbation      8
force           0.2
Name: 377, dtype: object not available
temp            590
perturbation      0
force           0.0
Name: 378, dtype: object not available
temp            590
perturbation      0
force           0.1
Name: 379, dtype: object not available
temp            590
perturbation      0
force           0.2
Name: 380, dtype: object not available
temp            590
perturbation      1
force           0.0
Name: 381, dtype: object not available
temp            590
perturbation      1
force           0.1
Name: 382, dtype: object not available
temp            590
perturbation      1
force           0.2
Name: 383, dtype: object not available
temp            590
perturbation      2
force           0.0
Name: 384, dtype: object not available
temp            590
perturbation      2
force           0.1
Name: 385, dtype: object not available
temp            590
perturbation      2
force           0.2
Name: 386, dtype: object not available
temp            590
perturbation      3
force           0.0
Name: 387, dtype: object not available
temp            590
perturbation      3
force           0.1
Name: 388, dtype: object not available
temp            590
perturbation      3
force           0.2
Name: 389, dtype: object not available
temp            590
perturbation      4
force           0.0
Name: 390, dtype: object not available
temp            590
perturbation      4
force           0.1
Name: 391, dtype: object not available
temp            590
perturbation      4
force           0.2
Name: 392, dtype: object not available
temp            590
perturbation      5
force           0.0
Name: 393, dtype: object not available
temp            590
perturbation      5
force           0.1
Name: 394, dtype: object not available
temp            590
perturbation      5
force           0.2
Name: 395, dtype: object not available
temp            590
perturbation      6
force           0.0
Name: 396, dtype: object not available
temp            590
perturbation      6
force           0.1
Name: 397, dtype: object not available
temp            590
perturbation      6
force           0.2
Name: 398, dtype: object not available
temp            590
perturbation      7
force           0.0
Name: 399, dtype: object not available
temp            590
perturbation      7
force           0.1
Name: 400, dtype: object not available
temp            590
perturbation      7
force           0.2
Name: 401, dtype: object not available
temp            590
perturbation      8
force           0.0
Name: 402, dtype: object not available
temp            590
perturbation      8
force           0.1
Name: 403, dtype: object not available
temp            590
perturbation      8
force           0.2
Name: 404, dtype: object not available
temp            600
perturbation      0
force           0.0
Name: 405, dtype: object not available
temp            600
perturbation      0
force           0.1
Name: 406, dtype: object not available
temp            600
perturbation      0
force           0.2
Name: 407, dtype: object not available
temp            600
perturbation      1
force           0.0
Name: 408, dtype: object not available
temp            600
perturbation      1
force           0.1
Name: 409, dtype: object not available
temp            600
perturbation      1
force           0.2
Name: 410, dtype: object not available
temp            600
perturbation      2
force           0.0
Name: 411, dtype: object not available
temp            600
perturbation      2
force           0.1
Name: 412, dtype: object not available
temp            600
perturbation      2
force           0.2
Name: 413, dtype: object not available
temp            600
perturbation      3
force           0.0
Name: 414, dtype: object not available
temp            600
perturbation      3
force           0.1
Name: 415, dtype: object not available
temp            600
perturbation      3
force           0.2
Name: 416, dtype: object not available
temp            600
perturbation      4
force           0.0
Name: 417, dtype: object not available
temp            600
perturbation      4
force           0.1
Name: 418, dtype: object not available
temp            600
perturbation      4
force           0.2
Name: 419, dtype: object not available
temp            600
perturbation      5
force           0.0
Name: 420, dtype: object not available
temp            600
perturbation      5
force           0.1
Name: 421, dtype: object not available
temp            600
perturbation      5
force           0.2
Name: 422, dtype: object not available
temp            600
perturbation      6
force           0.0
Name: 423, dtype: object not available
temp            600
perturbation      6
force           0.1
Name: 424, dtype: object not available
temp            600
perturbation      6
force           0.2
Name: 425, dtype: object not available
temp            600
perturbation      7
force           0.0
Name: 426, dtype: object not available
temp            600
perturbation      7
force           0.1
Name: 427, dtype: object not available
temp            600
perturbation      7
force           0.2
Name: 428, dtype: object not available
temp            600
perturbation      8
force           0.0
Name: 429, dtype: object not available
temp            600
perturbation      8
force           0.1
Name: 430, dtype: object not available
temp            600
perturbation      8
force           0.2
Name: 431, dtype: object not available

In [25]:
# pre = "/Users/weilu/Research/davinci/all_freeEnergy_calculation/rgWidth_memb_3_rg_0.1_lipid_1_extended/1d_dis/"
pre = "/Users/weilu/Research/davinci/all_freeEnergy_calculation_nov11/next_gen_native_based_memb_3_rg_0.4_lipid_0.6_extended/1d_qw"
perturbation_table = {0:"original", 1:"p_mem", 2:"m_mem", 3:"p_lipid", 4:"m_lipid", 5:"p_go", 6:"m_go", 7:"p_rg", 8:"m_rg"}
pmf_list = {
    "temp":[*range(450, 610, 10)],
    "perturbation":list(perturbation_table.keys()),
    "force":["0.0", "0.1", "0.2"]
}
data = readPMF(pmf_list, pre)
remove_columns = ['bin']
data = data.drop(remove_columns, axis=1)
data.to_feather("/Users/weilu/Research/data/pulling/nov12_pmf_qw.feather")

In [3]:
# pre = "/Users/weilu/Research/davinci/all_freeEnergy_calculation/rgWidth_memb_3_rg_0.1_lipid_1_extended/1d_dis/"
pre = "/Users/weilu/Research/davinci/all_freeEnergy_calculation_nov11/next_gen_native_based_memb_3_rg_0.4_lipid_0.6_extended/1d_dis"
perturbation_table = {0:"original", 1:"p_mem", 2:"m_mem", 3:"p_lipid", 4:"m_lipid", 5:"p_go", 6:"m_go", 7:"p_rg", 8:"m_rg"}
pmf_list = {
    "temp":[*range(450, 610, 10)],
    "perturbation":list(perturbation_table.keys()),
    "force":["0.0", "0.1", "0.2"]
}
data = readPMF(pmf_list, pre)
remove_columns = ['bin']
data = data.drop(remove_columns, axis=1)
data.to_feather("/Users/weilu/Research/data/pulling/nov12_pmf.feather")


temp            450
perturbation      7
force           0.0
Name: 21, dtype: object not available
temp            450
perturbation      7
force           0.1
Name: 22, dtype: object not available
temp            450
perturbation      7
force           0.2
Name: 23, dtype: object not available
temp            450
perturbation      8
force           0.0
Name: 24, dtype: object not available
temp            450
perturbation      8
force           0.1
Name: 25, dtype: object not available
temp            450
perturbation      8
force           0.2
Name: 26, dtype: object not available
temp            460
perturbation      7
force           0.0
Name: 48, dtype: object not available
temp            460
perturbation      7
force           0.1
Name: 49, dtype: object not available
temp            460
perturbation      7
force           0.2
Name: 50, dtype: object not available
temp            460
perturbation      8
force           0.0
Name: 51, dtype: object not available
temp            460
perturbation      8
force           0.1
Name: 52, dtype: object not available
temp            460
perturbation      8
force           0.2
Name: 53, dtype: object not available
temp            470
perturbation      7
force           0.0
Name: 75, dtype: object not available
temp            470
perturbation      7
force           0.1
Name: 76, dtype: object not available
temp            470
perturbation      7
force           0.2
Name: 77, dtype: object not available
temp            470
perturbation      8
force           0.0
Name: 78, dtype: object not available
temp            470
perturbation      8
force           0.1
Name: 79, dtype: object not available
temp            470
perturbation      8
force           0.2
Name: 80, dtype: object not available
temp            480
perturbation      7
force           0.0
Name: 102, dtype: object not available
temp            480
perturbation      7
force           0.1
Name: 103, dtype: object not available
temp            480
perturbation      7
force           0.2
Name: 104, dtype: object not available
temp            480
perturbation      8
force           0.0
Name: 105, dtype: object not available
temp            480
perturbation      8
force           0.1
Name: 106, dtype: object not available
temp            480
perturbation      8
force           0.2
Name: 107, dtype: object not available
temp            490
perturbation      7
force           0.0
Name: 129, dtype: object not available
temp            490
perturbation      7
force           0.1
Name: 130, dtype: object not available
temp            490
perturbation      7
force           0.2
Name: 131, dtype: object not available
temp            490
perturbation      8
force           0.0
Name: 132, dtype: object not available
temp            490
perturbation      8
force           0.1
Name: 133, dtype: object not available
temp            490
perturbation      8
force           0.2
Name: 134, dtype: object not available
temp            500
perturbation      7
force           0.0
Name: 156, dtype: object not available
temp            500
perturbation      7
force           0.1
Name: 157, dtype: object not available
temp            500
perturbation      7
force           0.2
Name: 158, dtype: object not available
temp            500
perturbation      8
force           0.0
Name: 159, dtype: object not available
temp            500
perturbation      8
force           0.1
Name: 160, dtype: object not available
temp            500
perturbation      8
force           0.2
Name: 161, dtype: object not available
temp            510
perturbation      6
force           0.1
Name: 181, dtype: object not available
temp            510
perturbation      7
force           0.0
Name: 183, dtype: object not available
temp            510
perturbation      7
force           0.1
Name: 184, dtype: object not available
temp            510
perturbation      7
force           0.2
Name: 185, dtype: object not available
temp            510
perturbation      8
force           0.0
Name: 186, dtype: object not available
temp            510
perturbation      8
force           0.1
Name: 187, dtype: object not available
temp            510
perturbation      8
force           0.2
Name: 188, dtype: object not available
temp            520
perturbation      6
force           0.0
Name: 207, dtype: object not available
temp            520
perturbation      6
force           0.1
Name: 208, dtype: object not available
temp            520
perturbation      6
force           0.2
Name: 209, dtype: object not available
temp            520
perturbation      7
force           0.0
Name: 210, dtype: object not available
temp            520
perturbation      7
force           0.1
Name: 211, dtype: object not available
temp            520
perturbation      7
force           0.2
Name: 212, dtype: object not available
temp            520
perturbation      8
force           0.0
Name: 213, dtype: object not available
temp            520
perturbation      8
force           0.1
Name: 214, dtype: object not available
temp            520
perturbation      8
force           0.2
Name: 215, dtype: object not available
temp            530
perturbation      6
force           0.0
Name: 234, dtype: object not available
temp            530
perturbation      6
force           0.1
Name: 235, dtype: object not available
temp            530
perturbation      6
force           0.2
Name: 236, dtype: object not available
temp            530
perturbation      7
force           0.0
Name: 237, dtype: object not available
temp            530
perturbation      7
force           0.1
Name: 238, dtype: object not available
temp            530
perturbation      7
force           0.2
Name: 239, dtype: object not available
temp            530
perturbation      8
force           0.0
Name: 240, dtype: object not available
temp            530
perturbation      8
force           0.1
Name: 241, dtype: object not available
temp            530
perturbation      8
force           0.2
Name: 242, dtype: object not available
temp            540
perturbation      6
force           0.0
Name: 261, dtype: object not available
temp            540
perturbation      6
force           0.1
Name: 262, dtype: object not available
temp            540
perturbation      6
force           0.2
Name: 263, dtype: object not available
temp            540
perturbation      7
force           0.0
Name: 264, dtype: object not available
temp            540
perturbation      7
force           0.1
Name: 265, dtype: object not available
temp            540
perturbation      7
force           0.2
Name: 266, dtype: object not available
temp            540
perturbation      8
force           0.0
Name: 267, dtype: object not available
temp            540
perturbation      8
force           0.1
Name: 268, dtype: object not available
temp            540
perturbation      8
force           0.2
Name: 269, dtype: object not available
temp            550
perturbation      6
force           0.0
Name: 288, dtype: object not available
temp            550
perturbation      6
force           0.1
Name: 289, dtype: object not available
temp            550
perturbation      6
force           0.2
Name: 290, dtype: object not available
temp            550
perturbation      7
force           0.0
Name: 291, dtype: object not available
temp            550
perturbation      7
force           0.1
Name: 292, dtype: object not available
temp            550
perturbation      7
force           0.2
Name: 293, dtype: object not available
temp            550
perturbation      8
force           0.0
Name: 294, dtype: object not available
temp            550
perturbation      8
force           0.1
Name: 295, dtype: object not available
temp            550
perturbation      8
force           0.2
Name: 296, dtype: object not available
temp            560
perturbation      6
force           0.0
Name: 315, dtype: object not available
temp            560
perturbation      6
force           0.1
Name: 316, dtype: object not available
temp            560
perturbation      6
force           0.2
Name: 317, dtype: object not available
temp            560
perturbation      7
force           0.0
Name: 318, dtype: object not available
temp            560
perturbation      7
force           0.1
Name: 319, dtype: object not available
temp            560
perturbation      7
force           0.2
Name: 320, dtype: object not available
temp            560
perturbation      8
force           0.0
Name: 321, dtype: object not available
temp            560
perturbation      8
force           0.1
Name: 322, dtype: object not available
temp            560
perturbation      8
force           0.2
Name: 323, dtype: object not available
temp            570
perturbation      6
force           0.0
Name: 342, dtype: object not available
temp            570
perturbation      6
force           0.1
Name: 343, dtype: object not available
temp            570
perturbation      6
force           0.2
Name: 344, dtype: object not available
temp            570
perturbation      7
force           0.0
Name: 345, dtype: object not available
temp            570
perturbation      7
force           0.1
Name: 346, dtype: object not available
temp            570
perturbation      7
force           0.2
Name: 347, dtype: object not available
temp            570
perturbation      8
force           0.0
Name: 348, dtype: object not available
temp            570
perturbation      8
force           0.1
Name: 349, dtype: object not available
temp            570
perturbation      8
force           0.2
Name: 350, dtype: object not available
temp            580
perturbation      6
force           0.0
Name: 369, dtype: object not available
temp            580
perturbation      6
force           0.1
Name: 370, dtype: object not available
temp            580
perturbation      6
force           0.2
Name: 371, dtype: object not available
temp            580
perturbation      7
force           0.0
Name: 372, dtype: object not available
temp            580
perturbation      7
force           0.1
Name: 373, dtype: object not available
temp            580
perturbation      7
force           0.2
Name: 374, dtype: object not available
temp            580
perturbation      8
force           0.0
Name: 375, dtype: object not available
temp            580
perturbation      8
force           0.1
Name: 376, dtype: object not available
temp            580
perturbation      8
force           0.2
Name: 377, dtype: object not available
temp            590
perturbation      6
force           0.0
Name: 396, dtype: object not available
temp            590
perturbation      6
force           0.1
Name: 397, dtype: object not available
temp            590
perturbation      6
force           0.2
Name: 398, dtype: object not available
temp            590
perturbation      7
force           0.0
Name: 399, dtype: object not available
temp            590
perturbation      7
force           0.1
Name: 400, dtype: object not available
temp            590
perturbation      7
force           0.2
Name: 401, dtype: object not available
temp            590
perturbation      8
force           0.0
Name: 402, dtype: object not available
temp            590
perturbation      8
force           0.1
Name: 403, dtype: object not available
temp            590
perturbation      8
force           0.2
Name: 404, dtype: object not available
temp            600
perturbation      6
force           0.0
Name: 423, dtype: object not available
temp            600
perturbation      6
force           0.1
Name: 424, dtype: object not available
temp            600
perturbation      6
force           0.2
Name: 425, dtype: object not available
temp            600
perturbation      7
force           0.0
Name: 426, dtype: object not available
temp            600
perturbation      7
force           0.1
Name: 427, dtype: object not available
temp            600
perturbation      7
force           0.2
Name: 428, dtype: object not available
temp            600
perturbation      8
force           0.0
Name: 429, dtype: object not available
temp            600
perturbation      8
force           0.1
Name: 430, dtype: object not available
temp            600
perturbation      8
force           0.2
Name: 431, dtype: object not available

In [75]:
# pre = "/Users/weilu/Research/davinci/all_freeEnergy_calculation/rgWidth_memb_3_rg_0.1_lipid_1_extended/1d_dis/"
pre = "/Users/weilu/Research/davinci/all_freeEnergy_calculation_nov11/next_gen_native_based_memb_3_rg_0.2_lipid_0.6_extended/1d_dis"
perturbation_table = {0:"original", 1:"p_mem", 2:"m_mem", 3:"p_lipid", 4:"m_lipid", 5:"p_go", 6:"m_go", 7:"p_rg", 8:"m_rg"}
pmf_list = {
    "temp":[*range(450, 610, 10)],
    "perturbation":list(perturbation_table.keys()),
    "force":["0.0", "0.1", "0.2"]
}
data = readPMF(pmf_list, pre)

In [71]:
# pre = "/Users/weilu/Research/davinci/all_freeEnergy_calculation/rgWidth_memb_3_rg_0.1_lipid_1_extended/1d_dis/"
pre = "/Users/weilu/Research/davinci/all_freeEnergy_calculation_nov11_2/next_gen_native_based_memb_3_rg_0.2_lipid_0.6_extended/1d_dis"
perturbation_table = {0:"original", 1:"p_mem", 2:"m_mem", 3:"p_lipid", 4:"m_lipid", 5:"p_go", 6:"m_go", 7:"p_rg", 8:"m_rg"}
pmf_list = {
    "temp":[*range(450, 600, 50)],
    "perturbation":list(perturbation_table.keys()),
    "force":["0.0", "0.1", "0.2"]
}
data = readPMF(pmf_list, pre)


temp            450
perturbation      3
force           0.0
Name: 9, dtype: object not available
temp            450
perturbation      3
force           0.1
Name: 10, dtype: object not available
temp            450
perturbation      3
force           0.2
Name: 11, dtype: object not available
temp            450
perturbation      4
force           0.0
Name: 12, dtype: object not available
temp            450
perturbation      4
force           0.1
Name: 13, dtype: object not available
temp            450
perturbation      4
force           0.2
Name: 14, dtype: object not available
temp            450
perturbation      5
force           0.0
Name: 15, dtype: object not available
temp            450
perturbation      5
force           0.1
Name: 16, dtype: object not available
temp            450
perturbation      5
force           0.2
Name: 17, dtype: object not available
temp            450
perturbation      6
force           0.0
Name: 18, dtype: object not available
temp            450
perturbation      6
force           0.1
Name: 19, dtype: object not available
temp            450
perturbation      6
force           0.2
Name: 20, dtype: object not available
temp            450
perturbation      7
force           0.0
Name: 21, dtype: object not available
temp            450
perturbation      7
force           0.1
Name: 22, dtype: object not available
temp            450
perturbation      7
force           0.2
Name: 23, dtype: object not available
temp            450
perturbation      8
force           0.0
Name: 24, dtype: object not available
temp            450
perturbation      8
force           0.1
Name: 25, dtype: object not available
temp            450
perturbation      8
force           0.2
Name: 26, dtype: object not available
temp            500
perturbation      3
force           0.0
Name: 36, dtype: object not available
temp            500
perturbation      3
force           0.1
Name: 37, dtype: object not available
temp            500
perturbation      3
force           0.2
Name: 38, dtype: object not available
temp            500
perturbation      4
force           0.0
Name: 39, dtype: object not available
temp            500
perturbation      4
force           0.1
Name: 40, dtype: object not available
temp            500
perturbation      4
force           0.2
Name: 41, dtype: object not available
temp            500
perturbation      5
force           0.0
Name: 42, dtype: object not available
temp            500
perturbation      5
force           0.1
Name: 43, dtype: object not available
temp            500
perturbation      5
force           0.2
Name: 44, dtype: object not available
temp            500
perturbation      6
force           0.0
Name: 45, dtype: object not available
temp            500
perturbation      6
force           0.1
Name: 46, dtype: object not available
temp            500
perturbation      6
force           0.2
Name: 47, dtype: object not available
temp            500
perturbation      7
force           0.0
Name: 48, dtype: object not available
temp            500
perturbation      7
force           0.1
Name: 49, dtype: object not available
temp            500
perturbation      7
force           0.2
Name: 50, dtype: object not available
temp            500
perturbation      8
force           0.0
Name: 51, dtype: object not available
temp            500
perturbation      8
force           0.1
Name: 52, dtype: object not available
temp            500
perturbation      8
force           0.2
Name: 53, dtype: object not available
temp            550
perturbation      3
force           0.0
Name: 63, dtype: object not available
temp            550
perturbation      3
force           0.1
Name: 64, dtype: object not available
temp            550
perturbation      3
force           0.2
Name: 65, dtype: object not available
temp            550
perturbation      4
force           0.0
Name: 66, dtype: object not available
temp            550
perturbation      4
force           0.1
Name: 67, dtype: object not available
temp            550
perturbation      4
force           0.2
Name: 68, dtype: object not available
temp            550
perturbation      5
force           0.0
Name: 69, dtype: object not available
temp            550
perturbation      5
force           0.1
Name: 70, dtype: object not available
temp            550
perturbation      5
force           0.2
Name: 71, dtype: object not available
temp            550
perturbation      6
force           0.0
Name: 72, dtype: object not available
temp            550
perturbation      6
force           0.1
Name: 73, dtype: object not available
temp            550
perturbation      6
force           0.2
Name: 74, dtype: object not available
temp            550
perturbation      7
force           0.0
Name: 75, dtype: object not available
temp            550
perturbation      7
force           0.1
Name: 76, dtype: object not available
temp            550
perturbation      7
force           0.2
Name: 77, dtype: object not available
temp            550
perturbation      8
force           0.0
Name: 78, dtype: object not available
temp            550
perturbation      8
force           0.1
Name: 79, dtype: object not available
temp            550
perturbation      8
force           0.2
Name: 80, dtype: object not available

In [72]:
remove_columns = ['bin']
data = data.drop(remove_columns, axis=1)
data.to_feather("/Users/weilu/Research/data/pulling/nov11_pmf_3.feather")

In [76]:
remove_columns = ['bin']
data = data.drop(remove_columns, axis=1)
data.to_feather("/Users/weilu/Research/data/pulling/nov11_pmf.feather")

In [55]:
def expand_grid(dictionary):
    return pd.DataFrame([row for row in product(*dictionary.values())],
                        columns=dictionary.keys())
def read_subfolder_PMF(pmf_list_data, pre):
    pmf_list_data = expand_grid(pmf_list)
    all_pmf_list = []
    for index, row in pmf_list_data.iterrows():
    #     print(index)
    #     print("--")
    #     print(row)
        subfolder = row["subfolder"]
        if subfolder.split("_")[0] == "force":
            force = float(subfolder.split("_")[1])
        else:
            force = 0.0
        temp = row["temp"]
        perturbation = row["perturbation"]
        if perturbation == 0:
            location = pre + f"/{subfolder}/pmf-{temp}.dat"
            change = "none"
            upOrDown = "none"
        else:
            location = pre + f"/{subfolder}/perturbation-{perturbation}-pmf-{temp}.dat"
            change = perturbation_table[perturbation].split("_")[-1]
            upOrDown = perturbation_table[perturbation].split("_")[0]
    #     print(location)
        name_list = ["f", "df", "e", "s"]
        names = ["bin", "x"] + name_list
        try:
            data = pd.read_table(location, skiprows=2, sep='\s+', names=names).assign(upOrDown=upOrDown, change=change, force=force, temp=temp, perturbation=perturbation_table[perturbation])
            all_pmf_list.append(data)
        except:
            print(row, "not available")
    return pd.concat(all_pmf_list).dropna().reset_index()

In [66]:
# pre = "/Users/weilu/Research/davinci/all_freeEnergy_calculation/rgWidth_memb_3_rg_0.1_lipid_1_extended/1d_dis/"
pre = "/Users/weilu/Research/davinci/all_freeEnergy_calculation_nov11/next_gen_native_based_memb_3_rg_0.2_lipid_0.6_extended/test/"
perturbation_table = {0:"original", 1:"p_mem", 2:"m_mem", 3:"p_lipid", 4:"m_lipid", 5:"p_go", 6:"m_go", 7:"p_rg", 8:"m_rg"}
pmf_list = {
    "temp":[*range(400, 630, 50)],
    "perturbation":list(perturbation_table.keys()),
    "subfolder":["force_0.0", "force_0.1", "force_0.2"]
}
data = read_subfolder_PMF(pmf_list, pre)


temp                  400
perturbation            0
subfolder       force_0.0
Name: 0, dtype: object not available
temp                  400
perturbation            0
subfolder       force_0.1
Name: 1, dtype: object not available
temp                  400
perturbation            0
subfolder       force_0.2
Name: 2, dtype: object not available
temp                  400
perturbation            1
subfolder       force_0.0
Name: 3, dtype: object not available
temp                  400
perturbation            1
subfolder       force_0.1
Name: 4, dtype: object not available
temp                  400
perturbation            1
subfolder       force_0.2
Name: 5, dtype: object not available
temp                  400
perturbation            2
subfolder       force_0.0
Name: 6, dtype: object not available
temp                  400
perturbation            2
subfolder       force_0.1
Name: 7, dtype: object not available
temp                  400
perturbation            2
subfolder       force_0.2
Name: 8, dtype: object not available
temp                  400
perturbation            3
subfolder       force_0.0
Name: 9, dtype: object not available
temp                  400
perturbation            3
subfolder       force_0.1
Name: 10, dtype: object not available
temp                  400
perturbation            3
subfolder       force_0.2
Name: 11, dtype: object not available
temp                  400
perturbation            4
subfolder       force_0.0
Name: 12, dtype: object not available
temp                  400
perturbation            4
subfolder       force_0.1
Name: 13, dtype: object not available
temp                  400
perturbation            4
subfolder       force_0.2
Name: 14, dtype: object not available
temp                  400
perturbation            5
subfolder       force_0.0
Name: 15, dtype: object not available
temp                  400
perturbation            5
subfolder       force_0.1
Name: 16, dtype: object not available
temp                  400
perturbation            5
subfolder       force_0.2
Name: 17, dtype: object not available
temp                  400
perturbation            6
subfolder       force_0.0
Name: 18, dtype: object not available
temp                  400
perturbation            6
subfolder       force_0.1
Name: 19, dtype: object not available
temp                  400
perturbation            6
subfolder       force_0.2
Name: 20, dtype: object not available
temp                  400
perturbation            7
subfolder       force_0.0
Name: 21, dtype: object not available
temp                  400
perturbation            7
subfolder       force_0.1
Name: 22, dtype: object not available
temp                  400
perturbation            7
subfolder       force_0.2
Name: 23, dtype: object not available
temp                  400
perturbation            8
subfolder       force_0.0
Name: 24, dtype: object not available
temp                  400
perturbation            8
subfolder       force_0.1
Name: 25, dtype: object not available
temp                  400
perturbation            8
subfolder       force_0.2
Name: 26, dtype: object not available
temp                  450
perturbation            3
subfolder       force_0.0
Name: 36, dtype: object not available
temp                  450
perturbation            3
subfolder       force_0.1
Name: 37, dtype: object not available
temp                  450
perturbation            3
subfolder       force_0.2
Name: 38, dtype: object not available
temp                  450
perturbation            4
subfolder       force_0.0
Name: 39, dtype: object not available
temp                  450
perturbation            4
subfolder       force_0.1
Name: 40, dtype: object not available
temp                  450
perturbation            4
subfolder       force_0.2
Name: 41, dtype: object not available
temp                  450
perturbation            5
subfolder       force_0.0
Name: 42, dtype: object not available
temp                  450
perturbation            5
subfolder       force_0.1
Name: 43, dtype: object not available
temp                  450
perturbation            5
subfolder       force_0.2
Name: 44, dtype: object not available
temp                  450
perturbation            6
subfolder       force_0.0
Name: 45, dtype: object not available
temp                  450
perturbation            6
subfolder       force_0.1
Name: 46, dtype: object not available
temp                  450
perturbation            6
subfolder       force_0.2
Name: 47, dtype: object not available
temp                  450
perturbation            7
subfolder       force_0.0
Name: 48, dtype: object not available
temp                  450
perturbation            7
subfolder       force_0.1
Name: 49, dtype: object not available
temp                  450
perturbation            7
subfolder       force_0.2
Name: 50, dtype: object not available
temp                  450
perturbation            8
subfolder       force_0.0
Name: 51, dtype: object not available
temp                  450
perturbation            8
subfolder       force_0.1
Name: 52, dtype: object not available
temp                  450
perturbation            8
subfolder       force_0.2
Name: 53, dtype: object not available
temp                  500
perturbation            3
subfolder       force_0.0
Name: 63, dtype: object not available
temp                  500
perturbation            3
subfolder       force_0.1
Name: 64, dtype: object not available
temp                  500
perturbation            3
subfolder       force_0.2
Name: 65, dtype: object not available
temp                  500
perturbation            4
subfolder       force_0.0
Name: 66, dtype: object not available
temp                  500
perturbation            4
subfolder       force_0.1
Name: 67, dtype: object not available
temp                  500
perturbation            4
subfolder       force_0.2
Name: 68, dtype: object not available
temp                  500
perturbation            5
subfolder       force_0.0
Name: 69, dtype: object not available
temp                  500
perturbation            5
subfolder       force_0.1
Name: 70, dtype: object not available
temp                  500
perturbation            5
subfolder       force_0.2
Name: 71, dtype: object not available
temp                  500
perturbation            6
subfolder       force_0.0
Name: 72, dtype: object not available
temp                  500
perturbation            6
subfolder       force_0.1
Name: 73, dtype: object not available
temp                  500
perturbation            6
subfolder       force_0.2
Name: 74, dtype: object not available
temp                  500
perturbation            7
subfolder       force_0.0
Name: 75, dtype: object not available
temp                  500
perturbation            7
subfolder       force_0.1
Name: 76, dtype: object not available
temp                  500
perturbation            7
subfolder       force_0.2
Name: 77, dtype: object not available
temp                  500
perturbation            8
subfolder       force_0.0
Name: 78, dtype: object not available
temp                  500
perturbation            8
subfolder       force_0.1
Name: 79, dtype: object not available
temp                  500
perturbation            8
subfolder       force_0.2
Name: 80, dtype: object not available
temp                  550
perturbation            3
subfolder       force_0.0
Name: 90, dtype: object not available
temp                  550
perturbation            3
subfolder       force_0.1
Name: 91, dtype: object not available
temp                  550
perturbation            3
subfolder       force_0.2
Name: 92, dtype: object not available
temp                  550
perturbation            4
subfolder       force_0.0
Name: 93, dtype: object not available
temp                  550
perturbation            4
subfolder       force_0.1
Name: 94, dtype: object not available
temp                  550
perturbation            4
subfolder       force_0.2
Name: 95, dtype: object not available
temp                  550
perturbation            5
subfolder       force_0.0
Name: 96, dtype: object not available
temp                  550
perturbation            5
subfolder       force_0.1
Name: 97, dtype: object not available
temp                  550
perturbation            5
subfolder       force_0.2
Name: 98, dtype: object not available
temp                  550
perturbation            6
subfolder       force_0.0
Name: 99, dtype: object not available
temp                  550
perturbation            6
subfolder       force_0.1
Name: 100, dtype: object not available
temp                  550
perturbation            6
subfolder       force_0.2
Name: 101, dtype: object not available
temp                  550
perturbation            7
subfolder       force_0.0
Name: 102, dtype: object not available
temp                  550
perturbation            7
subfolder       force_0.1
Name: 103, dtype: object not available
temp                  550
perturbation            7
subfolder       force_0.2
Name: 104, dtype: object not available
temp                  550
perturbation            8
subfolder       force_0.0
Name: 105, dtype: object not available
temp                  550
perturbation            8
subfolder       force_0.1
Name: 106, dtype: object not available
temp                  550
perturbation            8
subfolder       force_0.2
Name: 107, dtype: object not available
temp                  600
perturbation            0
subfolder       force_0.0
Name: 108, dtype: object not available
temp                  600
perturbation            0
subfolder       force_0.1
Name: 109, dtype: object not available
temp                  600
perturbation            0
subfolder       force_0.2
Name: 110, dtype: object not available
temp                  600
perturbation            1
subfolder       force_0.0
Name: 111, dtype: object not available
temp                  600
perturbation            1
subfolder       force_0.1
Name: 112, dtype: object not available
temp                  600
perturbation            1
subfolder       force_0.2
Name: 113, dtype: object not available
temp                  600
perturbation            2
subfolder       force_0.0
Name: 114, dtype: object not available
temp                  600
perturbation            2
subfolder       force_0.1
Name: 115, dtype: object not available
temp                  600
perturbation            2
subfolder       force_0.2
Name: 116, dtype: object not available
temp                  600
perturbation            3
subfolder       force_0.0
Name: 117, dtype: object not available
temp                  600
perturbation            3
subfolder       force_0.1
Name: 118, dtype: object not available
temp                  600
perturbation            3
subfolder       force_0.2
Name: 119, dtype: object not available
temp                  600
perturbation            4
subfolder       force_0.0
Name: 120, dtype: object not available
temp                  600
perturbation            4
subfolder       force_0.1
Name: 121, dtype: object not available
temp                  600
perturbation            4
subfolder       force_0.2
Name: 122, dtype: object not available
temp                  600
perturbation            5
subfolder       force_0.0
Name: 123, dtype: object not available
temp                  600
perturbation            5
subfolder       force_0.1
Name: 124, dtype: object not available
temp                  600
perturbation            5
subfolder       force_0.2
Name: 125, dtype: object not available
temp                  600
perturbation            6
subfolder       force_0.0
Name: 126, dtype: object not available
temp                  600
perturbation            6
subfolder       force_0.1
Name: 127, dtype: object not available
temp                  600
perturbation            6
subfolder       force_0.2
Name: 128, dtype: object not available
temp                  600
perturbation            7
subfolder       force_0.0
Name: 129, dtype: object not available
temp                  600
perturbation            7
subfolder       force_0.1
Name: 130, dtype: object not available
temp                  600
perturbation            7
subfolder       force_0.2
Name: 131, dtype: object not available
temp                  600
perturbation            8
subfolder       force_0.0
Name: 132, dtype: object not available
temp                  600
perturbation            8
subfolder       force_0.1
Name: 133, dtype: object not available
temp                  600
perturbation            8
subfolder       force_0.2
Name: 134, dtype: object not available

In [67]:
remove_columns = ['bin']
data = data.drop(remove_columns, axis=1)
data.to_feather("/Users/weilu/Research/data/pulling/nov11_pmf_2.feather")

In [68]:
data


Out[68]:
index x f df e s change force perturbation temp upOrDown
0 0 7.692 6.858 0.0 -847.760 -854.617 none 0.0 original 450 none
1 1 10.927 8.500 0.0 -840.592 -849.092 none 0.0 original 450 none
2 2 14.162 0.000 0.0 -930.661 -930.661 none 0.0 original 450 none
3 3 17.397 3.953 0.0 -904.304 -908.257 none 0.0 original 450 none
4 4 20.631 2.480 0.0 -928.194 -930.674 none 0.0 original 450 none
5 5 23.866 2.678 0.0 -920.745 -923.424 none 0.0 original 450 none
6 6 27.101 2.519 0.0 -933.167 -935.685 none 0.0 original 450 none
7 7 30.336 2.731 0.0 -930.538 -933.270 none 0.0 original 450 none
8 8 33.571 2.255 0.0 -953.751 -956.006 none 0.0 original 450 none
9 9 36.806 4.218 0.0 -935.416 -939.633 none 0.0 original 450 none
10 10 40.041 6.657 0.0 -922.348 -929.005 none 0.0 original 450 none
11 11 43.276 10.779 0.0 -886.182 -896.960 none 0.0 original 450 none
12 12 46.511 11.442 0.0 -901.013 -912.455 none 0.0 original 450 none
13 13 49.746 17.010 0.0 -853.484 -870.495 none 0.0 original 450 none
14 14 52.981 20.901 0.0 -824.810 -845.711 none 0.0 original 450 none
15 15 56.216 22.718 0.0 -805.163 -827.881 none 0.0 original 450 none
16 16 59.451 22.338 0.0 -814.236 -836.574 none 0.0 original 450 none
17 17 62.685 21.766 0.0 -826.127 -847.892 none 0.0 original 450 none
18 18 65.920 20.318 0.0 -857.485 -877.803 none 0.0 original 450 none
19 19 69.155 21.021 0.0 -840.674 -861.695 none 0.0 original 450 none
20 20 72.390 20.337 0.0 -869.714 -890.051 none 0.0 original 450 none
21 21 75.625 22.131 0.0 -842.329 -864.460 none 0.0 original 450 none
22 22 78.860 23.422 0.0 -837.815 -861.237 none 0.0 original 450 none
23 23 82.095 22.943 0.0 -855.354 -878.297 none 0.0 original 450 none
24 24 85.330 23.561 0.0 -868.351 -891.912 none 0.0 original 450 none
25 25 88.565 26.792 0.0 -832.696 -859.488 none 0.0 original 450 none
26 26 91.800 28.835 0.0 -835.962 -864.797 none 0.0 original 450 none
27 27 95.035 29.248 0.0 -861.191 -890.439 none 0.0 original 450 none
28 28 98.270 32.215 0.0 -1107.508 -1139.723 none 0.0 original 450 none
29 0 7.692 7.591 0.0 -847.760 -855.350 none 0.1 original 450 none
... ... ... ... ... ... ... ... ... ... ... ...
1207 19 69.155 2.886 0.0 -498.235 -501.121 mem 0.2 m_mem 550 m
1208 20 72.390 3.294 0.0 -508.098 -511.392 mem 0.2 m_mem 550 m
1209 21 75.625 3.880 0.0 -523.607 -527.487 mem 0.2 m_mem 550 m
1210 22 78.860 3.851 0.0 -525.908 -529.759 mem 0.2 m_mem 550 m
1211 23 82.095 3.884 0.0 -521.522 -525.406 mem 0.2 m_mem 550 m
1212 24 85.330 4.791 0.0 -535.351 -540.142 mem 0.2 m_mem 550 m
1213 25 88.565 4.707 0.0 -523.693 -528.400 mem 0.2 m_mem 550 m
1214 26 91.800 4.830 0.0 -524.610 -529.440 mem 0.2 m_mem 550 m
1215 27 95.035 6.075 0.0 -536.042 -542.117 mem 0.2 m_mem 550 m
1216 28 98.270 4.581 0.0 -508.547 -513.128 mem 0.2 m_mem 550 m
1217 29 101.505 6.827 0.0 -547.439 -554.266 mem 0.2 m_mem 550 m
1218 30 104.739 7.202 0.0 -534.105 -541.307 mem 0.2 m_mem 550 m
1219 31 107.974 7.115 0.0 -532.412 -539.527 mem 0.2 m_mem 550 m
1220 32 111.209 5.414 0.0 -510.420 -515.834 mem 0.2 m_mem 550 m
1221 33 114.444 6.287 0.0 -517.966 -524.253 mem 0.2 m_mem 550 m
1222 34 117.679 6.549 0.0 -516.685 -523.234 mem 0.2 m_mem 550 m
1223 35 120.914 5.044 0.0 -493.270 -498.313 mem 0.2 m_mem 550 m
1224 36 124.149 2.410 0.0 -458.757 -461.167 mem 0.2 m_mem 550 m
1225 37 127.384 2.412 0.0 -465.443 -467.855 mem 0.2 m_mem 550 m
1226 38 130.619 2.561 0.0 -480.347 -482.908 mem 0.2 m_mem 550 m
1227 39 133.854 1.943 0.0 -451.732 -453.675 mem 0.2 m_mem 550 m
1228 40 137.089 0.000 0.0 -443.737 -443.737 mem 0.2 m_mem 550 m
1229 41 140.324 3.467 0.0 -465.340 -468.807 mem 0.2 m_mem 550 m
1230 42 143.559 3.484 0.0 -481.661 -485.145 mem 0.2 m_mem 550 m
1231 43 146.793 1.575 0.0 -449.391 -450.967 mem 0.2 m_mem 550 m
1232 44 150.028 3.707 0.0 -485.360 -489.067 mem 0.2 m_mem 550 m
1233 45 153.263 2.569 0.0 -485.080 -487.649 mem 0.2 m_mem 550 m
1234 46 156.498 1.589 0.0 -470.847 -472.436 mem 0.2 m_mem 550 m
1235 47 159.733 4.046 0.0 -507.583 -511.628 mem 0.2 m_mem 550 m
1236 48 162.968 5.168 0.0 -534.138 -539.306 mem 0.2 m_mem 550 m

1237 rows × 11 columns


In [4]:
[*range(500, 630, 10)]


Out[4]:
[500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620]

In [31]:
perturbation_list


Out[31]:
[0, 1, 2, 3, 4, 5, 6, 7, 8]

In [32]:
import datetime

In [43]:
perturbation_table = {0:"original", 1:"p_mem", 2:"m_mem", 3:"p_lipid", 4:"m_lipid", 5:"p_go", 6:"m_go", 7:"p_rg", 8:"m_rg"}
pmf_list = {
    "temp":[500, 530, 560, 590],
    "perturbation":list(perturbation_table.keys()),
    "force":["0.0", "0.1", "0.2"]
}

In [ ]:


In [48]:
pmf_list_data = expand_grid(pmf_list)
pre = "/Users/weilu/Research/davinci/extended/finer"
all_pmf_list = []

for index, row in pmf_list_data.iterrows():
#     print(index)
#     print("--")
#     print(row)
    force = row["force"]
    temp = row["temp"]
    perturbation = row["perturbation"]
    if perturbation == 0:
        location = pre + f"/force_{force}/pmf-{temp}.dat"
        change = "none"
        upOrDown = "none"
    else:
        location = pre + f"/force_{force}/perturbation-{perturbation}-pmf-{temp}.dat"
        change = perturbation_table[perturbation].split("_")[-1]
        upOrDown = perturbation_table[perturbation].split("_")[0]
#     print(location)
    name_list = ["f", "df", "e", "s"]
    names = ["bin", "x"] + name_list
    data = pd.read_table(location, skiprows=2, sep='\s+', names=names).assign(upOrDown=upOrDown, change=change, force=force, temp=temp, perturbation=perturbation_table[perturbation])
    all_pmf_list.append(data)
data = pd.concat(all_pmf_list).dropna().reset_index()
data.to_feather("/Users/weilu/Research/data/pulling/nov06_pmf_2.feather")

In [53]:
def readPMF(pmf_list_data, pre):
    all_pmf_list = []
    for index, row in pmf_list_data.iterrows():
    #     print(index)
    #     print("--")
    #     print(row)
        force = row["force"]
        temp = row["temp"]
        perturbation = row["perturbation"]
        if perturbation == 0:
            location = pre + f"/force_{force}/pmf-{temp}.dat"
            change = "none"
            upOrDown = "none"
        else:
            location = pre + f"/force_{force}/perturbation-{perturbation}-pmf-{temp}.dat"
            change = perturbation_table[perturbation].split("_")[-1]
            upOrDown = perturbation_table[perturbation].split("_")[0]
    #     print(location)
        name_list = ["f", "df", "e", "s"]
        names = ["bin", "x"] + name_list
        try:
            data = pd.read_table(location, skiprows=2, sep='\s+', names=names).assign(upOrDown=upOrDown, change=change, force=force, temp=temp, perturbation=perturbation_table[perturbation])
            all_pmf_list.append(data)
        except:
            print(row, "not available")
    return pd.concat(all_pmf_list).dropna().reset_index()

In [84]:
list(range(500, 710, 10))


Out[84]:
[500,
 510,
 520,
 530,
 540,
 550,
 560,
 570,
 580,
 590,
 600,
 610,
 620,
 630,
 640,
 650,
 660,
 670,
 680,
 690,
 700]

In [85]:
pmf_list = {
    "temp":list(range(500, 710, 10)),
    "perturbation":list(perturbation_table.keys()),
    "force":["0.0", "0.1", "0.2"]
}
pmf_list_data = expand_grid(pmf_list)
pre = "/Users/weilu/Research/davinci/extended/coarse"
data = readPMF(pmf_list_data, pre)
# data.to_feather("/Users/weilu/Research/data/pulling/nov06_pmf_3.feather")
remove_columns = ['bin']
data = data.drop(remove_columns, axis=1)
data.to_feather("/Users/weilu/Research/data/pulling/nov07_pmf_1.feather")


temp            500
perturbation      4
force           0.1
Name: 13, dtype: object not available
temp            500
perturbation      4
force           0.2
Name: 14, dtype: object not available
temp            500
perturbation      5
force           0.0
Name: 15, dtype: object not available
temp            500
perturbation      5
force           0.1
Name: 16, dtype: object not available
temp            500
perturbation      5
force           0.2
Name: 17, dtype: object not available
temp            500
perturbation      6
force           0.0
Name: 18, dtype: object not available
temp            500
perturbation      6
force           0.1
Name: 19, dtype: object not available
temp            500
perturbation      6
force           0.2
Name: 20, dtype: object not available
temp            500
perturbation      7
force           0.0
Name: 21, dtype: object not available
temp            500
perturbation      7
force           0.1
Name: 22, dtype: object not available
temp            500
perturbation      7
force           0.2
Name: 23, dtype: object not available
temp            500
perturbation      8
force           0.0
Name: 24, dtype: object not available
temp            500
perturbation      8
force           0.1
Name: 25, dtype: object not available
temp            500
perturbation      8
force           0.2
Name: 26, dtype: object not available
temp            510
perturbation      4
force           0.0
Name: 39, dtype: object not available
temp            510
perturbation      4
force           0.1
Name: 40, dtype: object not available
temp            510
perturbation      4
force           0.2
Name: 41, dtype: object not available
temp            510
perturbation      5
force           0.0
Name: 42, dtype: object not available
temp            510
perturbation      5
force           0.1
Name: 43, dtype: object not available
temp            510
perturbation      5
force           0.2
Name: 44, dtype: object not available
temp            510
perturbation      6
force           0.0
Name: 45, dtype: object not available
temp            510
perturbation      6
force           0.1
Name: 46, dtype: object not available
temp            510
perturbation      6
force           0.2
Name: 47, dtype: object not available
temp            510
perturbation      7
force           0.0
Name: 48, dtype: object not available
temp            510
perturbation      7
force           0.1
Name: 49, dtype: object not available
temp            510
perturbation      7
force           0.2
Name: 50, dtype: object not available
temp            510
perturbation      8
force           0.0
Name: 51, dtype: object not available
temp            510
perturbation      8
force           0.1
Name: 52, dtype: object not available
temp            510
perturbation      8
force           0.2
Name: 53, dtype: object not available
temp            520
perturbation      4
force           0.0
Name: 66, dtype: object not available
temp            520
perturbation      4
force           0.1
Name: 67, dtype: object not available
temp            520
perturbation      4
force           0.2
Name: 68, dtype: object not available
temp            520
perturbation      5
force           0.0
Name: 69, dtype: object not available
temp            520
perturbation      5
force           0.1
Name: 70, dtype: object not available
temp            520
perturbation      5
force           0.2
Name: 71, dtype: object not available
temp            520
perturbation      6
force           0.0
Name: 72, dtype: object not available
temp            520
perturbation      6
force           0.1
Name: 73, dtype: object not available
temp            520
perturbation      6
force           0.2
Name: 74, dtype: object not available
temp            520
perturbation      7
force           0.0
Name: 75, dtype: object not available
temp            520
perturbation      7
force           0.1
Name: 76, dtype: object not available
temp            520
perturbation      7
force           0.2
Name: 77, dtype: object not available
temp            520
perturbation      8
force           0.0
Name: 78, dtype: object not available
temp            520
perturbation      8
force           0.1
Name: 79, dtype: object not available
temp            520
perturbation      8
force           0.2
Name: 80, dtype: object not available
temp            530
perturbation      4
force           0.0
Name: 93, dtype: object not available
temp            530
perturbation      4
force           0.1
Name: 94, dtype: object not available
temp            530
perturbation      4
force           0.2
Name: 95, dtype: object not available
temp            530
perturbation      5
force           0.0
Name: 96, dtype: object not available
temp            530
perturbation      5
force           0.1
Name: 97, dtype: object not available
temp            530
perturbation      5
force           0.2
Name: 98, dtype: object not available
temp            530
perturbation      6
force           0.0
Name: 99, dtype: object not available
temp            530
perturbation      6
force           0.1
Name: 100, dtype: object not available
temp            530
perturbation      6
force           0.2
Name: 101, dtype: object not available
temp            530
perturbation      7
force           0.0
Name: 102, dtype: object not available
temp            530
perturbation      7
force           0.1
Name: 103, dtype: object not available
temp            530
perturbation      7
force           0.2
Name: 104, dtype: object not available
temp            530
perturbation      8
force           0.0
Name: 105, dtype: object not available
temp            530
perturbation      8
force           0.1
Name: 106, dtype: object not available
temp            530
perturbation      8
force           0.2
Name: 107, dtype: object not available
temp            540
perturbation      4
force           0.0
Name: 120, dtype: object not available
temp            540
perturbation      4
force           0.1
Name: 121, dtype: object not available
temp            540
perturbation      4
force           0.2
Name: 122, dtype: object not available
temp            540
perturbation      5
force           0.0
Name: 123, dtype: object not available
temp            540
perturbation      5
force           0.1
Name: 124, dtype: object not available
temp            540
perturbation      5
force           0.2
Name: 125, dtype: object not available
temp            540
perturbation      6
force           0.0
Name: 126, dtype: object not available
temp            540
perturbation      6
force           0.1
Name: 127, dtype: object not available
temp            540
perturbation      6
force           0.2
Name: 128, dtype: object not available
temp            540
perturbation      7
force           0.0
Name: 129, dtype: object not available
temp            540
perturbation      7
force           0.1
Name: 130, dtype: object not available
temp            540
perturbation      7
force           0.2
Name: 131, dtype: object not available
temp            540
perturbation      8
force           0.0
Name: 132, dtype: object not available
temp            540
perturbation      8
force           0.1
Name: 133, dtype: object not available
temp            540
perturbation      8
force           0.2
Name: 134, dtype: object not available
temp            550
perturbation      4
force           0.0
Name: 147, dtype: object not available
temp            550
perturbation      4
force           0.1
Name: 148, dtype: object not available
temp            550
perturbation      4
force           0.2
Name: 149, dtype: object not available
temp            550
perturbation      5
force           0.0
Name: 150, dtype: object not available
temp            550
perturbation      5
force           0.1
Name: 151, dtype: object not available
temp            550
perturbation      5
force           0.2
Name: 152, dtype: object not available
temp            550
perturbation      6
force           0.0
Name: 153, dtype: object not available
temp            550
perturbation      6
force           0.1
Name: 154, dtype: object not available
temp            550
perturbation      6
force           0.2
Name: 155, dtype: object not available
temp            550
perturbation      7
force           0.0
Name: 156, dtype: object not available
temp            550
perturbation      7
force           0.1
Name: 157, dtype: object not available
temp            550
perturbation      7
force           0.2
Name: 158, dtype: object not available
temp            550
perturbation      8
force           0.0
Name: 159, dtype: object not available
temp            550
perturbation      8
force           0.1
Name: 160, dtype: object not available
temp            550
perturbation      8
force           0.2
Name: 161, dtype: object not available
temp            560
perturbation      4
force           0.0
Name: 174, dtype: object not available
temp            560
perturbation      4
force           0.1
Name: 175, dtype: object not available
temp            560
perturbation      4
force           0.2
Name: 176, dtype: object not available
temp            560
perturbation      5
force           0.0
Name: 177, dtype: object not available
temp            560
perturbation      5
force           0.1
Name: 178, dtype: object not available
temp            560
perturbation      5
force           0.2
Name: 179, dtype: object not available
temp            560
perturbation      6
force           0.0
Name: 180, dtype: object not available
temp            560
perturbation      6
force           0.1
Name: 181, dtype: object not available
temp            560
perturbation      6
force           0.2
Name: 182, dtype: object not available
temp            560
perturbation      7
force           0.0
Name: 183, dtype: object not available
temp            560
perturbation      7
force           0.1
Name: 184, dtype: object not available
temp            560
perturbation      7
force           0.2
Name: 185, dtype: object not available
temp            560
perturbation      8
force           0.0
Name: 186, dtype: object not available
temp            560
perturbation      8
force           0.1
Name: 187, dtype: object not available
temp            560
perturbation      8
force           0.2
Name: 188, dtype: object not available
temp            570
perturbation      4
force           0.0
Name: 201, dtype: object not available
temp            570
perturbation      4
force           0.1
Name: 202, dtype: object not available
temp            570
perturbation      4
force           0.2
Name: 203, dtype: object not available
temp            570
perturbation      5
force           0.0
Name: 204, dtype: object not available
temp            570
perturbation      5
force           0.1
Name: 205, dtype: object not available
temp            570
perturbation      5
force           0.2
Name: 206, dtype: object not available
temp            570
perturbation      6
force           0.0
Name: 207, dtype: object not available
temp            570
perturbation      6
force           0.1
Name: 208, dtype: object not available
temp            570
perturbation      6
force           0.2
Name: 209, dtype: object not available
temp            570
perturbation      7
force           0.0
Name: 210, dtype: object not available
temp            570
perturbation      7
force           0.1
Name: 211, dtype: object not available
temp            570
perturbation      7
force           0.2
Name: 212, dtype: object not available
temp            570
perturbation      8
force           0.0
Name: 213, dtype: object not available
temp            570
perturbation      8
force           0.1
Name: 214, dtype: object not available
temp            570
perturbation      8
force           0.2
Name: 215, dtype: object not available
temp            580
perturbation      4
force           0.0
Name: 228, dtype: object not available
temp            580
perturbation      4
force           0.1
Name: 229, dtype: object not available
temp            580
perturbation      4
force           0.2
Name: 230, dtype: object not available
temp            580
perturbation      5
force           0.0
Name: 231, dtype: object not available
temp            580
perturbation      5
force           0.1
Name: 232, dtype: object not available
temp            580
perturbation      5
force           0.2
Name: 233, dtype: object not available
temp            580
perturbation      6
force           0.0
Name: 234, dtype: object not available
temp            580
perturbation      6
force           0.1
Name: 235, dtype: object not available
temp            580
perturbation      6
force           0.2
Name: 236, dtype: object not available
temp            580
perturbation      7
force           0.0
Name: 237, dtype: object not available
temp            580
perturbation      7
force           0.1
Name: 238, dtype: object not available
temp            580
perturbation      7
force           0.2
Name: 239, dtype: object not available
temp            580
perturbation      8
force           0.0
Name: 240, dtype: object not available
temp            580
perturbation      8
force           0.1
Name: 241, dtype: object not available
temp            580
perturbation      8
force           0.2
Name: 242, dtype: object not available
temp            590
perturbation      4
force           0.0
Name: 255, dtype: object not available
temp            590
perturbation      4
force           0.1
Name: 256, dtype: object not available
temp            590
perturbation      4
force           0.2
Name: 257, dtype: object not available
temp            590
perturbation      5
force           0.0
Name: 258, dtype: object not available
temp            590
perturbation      5
force           0.1
Name: 259, dtype: object not available
temp            590
perturbation      5
force           0.2
Name: 260, dtype: object not available
temp            590
perturbation      6
force           0.0
Name: 261, dtype: object not available
temp            590
perturbation      6
force           0.1
Name: 262, dtype: object not available
temp            590
perturbation      6
force           0.2
Name: 263, dtype: object not available
temp            590
perturbation      7
force           0.0
Name: 264, dtype: object not available
temp            590
perturbation      7
force           0.1
Name: 265, dtype: object not available
temp            590
perturbation      7
force           0.2
Name: 266, dtype: object not available
temp            590
perturbation      8
force           0.0
Name: 267, dtype: object not available
temp            590
perturbation      8
force           0.1
Name: 268, dtype: object not available
temp            590
perturbation      8
force           0.2
Name: 269, dtype: object not available
temp            600
perturbation      4
force           0.0
Name: 282, dtype: object not available
temp            600
perturbation      4
force           0.1
Name: 283, dtype: object not available
temp            600
perturbation      4
force           0.2
Name: 284, dtype: object not available
temp            600
perturbation      5
force           0.0
Name: 285, dtype: object not available
temp            600
perturbation      5
force           0.1
Name: 286, dtype: object not available
temp            600
perturbation      5
force           0.2
Name: 287, dtype: object not available
temp            600
perturbation      6
force           0.0
Name: 288, dtype: object not available
temp            600
perturbation      6
force           0.1
Name: 289, dtype: object not available
temp            600
perturbation      6
force           0.2
Name: 290, dtype: object not available
temp            600
perturbation      7
force           0.0
Name: 291, dtype: object not available
temp            600
perturbation      7
force           0.1
Name: 292, dtype: object not available
temp            600
perturbation      7
force           0.2
Name: 293, dtype: object not available
temp            600
perturbation      8
force           0.0
Name: 294, dtype: object not available
temp            600
perturbation      8
force           0.1
Name: 295, dtype: object not available
temp            600
perturbation      8
force           0.2
Name: 296, dtype: object not available
temp            610
perturbation      4
force           0.0
Name: 309, dtype: object not available
temp            610
perturbation      4
force           0.1
Name: 310, dtype: object not available
temp            610
perturbation      4
force           0.2
Name: 311, dtype: object not available
temp            610
perturbation      5
force           0.0
Name: 312, dtype: object not available
temp            610
perturbation      5
force           0.1
Name: 313, dtype: object not available
temp            610
perturbation      5
force           0.2
Name: 314, dtype: object not available
temp            610
perturbation      6
force           0.0
Name: 315, dtype: object not available
temp            610
perturbation      6
force           0.1
Name: 316, dtype: object not available
temp            610
perturbation      6
force           0.2
Name: 317, dtype: object not available
temp            610
perturbation      7
force           0.0
Name: 318, dtype: object not available
temp            610
perturbation      7
force           0.1
Name: 319, dtype: object not available
temp            610
perturbation      7
force           0.2
Name: 320, dtype: object not available
temp            610
perturbation      8
force           0.0
Name: 321, dtype: object not available
temp            610
perturbation      8
force           0.1
Name: 322, dtype: object not available
temp            610
perturbation      8
force           0.2
Name: 323, dtype: object not available
temp            620
perturbation      4
force           0.0
Name: 336, dtype: object not available
temp            620
perturbation      4
force           0.1
Name: 337, dtype: object not available
temp            620
perturbation      4
force           0.2
Name: 338, dtype: object not available
temp            620
perturbation      5
force           0.0
Name: 339, dtype: object not available
temp            620
perturbation      5
force           0.1
Name: 340, dtype: object not available
temp            620
perturbation      5
force           0.2
Name: 341, dtype: object not available
temp            620
perturbation      6
force           0.0
Name: 342, dtype: object not available
temp            620
perturbation      6
force           0.1
Name: 343, dtype: object not available
temp            620
perturbation      6
force           0.2
Name: 344, dtype: object not available
temp            620
perturbation      7
force           0.0
Name: 345, dtype: object not available
temp            620
perturbation      7
force           0.1
Name: 346, dtype: object not available
temp            620
perturbation      7
force           0.2
Name: 347, dtype: object not available
temp            620
perturbation      8
force           0.0
Name: 348, dtype: object not available
temp            620
perturbation      8
force           0.1
Name: 349, dtype: object not available
temp            620
perturbation      8
force           0.2
Name: 350, dtype: object not available
temp            630
perturbation      4
force           0.0
Name: 363, dtype: object not available
temp            630
perturbation      4
force           0.1
Name: 364, dtype: object not available
temp            630
perturbation      4
force           0.2
Name: 365, dtype: object not available
temp            630
perturbation      5
force           0.0
Name: 366, dtype: object not available
temp            630
perturbation      5
force           0.1
Name: 367, dtype: object not available
temp            630
perturbation      5
force           0.2
Name: 368, dtype: object not available
temp            630
perturbation      6
force           0.0
Name: 369, dtype: object not available
temp            630
perturbation      6
force           0.1
Name: 370, dtype: object not available
temp            630
perturbation      6
force           0.2
Name: 371, dtype: object not available
temp            630
perturbation      7
force           0.0
Name: 372, dtype: object not available
temp            630
perturbation      7
force           0.1
Name: 373, dtype: object not available
temp            630
perturbation      7
force           0.2
Name: 374, dtype: object not available
temp            630
perturbation      8
force           0.0
Name: 375, dtype: object not available
temp            630
perturbation      8
force           0.1
Name: 376, dtype: object not available
temp            630
perturbation      8
force           0.2
Name: 377, dtype: object not available
temp            640
perturbation      4
force           0.0
Name: 390, dtype: object not available
temp            640
perturbation      4
force           0.1
Name: 391, dtype: object not available
temp            640
perturbation      4
force           0.2
Name: 392, dtype: object not available
temp            640
perturbation      5
force           0.0
Name: 393, dtype: object not available
temp            640
perturbation      5
force           0.1
Name: 394, dtype: object not available
temp            640
perturbation      5
force           0.2
Name: 395, dtype: object not available
temp            640
perturbation      6
force           0.0
Name: 396, dtype: object not available
temp            640
perturbation      6
force           0.1
Name: 397, dtype: object not available
temp            640
perturbation      6
force           0.2
Name: 398, dtype: object not available
temp            640
perturbation      7
force           0.0
Name: 399, dtype: object not available
temp            640
perturbation      7
force           0.1
Name: 400, dtype: object not available
temp            640
perturbation      7
force           0.2
Name: 401, dtype: object not available
temp            640
perturbation      8
force           0.0
Name: 402, dtype: object not available
temp            640
perturbation      8
force           0.1
Name: 403, dtype: object not available
temp            640
perturbation      8
force           0.2
Name: 404, dtype: object not available
temp            650
perturbation      4
force           0.0
Name: 417, dtype: object not available
temp            650
perturbation      4
force           0.1
Name: 418, dtype: object not available
temp            650
perturbation      4
force           0.2
Name: 419, dtype: object not available
temp            650
perturbation      5
force           0.0
Name: 420, dtype: object not available
temp            650
perturbation      5
force           0.1
Name: 421, dtype: object not available
temp            650
perturbation      5
force           0.2
Name: 422, dtype: object not available
temp            650
perturbation      6
force           0.0
Name: 423, dtype: object not available
temp            650
perturbation      6
force           0.1
Name: 424, dtype: object not available
temp            650
perturbation      6
force           0.2
Name: 425, dtype: object not available
temp            650
perturbation      7
force           0.0
Name: 426, dtype: object not available
temp            650
perturbation      7
force           0.1
Name: 427, dtype: object not available
temp            650
perturbation      7
force           0.2
Name: 428, dtype: object not available
temp            650
perturbation      8
force           0.0
Name: 429, dtype: object not available
temp            650
perturbation      8
force           0.1
Name: 430, dtype: object not available
temp            650
perturbation      8
force           0.2
Name: 431, dtype: object not available
temp            660
perturbation      3
force           0.2
Name: 443, dtype: object not available
temp            660
perturbation      4
force           0.0
Name: 444, dtype: object not available
temp            660
perturbation      4
force           0.1
Name: 445, dtype: object not available
temp            660
perturbation      4
force           0.2
Name: 446, dtype: object not available
temp            660
perturbation      5
force           0.0
Name: 447, dtype: object not available
temp            660
perturbation      5
force           0.1
Name: 448, dtype: object not available
temp            660
perturbation      5
force           0.2
Name: 449, dtype: object not available
temp            660
perturbation      6
force           0.0
Name: 450, dtype: object not available
temp            660
perturbation      6
force           0.1
Name: 451, dtype: object not available
temp            660
perturbation      6
force           0.2
Name: 452, dtype: object not available
temp            660
perturbation      7
force           0.0
Name: 453, dtype: object not available
temp            660
perturbation      7
force           0.1
Name: 454, dtype: object not available
temp            660
perturbation      7
force           0.2
Name: 455, dtype: object not available
temp            660
perturbation      8
force           0.0
Name: 456, dtype: object not available
temp            660
perturbation      8
force           0.1
Name: 457, dtype: object not available
temp            660
perturbation      8
force           0.2
Name: 458, dtype: object not available
temp            670
perturbation      3
force           0.2
Name: 470, dtype: object not available
temp            670
perturbation      4
force           0.0
Name: 471, dtype: object not available
temp            670
perturbation      4
force           0.1
Name: 472, dtype: object not available
temp            670
perturbation      4
force           0.2
Name: 473, dtype: object not available
temp            670
perturbation      5
force           0.0
Name: 474, dtype: object not available
temp            670
perturbation      5
force           0.1
Name: 475, dtype: object not available
temp            670
perturbation      5
force           0.2
Name: 476, dtype: object not available
temp            670
perturbation      6
force           0.0
Name: 477, dtype: object not available
temp            670
perturbation      6
force           0.1
Name: 478, dtype: object not available
temp            670
perturbation      6
force           0.2
Name: 479, dtype: object not available
temp            670
perturbation      7
force           0.0
Name: 480, dtype: object not available
temp            670
perturbation      7
force           0.1
Name: 481, dtype: object not available
temp            670
perturbation      7
force           0.2
Name: 482, dtype: object not available
temp            670
perturbation      8
force           0.0
Name: 483, dtype: object not available
temp            670
perturbation      8
force           0.1
Name: 484, dtype: object not available
temp            670
perturbation      8
force           0.2
Name: 485, dtype: object not available
temp            680
perturbation      3
force           0.1
Name: 496, dtype: object not available
temp            680
perturbation      3
force           0.2
Name: 497, dtype: object not available
temp            680
perturbation      4
force           0.0
Name: 498, dtype: object not available
temp            680
perturbation      4
force           0.1
Name: 499, dtype: object not available
temp            680
perturbation      4
force           0.2
Name: 500, dtype: object not available
temp            680
perturbation      5
force           0.0
Name: 501, dtype: object not available
temp            680
perturbation      5
force           0.1
Name: 502, dtype: object not available
temp            680
perturbation      5
force           0.2
Name: 503, dtype: object not available
temp            680
perturbation      6
force           0.0
Name: 504, dtype: object not available
temp            680
perturbation      6
force           0.1
Name: 505, dtype: object not available
temp            680
perturbation      6
force           0.2
Name: 506, dtype: object not available
temp            680
perturbation      7
force           0.0
Name: 507, dtype: object not available
temp            680
perturbation      7
force           0.1
Name: 508, dtype: object not available
temp            680
perturbation      7
force           0.2
Name: 509, dtype: object not available
temp            680
perturbation      8
force           0.0
Name: 510, dtype: object not available
temp            680
perturbation      8
force           0.1
Name: 511, dtype: object not available
temp            680
perturbation      8
force           0.2
Name: 512, dtype: object not available
temp            690
perturbation      3
force           0.1
Name: 523, dtype: object not available
temp            690
perturbation      3
force           0.2
Name: 524, dtype: object not available
temp            690
perturbation      4
force           0.0
Name: 525, dtype: object not available
temp            690
perturbation      4
force           0.1
Name: 526, dtype: object not available
temp            690
perturbation      4
force           0.2
Name: 527, dtype: object not available
temp            690
perturbation      5
force           0.0
Name: 528, dtype: object not available
temp            690
perturbation      5
force           0.1
Name: 529, dtype: object not available
temp            690
perturbation      5
force           0.2
Name: 530, dtype: object not available
temp            690
perturbation      6
force           0.0
Name: 531, dtype: object not available
temp            690
perturbation      6
force           0.1
Name: 532, dtype: object not available
temp            690
perturbation      6
force           0.2
Name: 533, dtype: object not available
temp            690
perturbation      7
force           0.0
Name: 534, dtype: object not available
temp            690
perturbation      7
force           0.1
Name: 535, dtype: object not available
temp            690
perturbation      7
force           0.2
Name: 536, dtype: object not available
temp            690
perturbation      8
force           0.0
Name: 537, dtype: object not available
temp            690
perturbation      8
force           0.1
Name: 538, dtype: object not available
temp            690
perturbation      8
force           0.2
Name: 539, dtype: object not available
temp            700
perturbation      3
force           0.1
Name: 550, dtype: object not available
temp            700
perturbation      3
force           0.2
Name: 551, dtype: object not available
temp            700
perturbation      4
force           0.0
Name: 552, dtype: object not available
temp            700
perturbation      4
force           0.1
Name: 553, dtype: object not available
temp            700
perturbation      4
force           0.2
Name: 554, dtype: object not available
temp            700
perturbation      5
force           0.0
Name: 555, dtype: object not available
temp            700
perturbation      5
force           0.1
Name: 556, dtype: object not available
temp            700
perturbation      5
force           0.2
Name: 557, dtype: object not available
temp            700
perturbation      6
force           0.0
Name: 558, dtype: object not available
temp            700
perturbation      6
force           0.1
Name: 559, dtype: object not available
temp            700
perturbation      6
force           0.2
Name: 560, dtype: object not available
temp            700
perturbation      7
force           0.0
Name: 561, dtype: object not available
temp            700
perturbation      7
force           0.1
Name: 562, dtype: object not available
temp            700
perturbation      7
force           0.2
Name: 563, dtype: object not available
temp            700
perturbation      8
force           0.0
Name: 564, dtype: object not available
temp            700
perturbation      8
force           0.1
Name: 565, dtype: object not available
temp            700
perturbation      8
force           0.2
Name: 566, dtype: object not available

In [86]:
data


Out[86]:
index x f df e s change force perturbation temp upOrDown
0 2 9.267 0.000 0.0 -763.998 -763.998 none 0.0 original 500 none
1 3 12.293 3.085 0.0 -793.759 -796.844 none 0.0 original 500 none
2 4 15.318 2.593 0.0 -765.426 -768.020 none 0.0 original 500 none
3 5 18.343 2.636 0.0 -758.124 -760.761 none 0.0 original 500 none
4 6 21.369 2.157 0.0 -755.503 -757.659 none 0.0 original 500 none
5 7 24.394 2.160 0.0 -757.645 -759.805 none 0.0 original 500 none
6 8 27.419 2.054 0.0 -758.642 -760.696 none 0.0 original 500 none
7 9 30.445 2.140 0.0 -759.274 -761.414 none 0.0 original 500 none
8 10 33.470 2.468 0.0 -760.162 -762.630 none 0.0 original 500 none
9 11 36.495 3.181 0.0 -758.039 -761.220 none 0.0 original 500 none
10 12 39.521 4.293 0.0 -757.991 -762.284 none 0.0 original 500 none
11 13 42.546 5.734 0.0 -756.959 -762.693 none 0.0 original 500 none
12 14 45.572 7.586 0.0 -755.458 -763.043 none 0.0 original 500 none
13 15 48.597 9.774 0.0 -752.978 -762.752 none 0.0 original 500 none
14 16 51.622 12.221 0.0 -748.730 -760.951 none 0.0 original 500 none
15 17 54.648 15.144 0.0 -743.760 -758.904 none 0.0 original 500 none
16 18 57.673 18.515 0.0 -734.686 -753.201 none 0.0 original 500 none
17 19 60.698 22.862 0.0 -715.316 -738.179 none 0.0 original 500 none
18 21 66.749 29.066 0.0 -656.467 -685.534 none 0.0 original 500 none
19 22 69.774 31.949 0.0 -583.868 -615.818 none 0.0 original 500 none
20 23 72.800 31.307 0.0 -673.347 -704.654 none 0.0 original 500 none
21 24 75.825 33.559 0.0 -643.972 -677.531 none 0.0 original 500 none
22 25 78.850 32.642 0.0 -721.249 -753.891 none 0.0 original 500 none
23 26 81.876 32.866 0.0 -837.164 -870.030 none 0.0 original 500 none
24 27 84.901 33.153 0.0 -686.904 -720.057 none 0.0 original 500 none
25 28 87.926 33.559 0.0 -686.904 -720.463 none 0.0 original 500 none
26 29 90.952 33.964 0.0 -965.959 -999.923 none 0.0 original 500 none
27 30 93.977 34.252 0.0 -343.452 -377.704 none 0.0 original 500 none
28 2 9.267 1.774 0.0 -764.085 -765.859 none 0.1 original 500 none
29 3 12.293 2.719 0.0 -789.856 -792.576 none 0.1 original 500 none
... ... ... ... ... ... ... ... ... ... ... ...
11194 16 51.622 8.462 0.0 -92.832 -101.293 lipid 0.0 p_lipid 700 p
11195 17 54.648 9.751 0.0 -90.022 -99.773 lipid 0.0 p_lipid 700 p
11196 18 57.673 12.457 0.0 -118.885 -131.342 lipid 0.0 p_lipid 700 p
11197 19 60.698 14.952 0.0 -124.073 -139.024 lipid 0.0 p_lipid 700 p
11198 20 63.724 16.750 0.0 -137.126 -153.876 lipid 0.0 p_lipid 700 p
11199 21 66.749 17.821 0.0 -117.726 -135.547 lipid 0.0 p_lipid 700 p
11200 22 69.774 20.082 0.0 -133.533 -153.615 lipid 0.0 p_lipid 700 p
11201 23 72.800 18.227 0.0 -95.265 -113.492 lipid 0.0 p_lipid 700 p
11202 24 75.825 18.361 0.0 -68.425 -86.786 lipid 0.0 p_lipid 700 p
11203 25 78.850 21.086 0.0 -107.199 -128.285 lipid 0.0 p_lipid 700 p
11204 26 81.876 20.610 0.0 -93.770 -114.381 lipid 0.0 p_lipid 700 p
11205 27 84.901 19.863 0.0 -79.853 -99.716 lipid 0.0 p_lipid 700 p
11206 28 87.926 20.588 0.0 -70.752 -91.340 lipid 0.0 p_lipid 700 p
11207 29 90.952 22.067 0.0 -101.930 -123.997 lipid 0.0 p_lipid 700 p
11208 30 93.977 21.770 0.0 -90.738 -112.508 lipid 0.0 p_lipid 700 p
11209 31 97.003 22.585 0.0 -85.893 -108.477 lipid 0.0 p_lipid 700 p
11210 32 100.028 22.869 0.0 -89.335 -112.205 lipid 0.0 p_lipid 700 p
11211 33 103.053 23.603 0.0 -100.228 -123.831 lipid 0.0 p_lipid 700 p
11212 34 106.079 23.583 0.0 -75.511 -99.094 lipid 0.0 p_lipid 700 p
11213 35 109.104 24.723 0.0 -93.632 -118.354 lipid 0.0 p_lipid 700 p
11214 36 112.129 24.265 0.0 -69.293 -93.558 lipid 0.0 p_lipid 700 p
11215 37 115.155 26.237 0.0 -102.128 -128.364 lipid 0.0 p_lipid 700 p
11216 38 118.180 26.192 0.0 -88.944 -115.136 lipid 0.0 p_lipid 700 p
11217 39 121.205 26.483 0.0 -78.128 -104.611 lipid 0.0 p_lipid 700 p
11218 40 124.231 27.504 0.0 -89.171 -116.675 lipid 0.0 p_lipid 700 p
11219 41 127.256 28.314 0.0 -93.816 -122.130 lipid 0.0 p_lipid 700 p
11220 42 130.281 29.441 0.0 -133.812 -163.254 lipid 0.0 p_lipid 700 p
11221 43 133.307 30.166 0.0 -173.169 -203.335 lipid 0.0 p_lipid 700 p
11222 44 136.332 31.040 0.0 -284.015 -315.054 lipid 0.0 p_lipid 700 p
11223 45 139.357 29.908 0.0 -107.528 -137.436 lipid 0.0 p_lipid 700 p

11224 rows × 11 columns


In [62]:
pmf_list_data = expand_grid(pmf_list)
pre = "/Users/weilu/Research/davinci/extended/finer_with_more_data"
data = readPMF(pmf_list_data, pre)
# data.to_feather("/Users/weilu/Research/data/pulling/nov06_pmf_3.feather")
remove_columns = ['bin']
data = data.drop(remove_columns, axis=1)
data.to_feather("/Users/weilu/Research/data/pulling/nov06_pmf_3.feather")


temp            500
perturbation      6
force           0.0
Name: 18, dtype: object not available
temp            500
perturbation      6
force           0.1
Name: 19, dtype: object not available
temp            500
perturbation      6
force           0.2
Name: 20, dtype: object not available
temp            500
perturbation      7
force           0.0
Name: 21, dtype: object not available
temp            500
perturbation      7
force           0.1
Name: 22, dtype: object not available
temp            500
perturbation      7
force           0.2
Name: 23, dtype: object not available
temp            500
perturbation      8
force           0.0
Name: 24, dtype: object not available
temp            500
perturbation      8
force           0.1
Name: 25, dtype: object not available
temp            500
perturbation      8
force           0.2
Name: 26, dtype: object not available
temp            530
perturbation      5
force           0.0
Name: 42, dtype: object not available
temp            530
perturbation      6
force           0.0
Name: 45, dtype: object not available
temp            530
perturbation      6
force           0.1
Name: 46, dtype: object not available
temp            530
perturbation      6
force           0.2
Name: 47, dtype: object not available
temp            530
perturbation      7
force           0.0
Name: 48, dtype: object not available
temp            530
perturbation      7
force           0.1
Name: 49, dtype: object not available
temp            530
perturbation      7
force           0.2
Name: 50, dtype: object not available
temp            530
perturbation      8
force           0.0
Name: 51, dtype: object not available
temp            530
perturbation      8
force           0.1
Name: 52, dtype: object not available
temp            530
perturbation      8
force           0.2
Name: 53, dtype: object not available
temp            560
perturbation      5
force           0.0
Name: 69, dtype: object not available
temp            560
perturbation      5
force           0.2
Name: 71, dtype: object not available
temp            560
perturbation      6
force           0.0
Name: 72, dtype: object not available
temp            560
perturbation      6
force           0.1
Name: 73, dtype: object not available
temp            560
perturbation      6
force           0.2
Name: 74, dtype: object not available
temp            560
perturbation      7
force           0.0
Name: 75, dtype: object not available
temp            560
perturbation      7
force           0.1
Name: 76, dtype: object not available
temp            560
perturbation      7
force           0.2
Name: 77, dtype: object not available
temp            560
perturbation      8
force           0.0
Name: 78, dtype: object not available
temp            560
perturbation      8
force           0.1
Name: 79, dtype: object not available
temp            560
perturbation      8
force           0.2
Name: 80, dtype: object not available
temp            590
perturbation      5
force           0.0
Name: 96, dtype: object not available
temp            590
perturbation      5
force           0.1
Name: 97, dtype: object not available
temp            590
perturbation      5
force           0.2
Name: 98, dtype: object not available
temp            590
perturbation      6
force           0.0
Name: 99, dtype: object not available
temp            590
perturbation      6
force           0.1
Name: 100, dtype: object not available
temp            590
perturbation      6
force           0.2
Name: 101, dtype: object not available
temp            590
perturbation      7
force           0.0
Name: 102, dtype: object not available
temp            590
perturbation      7
force           0.1
Name: 103, dtype: object not available
temp            590
perturbation      7
force           0.2
Name: 104, dtype: object not available
temp            590
perturbation      8
force           0.0
Name: 105, dtype: object not available
temp            590
perturbation      8
force           0.1
Name: 106, dtype: object not available
temp            590
perturbation      8
force           0.2
Name: 107, dtype: object not available

In [60]:


In [24]:
temp_list = [500, 530, 560, 590]
def readPMF(force_list=["0.0", "0.1", "0.2"], temp_list=[500, 530, 560, 590],perturbation_list=[0, 1, 2, 3, 4, 5, 6, 7, 8])
    for force in force_list:
        for temp in temp_list:
            for perturbation in perturbation_list:

                # pmf 
                if perturbation == 0:
                    location = pre + f"/force_{force}/pmf-{temp}.dat"
                else:
                    location = pre + \
                    "/force_{}/perturbation-{}-pmf-{}.dat".format(force, perturbation, temp)


  File "<ipython-input-24-d16f5fd7ef3a>", line 2
    def readPMF(force_list=["0.0", "0.1", "0.2"], temp_list=[500, 530, 560, 590],perturbation_list=[0, 1, 2, 3, 4, 5, 6, 7, 8]  )
                                                                                                                                 ^
SyntaxError: invalid syntax

In [ ]:
all_pmf_list = []
all_evpb_list = []
for folder in folder_list:
    for force in force_list:
        for temp in temp_list:
            for perturbation in perturbation_list:

                # pmf 
                if perturbation == 0:
                    location = pre + f"{folder}/1d_dis/t_all/force_{force}/pmf-{temp}.dat"
                else:
                    location = pre + \
                    "{}/1d_dis/t_all/force_{}/perturbation-{}-pmf-{}.dat".format(folder, force, perturbation, temp)

                name_list = ["f", "df", "e", "s"]
                names = ["bin", "x"] + name_list
                data = pd.read_table(location, skiprows=2, sep='\s+', names=names).assign(folder=folder, force=force, temp=temp, perturbation=perturbation_table[perturbation])
                all_pmf_list.append(data)

data = pd.concat(all_pmf_list).dropna().reset_index()
data.to_feather("/Users/weilu/Research/data/pulling/nov06_pmf.feather")

In [20]:
all_pmf_list = []
all_evpb_list = []
for folder in folder_list:
    for force in force_list:
        for temp in temp_list:
            for perturbation in perturbation_list:

                # pmf 
                if perturbation == 0:
                    location = pre + f"{folder}/1d_dis/t_all/force_{force}/pmf-{temp}.dat"
                else:
                    location = pre + \
                    "{}/1d_dis/t_all/force_{}/perturbation-{}-pmf-{}.dat".format(folder, force, perturbation, temp)

                name_list = ["f", "df", "e", "s"]
                names = ["bin", "x"] + name_list
                data = pd.read_table(location, skiprows=2, sep='\s+', names=names).assign(folder=folder, force=force, temp=temp, perturbation=perturbation_table[perturbation])
                all_pmf_list.append(data)

data = pd.concat(all_pmf_list).dropna().reset_index()
data.to_feather("/Users/weilu/Research/data/pulling/nov06_pmf.feather")

In [ ]:


In [114]:
all_pmf_list = []
all_evpb_list = []
for folder in folder_list:
    for temp in temp_list:
        for perturbation in perturbation_list:
            
            # evpb
            if perturbation == 0:
                location = pre + "{}/1d_qw/t_all/force_0.0/evpb-{}.dat".format(folder, temp)
            else:
                location = pre + \
                "{}/1d_qw/t_all/force_0.0/perturbation-{}-evpb-{}.dat".format(folder, perturbation, temp)

            name_list = ["Lipid", "Go", "Mem", "Rg"]
            names = ["bin", "q"] + name_list
            data = pd.read_table(location, skiprows=1, sep='\s+', names=names).assign(folder=folder, temp=temp, perturbation=perturbation_table[perturbation])
            all_evpb_list.append(data)
            
            # pmf 
            if perturbation == 0:
                location = pre + "{}/1d_qw/t_all/force_0.0/pmf-{}.dat".format(folder, temp)
            else:
                location = pre + \
                "{}/1d_qw/t_all/force_0.0/perturbation-{}-pmf-{}.dat".format(folder, perturbation, temp)

            name_list = ["f", "df", "e", "s"]
            names = ["bin", "q"] + name_list
            data = pd.read_table(location, skiprows=2, sep='\s+', names=names).assign(folder=folder, temp=temp, perturbation=perturbation_table[perturbation])
            all_pmf_list.append(data)

data = pd.concat(all_pmf_list).dropna().reset_index()
data.to_feather("/Users/weilu/Research/data/pulling/oct31_pmf_qw.feather")

data = pd.concat(all_evpb_list).dropna().reset_index()
data.to_feather("/Users/weilu/Research/data/pulling/oct31_evpb_qw.feather")

In [77]:
pre = "/Users/weilu/Research/server/oct_2017/23oct/"
folder_list = [
   'memb_3_rg_0.1_lipid_1_extended',
    'memb_3_rg_0.1_lipid_1_topology'
]
all_data_list = []
temp_list = [450, 500, 550]
perturbation_list = [0, 1, 2, 3, 4]
for folder in folder_list:
    for temp in temp_list:
        for perturbation in perturbation_list:
            if perturbation == 0:
                location = pre + "{}/1d_dis/t_all/force_0.0/pmf-{}.dat".format(folder, temp)
            else:
                location = pre + \
                "{}/1d_dis/t_all/force_0.0/perturbation-{}-pmf-{}.dat".format(folder, perturbation, temp)
#         location = pre + "{}/1d_dis/t_all/force_0.0/pmf-{}.dat".format(folder, temp)
            name_list = ["f", "df", "e", "s"]
            names = ["bin", "x"] + name_list
            data = pd.read_table(location, skiprows=2, sep='\s+', names=names).assign(folder=folder, temp=temp, perturbation=perturbation)
            all_data_list.append(data)
data = pd.concat(all_data_list)
data = data.dropna().reset_index()
data.to_feather("/Users/weilu/Research/data/pulling/oct31_pmf.feather")

In [71]:
fig, axes = plt.subplots(1, 2, figsize=(8,6))
i = 0
for label, group in data.groupby('folder'):
#     processed_data = group - group.mean()
#     processed_data["x"] = data["x"]
    
    group.plot('x', "f", ax=axes[i], label=label)
    i = i + 1



In [86]:
pre = "/Users/weilu/Research/server/oct_2017/23oct/"
folder_list = [
   'memb_3_rg_0.1_lipid_1_extended',
    'memb_3_rg_0.1_lipid_1_topology'
]
all_data_list = []
for folder in folder_list:
    location = pre + "{}/1d_qw/t_all/force_0.0/evpb-500.dat".format(folder)
    name_list = ["Lipid", "Go", "Mem", "Rg"]
    names = ["bin", "x"] + name_list
    data = pd.read_table(location, skiprows=1, sep='\s+', names=names).assign(folder=folder)
    all_data_list.append(data)
data = pd.concat(all_data_list)
data = data.dropna()

In [87]:
fig, axes = plt.subplots(1, 2, figsize=(8,6))
i = 0
for label, group in data.groupby('folder'):
#     processed_data = group - group.mean()
#     processed_data["x"] = data["x"]
    for name in name_list:
        group.plot('x', name, ax=axes[i], ylim=(-550,550), label=label)
    i = i + 1



In [ ]:
plotcontour.py pmf-400.dat -xmax 1 -xmin 0 -ymin 0 -ymax 150"

In [63]:
location = "/Users/weilu/Research/davinci/extended/2d_qw_dis/t_all/force_0.0/"
filename = location + "pmf-500.dat"
x = 1
y = 2
z = 3
xmin, xmax = 0, 1
ymin, ymax = 0, 150
zmin, zmax = 0, 30
xlabel, ylabel = "xlabel", "ylabel"
title = "title"
titlefontsize = 28

In [98]:
location = "/Users/weilu/Research/server/oct_2017/23oct/memb_3_rg_0.1_lipid_1_topology/2d_qw_dis/t_all/force_0.0/"
filename = location + "pmf-500.dat"
x = 1
y = 2
z = 3
xmin, xmax = 0, 1
ymin, ymax = 0, 150
zmin, zmax = 0, 30
xlabel, ylabel = "xlabel", "ylabel"
title = "title"
titlefontsize = 28

In [99]:
location = "/Users/weilu/Research/server/oct_2017/23oct/memb_3_rg_0.1_lipid_1_topology/2d_qw_dis/t_all/force_0.0/"
arguments ={
    filename : location + "pmf-500.dat",
    x : 1,
    y : 2,
    z : 3,
    xmin, xmax : 0, 1,
    ymin, ymax : 0, 150,
    zmin, zmax : 0, 30,
    xlabel, ylabel : "xlabel", "ylabel",
    title : "title",
    titlefontsize : 28
}


  File "<ipython-input-99-0e619d8b795c>", line 7
    xmin, xmax : 0, 1,
        ^
SyntaxError: invalid syntax

In [64]:
def plot2d(**kargs):
    data = np.loadtxt(filename)
    data = data[~np.isnan(data).any(axis=1)] # remove rows with nan
    data = data[~(data[:,z] > zmax)] # remove rows of data for z not in [zmin zmax]
    data = data[~(data[:,z] < zmin)]

    xi = np.linspace(min(data[:,x]), max(data[:,x]), 20)
    yi = np.linspace(min(data[:,y]), max(data[:,y]), 20)
    zi = griddata((data[:,x], data[:,y]), data[:,z], (xi[None,:], yi[:,None]), method='linear')
    # plt.contour(xi, yi, zi, 50, linewidths=0.25,colors='k')
    jet = cm = plt.get_cmap('jet')
    print(jet)
    # plt.contourf(xi, yi, zi, 20, cmap='rainbow')
    plt.contourf(xi, yi, zi, 30, cmap='jet')
    plt.xlim(xmin, xmax)
    plt.ylim(ymin, ymax)
    plt.clim(zmin, zmax)
    plt.colorbar()

    plt.xlabel(xlabel)
    plt.ylabel(ylabel)
    plt.title(title, y=1.02, fontsize = titlefontsize)
    #plt.tight_layout()
    #plt.axis('equal')
    #plt.axes().set_aspect('equal')
    #plt.axes().set_aspect('scaled')
    # plt.savefig(args.outname, dpi=args.dpi, bbox_inches='tight')
    plt.show()

In [65]:
location = "/Users/weilu/Research/server/oct_2017/23oct/memb_3_rg_0.1_lipid_1_topology/2d_qw_dis/t_all/force_0.0/"
filename = location + "pmf-550.dat"
data = np.loadtxt(filename)
data = data[~np.isnan(data).any(axis=1)] # remove rows with nan
data = data[~(data[:,z] > zmax)] # remove rows of data for z not in [zmin zmax]
data = data[~(data[:,z] < zmin)]

xi = np.linspace(min(data[:,x]), max(data[:,x]), 20)
yi = np.linspace(min(data[:,y]), max(data[:,y]), 20)
zi = griddata((data[:,x], data[:,y]), data[:,z], (xi[None,:], yi[:,None]), method='linear')
# plt.contour(xi, yi, zi, 50, linewidths=0.25,colors='k')
jet = cm = plt.get_cmap('jet')
print(jet)
# plt.contourf(xi, yi, zi, 20, cmap='rainbow')
plt.figure()
plt.contourf(xi, yi, zi, 30, cmap='jet')
plt.xlim(xmin, xmax)
plt.clim(zmin, zmax)
plt.colorbar()

plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.title(title, y=1.02, fontsize = titlefontsize)
#plt.tight_layout()
#plt.axis('equal')
#plt.axes().set_aspect('equal')
#plt.axes().set_aspect('scaled')
# plt.savefig(args.outname, dpi=args.dpi, bbox_inches='tight')
plt.show()


---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-65-6c95b2873410> in <module>()
      1 location = "/Users/weilu/Research/server/oct_2017/23oct/memb_3_rg_0.1_lipid_1_topology/2d_qw_dis/t_all/force_0.0/"
      2 filename = location + "pmf-550.dat"
----> 3 data = np.loadtxt(filename)
      4 data = data[~np.isnan(data).any(axis=1)] # remove rows with nan
      5 data = data[~(data[:,z] > zmax)] # remove rows of data for z not in [zmin zmax]

~/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/oct_2017/23oct/memb_3_rg_0.1_lipid_1_topology/2d_qw_dis/t_all/force_0.0/pmf-550.dat'

In [ ]:
plot2d()

In [9]:
location = "/Users/weilu/Research/davinci/dec_2017/dec04_no_side_2/no_side_contraint_memb_3_rg_0.4_lipid_0.6_extended_350-550/2d_qc_dis/force_0.0/"
filename = location + "pmf-520.dat"
x = 1
y = 2
z = 3
xmin, xmax = 0, 1
ymin, ymax = 0, 150
zmin, zmax = 0, 15
xlabel, ylabel = "xlabel", "ylabel"
title = "title"
titlefontsize = 28

data = np.loadtxt(filename)
data = data[~np.isnan(data).any(axis=1)] # remove rows with nan
data = data[~(data[:,z] > zmax)] # remove rows of data for z not in [zmin zmax]
data = data[~(data[:,z] < zmin)]

xi = np.linspace(min(data[:,x]), max(data[:,x]), 20)
yi = np.linspace(min(data[:,y]), max(data[:,y]), 20)
zi = griddata((data[:,x], data[:,y]), data[:,z], (xi[None,:], yi[:,None]), method='linear')
# plt.contour(xi, yi, zi, 50, linewidths=0.25,colors='k')
jet = cm = plt.get_cmap('jet')
print(jet)
# plt.contourf(xi, yi, zi, 20, cmap='rainbow')
plt.figure()
plt.contourf(xi, yi, zi, 30, cmap='jet')
plt.xlim(xmin, xmax)
plt.clim(zmin, zmax)
plt.colorbar()

plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.title(title, y=1.02, fontsize = titlefontsize)
#plt.tight_layout()
#plt.axis('equal')
#plt.axes().set_aspect('equal')
#plt.axes().set_aspect('scaled')
# plt.savefig(args.outname, dpi=args.dpi, bbox_inches='tight')
plt.show()


<matplotlib.colors.LinearSegmentedColormap object at 0x10aefb6a0>

In [98]:
location = "/Users/weilu/Research/davinci/all_freeEnergy_calculation_nov11/next_gen_native_based_memb_3_rg_0.4_lipid_0.6_topology/2d_qw_dis/force_0.0/"
filename = location + "pmf-490.dat"
x = 1
y = 2
z = 3
xmin, xmax = 0, 1
ymin, ymax = 0, 150
zmin, zmax = 0, 30
xlabel, ylabel = "xlabel", "ylabel"
title = "title"
titlefontsize = 28

data = np.loadtxt(filename)
data = data[~np.isnan(data).any(axis=1)] # remove rows with nan
data = data[~(data[:,z] > zmax)] # remove rows of data for z not in [zmin zmax]
data = data[~(data[:,z] < zmin)]

xi = np.linspace(min(data[:,x]), max(data[:,x]), 20)
yi = np.linspace(min(data[:,y]), max(data[:,y]), 20)
zi = griddata((data[:,x], data[:,y]), data[:,z], (xi[None,:], yi[:,None]), method='linear')
# plt.contour(xi, yi, zi, 50, linewidths=0.25,colors='k')
jet = cm = plt.get_cmap('jet')
print(jet)
# plt.contourf(xi, yi, zi, 20, cmap='rainbow')
plt.figure()
plt.contourf(xi, yi, zi, 30, cmap='jet')
plt.xlim(xmin, xmax)
plt.clim(zmin, zmax)
plt.colorbar()

plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.title(title, y=1.02, fontsize = titlefontsize)
#plt.tight_layout()
#plt.axis('equal')
#plt.axes().set_aspect('equal')
#plt.axes().set_aspect('scaled')
# plt.savefig(args.outname, dpi=args.dpi, bbox_inches='tight')
plt.show()


<matplotlib.colors.LinearSegmentedColormap object at 0x10f383ef0>

In [96]:
location = "/Users/weilu/Research/davinci/nov_14_all_freeEnergy_calculation/stronger_bias_for_expand_distance_rgWidth_memb_3_rg_0.1_lipid_1_extended/2d_qw_dis/force_0.0/"
filename = location + "pmf-500.dat"
x = 1
y = 2
z = 3
xmin, xmax = 0, 1
ymin, ymax = 0, 150
zmin, zmax = 0, 30
xlabel, ylabel = "xlabel", "ylabel"
title = "title"
titlefontsize = 28

data = np.loadtxt(filename)
data = data[~np.isnan(data).any(axis=1)] # remove rows with nan
data = data[~(data[:,z] > zmax)] # remove rows of data for z not in [zmin zmax]
data = data[~(data[:,z] < zmin)]

xi = np.linspace(min(data[:,x]), max(data[:,x]), 20)
yi = np.linspace(min(data[:,y]), max(data[:,y]), 20)
zi = griddata((data[:,x], data[:,y]), data[:,z], (xi[None,:], yi[:,None]), method='linear')
# plt.contour(xi, yi, zi, 50, linewidths=0.25,colors='k')
jet = cm = plt.get_cmap('jet')
print(jet)
# plt.contourf(xi, yi, zi, 20, cmap='rainbow')
plt.figure()
plt.contourf(xi, yi, zi, 30, cmap='jet')
plt.xlim(xmin, xmax)
plt.clim(zmin, zmax)
plt.colorbar()

plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.title(title, y=1.02, fontsize = titlefontsize)
#plt.tight_layout()
#plt.axis('equal')
#plt.axes().set_aspect('equal')
#plt.axes().set_aspect('scaled')
# plt.savefig(args.outname, dpi=args.dpi, bbox_inches='tight')
plt.show()


<matplotlib.colors.LinearSegmentedColormap object at 0x10f383ef0>

In [24]:
location = "/Users/weilu/Research/davinci/all_freeEnergy_calculation_nov11/next_gen_native_based_memb_3_rg_0.4_lipid_0.6_extended/low_t_2d_qw_dis/force_0.0/"
filename = location + "pmf-350.dat"
x = 1
y = 2
z = 3
xmin, xmax = 0, 1
ymin, ymax = 0, 150
zmin, zmax = 0, 30
xlabel, ylabel = "xlabel", "ylabel"
title = "title"
titlefontsize = 28

data = np.loadtxt(filename)
data = data[~np.isnan(data).any(axis=1)] # remove rows with nan
data = data[~(data[:,z] > zmax)] # remove rows of data for z not in [zmin zmax]
data = data[~(data[:,z] < zmin)]

xi = np.linspace(min(data[:,x]), max(data[:,x]), 20)
yi = np.linspace(min(data[:,y]), max(data[:,y]), 20)
zi = griddata((data[:,x], data[:,y]), data[:,z], (xi[None,:], yi[:,None]), method='linear')
# plt.contour(xi, yi, zi, 50, linewidths=0.25,colors='k')
jet = cm = plt.get_cmap('jet')
print(jet)
# plt.contourf(xi, yi, zi, 20, cmap='rainbow')
plt.figure()
plt.contourf(xi, yi, zi, 30, cmap='jet')
plt.xlim(xmin, xmax)
plt.clim(zmin, zmax)
plt.colorbar()

plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.title(title, y=1.02, fontsize = titlefontsize)
#plt.tight_layout()
#plt.axis('equal')
#plt.axes().set_aspect('equal')
#plt.axes().set_aspect('scaled')
# plt.savefig(args.outname, dpi=args.dpi, bbox_inches='tight')
plt.show()


<matplotlib.colors.LinearSegmentedColormap object at 0x10f383ef0>

In [23]:
location = "/Users/weilu/Research/davinci/all_freeEnergy_calculation_nov11/next_gen_native_based_memb_3_rg_0.4_lipid_0.6_extended/2d_qw_dis/force_0.0/"
filename = location + "pmf-450.dat"
x = 1
y = 2
z = 3
xmin, xmax = 0, 1
ymin, ymax = 0, 150
zmin, zmax = 0, 30
xlabel, ylabel = "xlabel", "ylabel"
title = "title"
titlefontsize = 28

data = np.loadtxt(filename)
data = data[~np.isnan(data).any(axis=1)] # remove rows with nan
data = data[~(data[:,z] > zmax)] # remove rows of data for z not in [zmin zmax]
data = data[~(data[:,z] < zmin)]

xi = np.linspace(min(data[:,x]), max(data[:,x]), 20)
yi = np.linspace(min(data[:,y]), max(data[:,y]), 20)
zi = griddata((data[:,x], data[:,y]), data[:,z], (xi[None,:], yi[:,None]), method='linear')
# plt.contour(xi, yi, zi, 50, linewidths=0.25,colors='k')
jet = cm = plt.get_cmap('jet')
print(jet)
# plt.contourf(xi, yi, zi, 20, cmap='rainbow')
plt.figure()
plt.contourf(xi, yi, zi, 30, cmap='jet')
plt.xlim(xmin, xmax)
plt.clim(zmin, zmax)
plt.colorbar()

plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.title(title, y=1.02, fontsize = titlefontsize)
#plt.tight_layout()
#plt.axis('equal')
#plt.axes().set_aspect('equal')
#plt.axes().set_aspect('scaled')
# plt.savefig(args.outname, dpi=args.dpi, bbox_inches='tight')
plt.show()


<matplotlib.colors.LinearSegmentedColormap object at 0x10f383ef0>

In [74]:
location = "/Users/weilu/Research/davinci/extended/2d_qw_dis/t_all/force_0.1/"
filename = location + "pmf-550.dat"
x = 1
y = 2
z = 3
xmin, xmax = 0, 1
ymin, ymax = 0, 150
zmin, zmax = 0, 30
xlabel, ylabel = "xlabel", "ylabel"
title = "title"
titlefontsize = 28

data = np.loadtxt(filename)
data = data[~np.isnan(data).any(axis=1)] # remove rows with nan
data = data[~(data[:,z] > zmax)] # remove rows of data for z not in [zmin zmax]
data = data[~(data[:,z] < zmin)]

xi = np.linspace(min(data[:,x]), max(data[:,x]), 20)
yi = np.linspace(min(data[:,y]), max(data[:,y]), 20)
zi = griddata((data[:,x], data[:,y]), data[:,z], (xi[None,:], yi[:,None]), method='linear')
# plt.contour(xi, yi, zi, 50, linewidths=0.25,colors='k')
jet = cm = plt.get_cmap('jet')
print(jet)
# plt.contourf(xi, yi, zi, 20, cmap='rainbow')
plt.figure()
plt.contourf(xi, yi, zi, 30, cmap='jet')
plt.xlim(xmin, xmax)
plt.clim(zmin, zmax)
plt.colorbar()

plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.title(title, y=1.02, fontsize = titlefontsize)
#plt.tight_layout()
#plt.axis('equal')
#plt.axes().set_aspect('equal')
#plt.axes().set_aspect('scaled')
# plt.savefig(args.outname, dpi=args.dpi, bbox_inches='tight')
plt.show()


<matplotlib.colors.LinearSegmentedColormap object at 0x110040b70>

In [79]:
location = "/Users/weilu/Research/davinci/extended/2d_qw_dis/t_all/force_0.0/"
filename = location + "perturbation-6-pmf-550.dat"
x = 1
y = 2
z = 3
xmin, xmax = 0, 1
ymin, ymax = 0, 150
zmin, zmax = 0, 30
xlabel, ylabel = "xlabel", "ylabel"
title = "title"
titlefontsize = 28

data = np.loadtxt(filename)
data = data[~np.isnan(data).any(axis=1)] # remove rows with nan
data = data[~(data[:,z] > zmax)] # remove rows of data for z not in [zmin zmax]
data = data[~(data[:,z] < zmin)]

xi = np.linspace(min(data[:,x]), max(data[:,x]), 20)
yi = np.linspace(min(data[:,y]), max(data[:,y]), 20)
zi = griddata((data[:,x], data[:,y]), data[:,z], (xi[None,:], yi[:,None]), method='linear')
# plt.contour(xi, yi, zi, 50, linewidths=0.25,colors='k')
jet = cm = plt.get_cmap('jet')
print(jet)
# plt.contourf(xi, yi, zi, 20, cmap='rainbow')
plt.figure()
plt.contourf(xi, yi, zi, 30, cmap='jet')
plt.xlim(xmin, xmax)
plt.clim(zmin, zmax)
plt.colorbar()

plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.title(title, y=1.02, fontsize = titlefontsize)
#plt.tight_layout()
#plt.axis('equal')
#plt.axes().set_aspect('equal')
#plt.axes().set_aspect('scaled')
# plt.savefig(args.outname, dpi=args.dpi, bbox_inches='tight')
plt.show()


<matplotlib.colors.LinearSegmentedColormap object at 0x110040b70>

In [80]:
location = "/Users/weilu/Research/davinci/extended/2d_qw_dis/t_all/force_0.0/"
filename = location + "pmf-550.dat"
x = 1
y = 2
z = 3
xmin, xmax = 0, 1
ymin, ymax = 0, 150
zmin, zmax = 0, 30
xlabel, ylabel = "xlabel", "ylabel"
title = "title"
titlefontsize = 28

data = np.loadtxt(filename)
data = data[~np.isnan(data).any(axis=1)] # remove rows with nan
data = data[~(data[:,z] > zmax)] # remove rows of data for z not in [zmin zmax]
data = data[~(data[:,z] < zmin)]

xi = np.linspace(min(data[:,x]), max(data[:,x]), 20)
yi = np.linspace(min(data[:,y]), max(data[:,y]), 20)
zi = griddata((data[:,x], data[:,y]), data[:,z], (xi[None,:], yi[:,None]), method='linear')
# plt.contour(xi, yi, zi, 50, linewidths=0.25,colors='k')
jet = cm = plt.get_cmap('jet')
print(jet)
# plt.contourf(xi, yi, zi, 20, cmap='rainbow')
plt.figure()
plt.contourf(xi, yi, zi, 30, cmap='jet')
plt.xlim(xmin, xmax)
plt.clim(zmin, zmax)
plt.colorbar()

plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.title(title, y=1.02, fontsize = titlefontsize)
#plt.tight_layout()
#plt.axis('equal')
#plt.axes().set_aspect('equal')
#plt.axes().set_aspect('scaled')
# plt.savefig(args.outname, dpi=args.dpi, bbox_inches='tight')
plt.show()


<matplotlib.colors.LinearSegmentedColormap object at 0x110040b70>

In [14]:
%matplotlib notebook

In [28]:
location = "/Users/weilu/Research/server/oct_2017/23oct/memb_3_rg_0.1_lipid_1_extended/2d_qw_dis/t_all/force_0.0/"
filename = location + "pmf-500.dat"
data = np.loadtxt(filename)
data = data[~np.isnan(data).any(axis=1)] # remove rows with nan
data = data[~(data[:,z] > zmax)] # remove rows of data for z not in [zmin zmax]
data = data[~(data[:,z] < zmin)]

xi = np.linspace(min(data[:,x]), max(data[:,x]), 20)
yi = np.linspace(min(data[:,y]), max(data[:,y]), 20)
zi = griddata((data[:,x], data[:,y]), data[:,z], (xi[None,:], yi[:,None]), method='linear')
# plt.contour(xi, yi, zi, 50, linewidths=0.25,colors='k')
jet = cm = plt.get_cmap('jet')
print(jet)
# plt.contourf(xi, yi, zi, 20, cmap='rainbow')
plt.contourf(xi, yi, zi, 30, cmap='jet')
plt.xlim(xmin, xmax)
plt.ylim(ymin, ymax)
plt.clim(zmin, zmax)
plt.colorbar()

plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.title(title, y=1.02, fontsize = titlefontsize)
#plt.tight_layout()
#plt.axis('equal')
#plt.axes().set_aspect('equal')
#plt.axes().set_aspect('scaled')
# plt.savefig(args.outname, dpi=args.dpi, bbox_inches='tight')
plt.show()


<matplotlib.colors.LinearSegmentedColormap object at 0x113ab3780>

In [ ]:
location = "/Users/weilu/Research/server/oct_2017/23oct/memb_3_rg_0.1_lipid_1_extended/1d_dis/t_all/force_0.0"
file