-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsample.py
102 lines (91 loc) · 2.13 KB
/
sample.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/usr/bin/python3
from gmxscript import *
with system('1AKI'):
# System preparation
pdb2gmx(
ff = 'gromos54a7',
water = 'spce',
f = PDB['1AKI'],
o = 'prot.gro',
p = 'topol.top'
)
editconf(
f = 'prot.gro',
o = 'pbc.gro',
bt = 'dodecahedron',
d = 1.4
)
solvate(
cp = 'pbc.gro',
cs = 'spc216.gro',
o = 'sol.gro',
p = 'topol.top'
)
grompp(
f = MDP['ions.mdp'],
c = 'sol.gro',
o = 'ions.tpr',
p = 'topol.top'
)
genion(
s = 'ions.tpr',
o = 'ions.gro',
neutral = 1,
p = "topol.top",
stdin = """
SOL
"""
)
# Steep descent energy minimization
grompp(
f = MDP['em.mdp', {
'integrator': 'steep',
'emtol' : 10.0,
'nsteps' : 500,
}],
c = 'ions.gro',
o = 'sd.tpr',
p = 'topol.top'
)
mdrun(deffnm = 'sd')
# Conjugate gradient energy minimization
grompp(
f = MDP['em.mdp', {
'integrator': 'cg',
'emtol' : 1.0,
'nsteps' : 500,
}],
c = 'sd.gro',
o = 'cg.tpr',
p = 'topol.top'
)
mdrun(deffnm = 'cg')
# Position restrained molecular dynamics
grompp(
f = MDP['md.mdp', {
'steps' : 250000,
'define' : '-DPOSRES',
'continuation': False,
'gen_vel' : True
}],
c = 'cg.gro',
o = 'mdposres.tpr',
p = 'topol.top'
)
mdrun(deffnm = 'mdposres')
# Molecular dynamics
grompp(
f = MDP['md.mdp', {
'steps' : 250000,
'continuation': True,
'gen_vel' : False,
'tcoupl' : 'V-rescale',
'tc_grps' : ['Protein', 'Non-protein'],
'tau_t' : [0.1, 0.1],
'ref_t' : [298, 298]
}],
c = 'mdposres.gro',
o = 'md.tpr',
p = 'topol.top'
)
mdrun(deffnm = 'md')