-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathfinal_move.py
More file actions
executable file
·55 lines (50 loc) · 2.1 KB
/
final_move.py
File metadata and controls
executable file
·55 lines (50 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env python3
import os
import argparse
import sys
from time import sleep
import subprocess
import glob
mypath = os.environ["PATH"]
os.environ["PATH"] = "/home/wl45/python/bin:/home/wl45/opt:" + mypath
my_env = os.environ.copy()
parser = argparse.ArgumentParser(
description="This is a python3 script to\
automatically analysis the simulation")
# parser.add_argument("template", help="the name of template file")
# parser.add_argument("-n", "--number", type=int, default=20,
# help="Number of simulation run")
parser.add_argument("-o", "--offAuto", help="turn off from Read from \
config file", action="store_true")
args = parser.parse_args()
# n = args.number
# protein_name = args.template.strip('/')
folder_list = glob.glob("*")
print(folder_list)
# sys.exit()
#folder_list = ['T089_ha', 'T089_he', 'T120_ha', 'T120_he', 'T251_ha', 'T251_he', 'top7_ha', 'top7_he', '1UBQ_ha', '1UBQ_he']
folder_list = ['T251_lp', 'top7_lp', '1UBQ_lp', 'T120_lp']
os.system("mkdir -p weilu_jul_27")
for folder in folder_list:
os.chdir(folder)
if(not args.offAuto):
exec (open("config.py").read())
n = number_of_run
steps = simulation_steps
os.system("mkdir -p ../weilu/"+folder+"/lowest_energy")
os.system("mkdir -p ../weilu/"+folder+"/best_q")
os.system("sort analysis/list_of_max_q > ../weilu/q_"+folder+".dat")
for i in range(n):
# move
os.chdir("analysis/"+str(i))
os.system("cp chosen.pdb ../../../weilu/"+folder+"/best_q/"+str(i)+".pdb")
# os.system("cp ~/opt/plot_scripts/print_chosen.pml .")
# os.system("/usr/local/bin/pymol -qc -r print_chosen.pml")
# os.system("cp chosen.png ../../results/chosen_"+str(i)+".png")
# os.system("cp final.png ../../results/final_"+str(i)+".png")
# os.system("cp final.pdb ../../results/final_"+str(i)+".pdb")
# os.system("cp final.txt ../../results/final_"+str(i)+".txt")
# os.system("cp lowest_energy.pdb \
# ../../results/lowest_energy/lowest_energy_" + str(i)+".pdb")
os.chdir("../..")
os.chdir("..")