-
Notifications
You must be signed in to change notification settings - Fork 0
/
automate_MD.py
86 lines (74 loc) · 2.1 KB
/
automate_MD.py
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import subprocess as sp
# Runs NVT
NVT = sp.run(["gmx",
"grompp",
"-f", "nvt.mdp",
"-c", "em.gro",
"-r", "em.gro",
"-p", "topol.top",
"-o", "nvt.tpr"])
RUN_NVT = sp.run(["gmx",
"mdrun",
"-deffnm", "nvt",
"-v"])
# Runs NPT
NPT = sp.run(["gmx",
"grompp",
"-f", "npt.mdp",
"-c", "nvt.gro",
"-r", "nvt.gro",
"-p", "topol.top",
"-o", "npt.tpr"])
RUN_NPT = sp.run(["gmx",
"mdrun",
"-deffnm", "npt",
"-v"])
# Runs MD
MD1 = sp.run(["gmx",
"grompp",
"-f", "md.mdp",
"-c", "npt.gro",
"-r", "npt.gro",
"-p", "topol.top",
"-o", "md1.tpr"])
RUN_MD1 = sp.run(["gmx",
"mdrun",
"-deffnm", "md1",
"-v"])
# MD Continuation
# Appends 10 ns to the initial MD run
MD2 = sp.run(["gmx",
"convert-tpr",
"-s", "md1.tpr",
"-extend", "10000",
"-o", "md2.tpr"])
RUN_MD2 = sp.run(["gmx",
"mdrun",
"-deffnm", "md2",
"-cpi", "md1.cpt",
"-noappend",
"-v"])
# Appends 10 ns to the previous MD run
MD3 = sp.run(["gmx",
"convert-tpr",
"-s", "md2.tpr",
"-extend", "10000",
"-o", "md3.tpr"])
RUN_MD3 = sp.run(["gmx",
"mdrun",
"-deffnm", "md3",
"-cpi", "md2.cpt",
"-noappend",
"-v"])
# Appends 20 ns to the previous MD run
MD4 = sp.run(["gmx",
"convert-tpr",
"-s", "md3.tpr",
"-extend", "20000",
"-o", "md4.tpr"])
RUN_MD4 = sp.run(["gmx",
"mdrun",
"-deffnm", "md4",
"-cpi", "md3.cpt",
"-noappend",
"-v"])