In [1]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import datetime
import os
# from small_script.myFunctions import *



%matplotlib inline
%load_ext autoreload
%autoreload 2

In [2]:
plt.rcParams['figure.facecolor'] = 'w'
plt.rcParams['figure.figsize'] = [16.18033, 10]
plt.rcParams['figure.dpi'] = 200

In [3]:
# plt.rcParams['figure.figsize'] = [16.18033, 10]

dataset = {"old":"1R69, 1UTG, 3ICB, 256BA, 4CPV, 1CCR, 2MHR, 1MBA, 2FHA".split(", "),
            "new":"1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", "),
            "test":["t089", "t120", "t251", "top7", "1ubq", "t0766", "t0778", "t0782", "t0792", "t0803", "t0815", "t0833", "t0842", "t0844"]}
dataset["combined"] = dataset["old"] + dataset["new"]

# pdb_list, steps = dataset["old"]

def get_data(pre, pdb_list, simType="all_simulations", n_rum=30, rerun=1, formatName=True):
    # to get last 20 frame of each run
    _all = []
    for p in pdb_list:
        if formatName:
            name = p.lower()[:4]
        else:
            name = p
        for i in range(n_rum):
            for ii in range(rerun):
                location = pre + f"{simType}/{name}/simulation/{i}/{ii}/wham.dat"
                try:
                    tmp = pd.read_csv(location).tail(50).reset_index()
                    tmp.columns = tmp.columns.str.strip()
                    _all.append(tmp.assign(Run=i, Name=name, Rerun=ii))
                except Exception as e: 
                    print(e)
    data = pd.concat(_all)
    data["Run"] = "Run" + data["Run"].astype(str)
    return data

# pre = "/Users/weilu/Research/server/feb_2019/optimization_iter1/database/2gb1/"
# fileName = "movie.pdb"
def splitPDB(pre, fileName):
    location = f"{pre}/{fileName}"
    with open(location, "r") as f:
        a = f.readlines()
    i = 0
    tmp = ""
    for line in a:
        tmp += line
    #     os.system(f"echo '{line}' >> {pre}frame{i}")
        if line == "END\n":
            with open(f"{pre}frame{i}.pdb", "w") as out:
                out.write(tmp)
            i += 1
            tmp = ""


import subprocess
def getFromTerminal(CMD):
    return subprocess.Popen(CMD,stdout=subprocess.PIPE,shell=True).communicate()[0].decode()
def getSize(p):
    protein = p.lower()[:4]
    pre = f"/Users/weilu/Research/server/feb_2019/iterative_optimization_test_set/all_simulations/{protein}/{protein}/ssweight"
    a = getFromTerminal(f"wc {pre}")
#     print(a)
    n = int(a.split()[0])
    return n

single memory make the problem too simple.


In [6]:
pre = "/Users/weilu/Research/server/single_memory_optimization/"
folder = "iterative_optimization_combined_train_set_singleMemory"
pre = pre + folder + "/"
simulationType = "original"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=30, rerun=1, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data)


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

In [170]:
data_origin = pd.read_csv("/Users/weilu/Research/data/optimization/original_iterative_optimization_combined_train_set_with_frag_04-06.csv", index_col=0)

data = pd.read_csv("/Users/weilu/Research/data/optimization/iter0_iterative_optimization_combined_train_set_with_frag_04-08.csv", index_col=0)
data2 = pd.read_csv("/Users/weilu/Research/data/optimization/without_contact_iterative_optimization_combined_train_set_with_frag_04-09.csv", index_col=0)
data3 = pd.read_csv("/Users/weilu/Research/data/optimization/original_with_rg_iterative_optimization_combined_train_set_with_frag_04-09.csv", index_col=0)
# data4 = pd.read_csv("/Users/weilu/Research/data/optimization/iter7_normalized_90_iterative_optimization_combined_train_set_with_frag_04-08.csv", index_col=0)


d = pd.concat([
                data_origin.query("Rerun == 1").assign(Scheme="original"), 
    data3.assign(Scheme="original with rg"),
                data.assign(Scheme="iter0"),         
                 data2.assign(Scheme="without contact"), 
                 
#                 data4.query("Rerun == 1").assign(Scheme="iter7_90"), 
#                 data5.query("Rerun == 1").assign(Scheme="iter3_90"), 
#     data6.query("Rerun == 1").assign(Scheme="iter4"), 
#     data7.query("Rerun == 1").assign(Scheme="iter5"), 
              ])
sns.boxplot("Name", "Qw", hue="Scheme", data=d)
# sns.boxplot("Qw", "Name", hue="Scheme", data=d)


Out[170]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a2e453b70>

In [ ]:


In [3]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set_with_frag"
pre = pre + folder + "/"
simulationType = "iter6_with_rg"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=30, rerun=1, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data)


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

In [165]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set_with_frag"
pre = pre + folder + "/"
simulationType = "without_contact"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=30, rerun=1, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data)


Out[165]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a2fc57978>

In [164]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set_with_frag"
pre = pre + folder + "/"
simulationType = "original_with_rg"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=30, rerun=1, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data)


Out[164]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a2df184a8>

In [163]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set_with_frag"
pre = pre + folder + "/"
simulationType = "iter0"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=30, rerun=1, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data)


Out[163]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a2e28fcf8>

In [159]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set_with_frag"
pre = pre + folder + "/"
simulationType = "iter7_normalized_90"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=10, rerun=2, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data.query("Rerun == 1"))


Out[159]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a2ca6a4a8>

In [168]:
data_origin = pd.read_csv("/Users/weilu/Research/data/optimization/original_iterative_optimization_combined_train_set_with_frag_04-06.csv", index_col=0)

data = pd.read_csv("/Users/weilu/Research/data/optimization/iter5_normalized_noFrag_iterative_optimization_combined_train_set_with_frag_04-06.csv", index_col=0)
data2 = pd.read_csv("/Users/weilu/Research/data/optimization/iter6_normalized_noFrag_iterative_optimization_combined_train_set_with_frag_04-07.csv", index_col=0)

data3 = pd.read_csv("/Users/weilu/Research/data/optimization/iter7_normalized_iterative_optimization_combined_train_set_with_frag_04-08.csv", index_col=0)
data4 = pd.read_csv("/Users/weilu/Research/data/optimization/iter7_normalized_90_iterative_optimization_combined_train_set_with_frag_04-08.csv", index_col=0)


d = pd.concat([
                data_origin.query("Rerun == 1").assign(Scheme="original"), 
                data.query("Rerun == 1").assign(Scheme="iter5"),         
                 data2.query("Rerun == 1").assign(Scheme="iter6"), 
                data3.query("Rerun == 1").assign(Scheme="iter7"), 
#                 data4.query("Rerun == 1").assign(Scheme="iter7_90"), 
#                 data5.query("Rerun == 1").assign(Scheme="iter3_90"), 
#     data6.query("Rerun == 1").assign(Scheme="iter4"), 
#     data7.query("Rerun == 1").assign(Scheme="iter5"), 
              ])
sns.boxplot("Name", "Qw", hue="Scheme", data=d)
# sns.boxplot("Qw", "Name", hue="Scheme", data=d)


Out[168]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a2f6d17f0>

In [169]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set_with_frag"
pre = pre + folder + "/"
simulationType = "iter7_normalized"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=10, rerun=2, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data.query("Rerun == 1"))


Out[169]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a23ae3da0>

In [155]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set_with_frag"
pre = pre + folder + "/"
simulationType = "iter6_normalized_noFrag"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=10, rerun=2, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data.query("Rerun == 1"))


Out[155]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a2861c5c0>

In [153]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set_with_frag"
pre = pre + folder + "/"
simulationType = "original"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=10, rerun=2, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data.query("Rerun == 1"))


[Errno 2] File b'/Users/weilu/Research/server/april_2019/iterative_optimization_combined_train_set_with_frag/original/2fha/simulation/0/1/wham.dat' does not exist: b'/Users/weilu/Research/server/april_2019/iterative_optimization_combined_train_set_with_frag/original/2fha/simulation/0/1/wham.dat'
[Errno 2] File b'/Users/weilu/Research/server/april_2019/iterative_optimization_combined_train_set_with_frag/original/2fha/simulation/2/1/wham.dat' does not exist: b'/Users/weilu/Research/server/april_2019/iterative_optimization_combined_train_set_with_frag/original/2fha/simulation/2/1/wham.dat'
[Errno 2] File b'/Users/weilu/Research/server/april_2019/iterative_optimization_combined_train_set_with_frag/original/2fha/simulation/3/1/wham.dat' does not exist: b'/Users/weilu/Research/server/april_2019/iterative_optimization_combined_train_set_with_frag/original/2fha/simulation/3/1/wham.dat'
[Errno 2] File b'/Users/weilu/Research/server/april_2019/iterative_optimization_combined_train_set_with_frag/original/2fha/simulation/4/1/wham.dat' does not exist: b'/Users/weilu/Research/server/april_2019/iterative_optimization_combined_train_set_with_frag/original/2fha/simulation/4/1/wham.dat'
[Errno 2] File b'/Users/weilu/Research/server/april_2019/iterative_optimization_combined_train_set_with_frag/original/2fha/simulation/5/1/wham.dat' does not exist: b'/Users/weilu/Research/server/april_2019/iterative_optimization_combined_train_set_with_frag/original/2fha/simulation/5/1/wham.dat'
[Errno 2] File b'/Users/weilu/Research/server/april_2019/iterative_optimization_combined_train_set_with_frag/original/2fha/simulation/7/1/wham.dat' does not exist: b'/Users/weilu/Research/server/april_2019/iterative_optimization_combined_train_set_with_frag/original/2fha/simulation/7/1/wham.dat'
[Errno 2] File b'/Users/weilu/Research/server/april_2019/iterative_optimization_combined_train_set_with_frag/original/2fha/simulation/8/1/wham.dat' does not exist: b'/Users/weilu/Research/server/april_2019/iterative_optimization_combined_train_set_with_frag/original/2fha/simulation/8/1/wham.dat'
[Errno 2] File b'/Users/weilu/Research/server/april_2019/iterative_optimization_combined_train_set_with_frag/original/2fha/simulation/9/1/wham.dat' does not exist: b'/Users/weilu/Research/server/april_2019/iterative_optimization_combined_train_set_with_frag/original/2fha/simulation/9/1/wham.dat'
Out[153]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a26ad3b00>

In [152]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set_with_frag"
pre = pre + folder + "/"
simulationType = "iter5_normalized_noFrag"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=10, rerun=2, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data.query("Rerun == 1"))


Out[152]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a283bd320>

In [14]:
%matplotlib inline
plt.rcParams['figure.facecolor'] = 'w'
plt.rcParams['figure.figsize'] = [16.18033, 10]
plt.rcParams['figure.dpi'] = 200

In [19]:
data_origin = pd.read_csv("/Users/weilu/Research/data/optimization/original_iterative_optimization_combined_train_set_04-01.csv", index_col=0)

data = pd.read_csv("/Users/weilu/Research/data/optimization/iter0_normalized_noFrag_iterative_optimization_combined_train_set_03-31.csv", index_col=0)
data2 = pd.read_csv("/Users/weilu/Research/data/optimization/iter1_normalized_noFrag_iterative_optimization_combined_train_set_03-31.csv", index_col=0)
data3 = pd.read_csv("/Users/weilu/Research/data/optimization/iter2_normalized_noFrag_iterative_optimization_combined_train_set_04-01.csv", index_col=0)
data4 = pd.read_csv("/Users/weilu/Research/data/optimization/iter3_normalized_noFrag_iterative_optimization_combined_train_set_04-03.csv", index_col=0)
data5 = pd.read_csv("/Users/weilu/Research/data/optimization/iter3_normalized_noFrag_90_iterative_optimization_combined_train_set_04-03.csv", index_col=0)
data6 = pd.read_csv("/Users/weilu/Research/data/optimization/iter4_normalized_noFrag_iterative_optimization_combined_train_set_04-03.csv", index_col=0)
data7 = pd.read_csv("/Users/weilu/Research/data/optimization/iter5_normalized_noFrag_iterative_optimization_combined_train_set_04-04.csv", index_col=0)


d = pd.concat([
                data_origin.query("Rerun == 1").assign(Scheme="original"), 
                data.query("Rerun == 1").assign(Scheme="iter0"),         
                 data2.query("Rerun == 1").assign(Scheme="iter1"), 
                data3.query("Rerun == 1").assign(Scheme="iter2"), 
                data4.query("Rerun == 1").assign(Scheme="iter3"), 
#                 data5.query("Rerun == 1").assign(Scheme="iter3_90"), 
    data6.query("Rerun == 1").assign(Scheme="iter4"), 
    data7.query("Rerun == 1").assign(Scheme="iter5"), 
              ])
sns.boxplot("Name", "Qw", hue="Scheme", data=d)
# sns.boxplot("Qw", "Name", hue="Scheme", data=d)


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

In [77]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set"
pre = pre + folder + "/"
simulationType = "iter5_normalized_noFrag"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=10, rerun=2, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data.query("Rerun == 1"))


Out[77]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a2030fb70>

In [75]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set"
pre = pre + folder + "/"
simulationType = "iter4_normalized_noFrag"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=10, rerun=2, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data.query("Rerun == 1"))


Out[75]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a221b6908>

In [70]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set"
pre = pre + folder + "/"
simulationType = "iter3_normalized_noFrag_90"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=10, rerun=2, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data.query("Rerun == 1"))


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

In [16]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set"
pre = pre + folder + "/"
simulationType = "original"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=10, rerun=2, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data.query("Rerun == 1"))


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

In [71]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set"
pre = pre + folder + "/"
simulationType = "iter3_normalized_noFrag"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=10, rerun=2, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data.query("Rerun == 1"))


Out[71]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a202b66a0>

In [57]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set"
pre = pre + folder + "/"
simulationType = "iter2_normalized_noFrag"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=10, rerun=2, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data.query("Rerun == 1"))


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

In [13]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set"
pre = pre + folder + "/"
simulationType = "iter0_normalized_noFrag"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=10, rerun=2, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data.query("Rerun == 1"))


Out[13]:
<matplotlib.axes._subplots.AxesSubplot at 0x104a7f668>

In [14]:
pre = "/Users/weilu/Research/server/april_2019/"
folder = "iterative_optimization_combined_train_set"
pre = pre + folder + "/"
simulationType = "iter1_normalized_noFrag"
today = datetime.datetime.today().strftime('%m-%d')
# pdb_list, steps = dataset["test"]
pdb_list = dataset["combined"]
# pdb_list = "1FC2C, 1ENH, 2GB1, 2CRO, 1CTF, 4ICB".split(", ")
data = get_data(pre, pdb_list, simType=simulationType, n_rum=10, rerun=2, formatName=True)
data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/{simulationType}_{folder}_{today}.csv")
# data.reset_index(drop=True).to_csv(f"/Users/weilu/Research/data/optimization/withoutContact_{today}.csv")
sns.boxplot("Name", "Qw", data=data.query("Rerun == 1"))


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

In [10]:
data.head()


Out[10]:
index Steps Qw Rg Tc Energy Run Name Rerun
0 950 3804000 0.111828 22.666299 23 27.342100 Run0 1r69 0
1 951 3808000 0.087000 23.804092 17 11.928062 Run0 1r69 0
2 952 3812000 0.053962 24.655929 14 45.089979 Run0 1r69 0
3 953 3816000 0.088343 24.288471 21 63.482033 Run0 1r69 0
4 954 3820000 0.118645 24.264631 24 50.847944 Run0 1r69 0

In [11]:
data.tail()


Out[11]:
index Steps Qw Rg Tc Energy Run Name Rerun
45 1995 15984000 0.294303 12.372903 105 -230.151421 Run9 4icb 1
46 1996 15988000 0.290072 12.530187 100 -248.805133 Run9 4icb 1
47 1997 15992000 0.282667 13.151885 90 -237.669696 Run9 4icb 1
48 1998 15996000 0.279217 12.576629 95 -248.688889 Run9 4icb 1
49 1999 16000000 0.294767 12.072510 97 -250.027118 Run9 4icb 1

In [18]:
data = pd.read_csv("/Users/weilu/Research/data/optimization/single_iterative_optimization_old_set_with_frag_03-28.csv", index_col=0)
data2 = pd.read_csv("/Users/weilu/Research/data/optimization/iter7_2_iterative_optimization_old_set_with_frag_03-28.csv", index_col=0)

d = pd.concat([
                data.assign(Scheme="original"), 
                 data2.assign(Scheme="iter7"), 

              ])
sns.boxplot("Name", "Qw", hue="Scheme", data=d)


Out[18]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a1b36dcf8>

In [66]:
data = pd.read_csv("/Users/weilu/Research/data/optimization/single_iterative_optimization_new_set_with_frag_04-02.csv", index_col=0)
data2 = pd.read_csv("/Users/weilu/Research/data/optimization/iter7_2_iterative_optimization_new_set_with_frag_04-01.csv", index_col=0)

d = pd.concat([
                data.assign(Scheme="original"), 
                 data2.assign(Scheme="iter7"), 

              ])
sns.boxplot("Name", "Qw", hue="Scheme", data=d)


Out[66]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a1b3e59b0>