1
2
3
4
5
6
7
8
9
10
11
12 from tempfile import mktemp
13 import os
14 from MMTK import Units
15
16
17 template = {'REF' : {}, 'NEW' : {}}
18
19 template['REF']['title'] = 'Density Of States'
20 template['REF']['log_file'] = 'logfile.log'
21 template['REF']['output_files'] = {'dos': 'test.plot'}
22 template['REF']['projection_vector'] = None
23 template['REF']['units_length'] = Units.nm
24 template['REF']['units_frequency'] = 1/Units.ps
25 template['REF']['frequency_points'] = 1000000
26
27 template['NEW']['pyroserver'] = 'NO'
28 template['NEW']['projection'] = None
29 template['NEW']['dos'] = mktemp(suffix = '_DOS.nc', prefix = 'nMOLDYN_')
30 template['NEW']['analysis'] = 'CartesianDensityOfStates_serial(self.testParameters)'
31
32 test = []
33
34
35 test.append({'REF' : {}, 'NEW' : {}})
36
37 test[-1]['REF']['trajectory'] = ['../TrajectoryTest1.nc']
38 test[-1]['REF']['time_info'] = (0, 49, 1)
39 test[-1]['REF']['weights'] = "mass"
40 test[-1]['REF']['atoms_pdb'] = '../TrajectoryTest1_2.pdb'
41 test[-1]['REF']['deuter'] = None
42 test[-1]['REF']['ft_window'] = 20.0
43
44
45 test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest1.nc')
46 test[-1]['NEW']['timeinfo'] = '1:49:1'
47 test[-1]['NEW']['weights'] = 'mass'
48 test[-1]['NEW']['subset'] = 'filename %s' % os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest1_2.nms')
49 test[-1]['NEW']['deuteration'] = None
50 test[-1]['NEW']['differentiation'] = 0
51 test[-1]['NEW']['fftwindow'] = 100./20.0
52
53
54
55 test.append({'REF' : {}, 'NEW' : {}})
56
57 test[-1]['REF']['trajectory'] = ['../TrajectoryTest1.nc']
58 test[-1]['REF']['time_info'] = (0, 49, 4)
59 test[-1]['REF']['weights'] = "none"
60 test[-1]['REF']['atoms'] = {'Protein.0': ["BackBone"]}
61 test[-1]['REF']['deuter'] = None
62 test[-1]['REF']['ft_window'] = 10.0
63
64
65 test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest1.nc')
66 test[-1]['NEW']['timeinfo'] = '1:49:4'
67 test[-1]['NEW']['weights'] = 'equal'
68 test[-1]['NEW']['subset'] = 'objectname P892 misc backbone'
69 test[-1]['NEW']['deuteration'] = None
70 test[-1]['NEW']['differentiation'] = 0
71 test[-1]['NEW']['fftwindow'] = 100./10.0
72
73
74
75 test.append({'REF' : {}, 'NEW' : {}})
76
77 test[-1]['REF']['trajectory'] = ['../TrajectoryTest1.nc']
78 test[-1]['REF']['time_info'] = (8, 29, 2)
79 test[-1]['REF']['weights'] = 'none'
80 test[-1]['REF']['atoms'] = {'Protein.0': ['Methyl']}
81 test[-1]['REF']['deuter'] = None
82 test[-1]['REF']['ft_window'] = 5.0
83
84
85 test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest1.nc')
86 test[-1]['NEW']['timeinfo'] = '9:29:2'
87 test[-1]['NEW']['weights'] = 'equal'
88 test[-1]['NEW']['subset'] = 'objectname P892 chemfragment methyl'
89 test[-1]['NEW']['deuteration'] = None
90 test[-1]['NEW']['differentiation'] = 0
91 test[-1]['NEW']['fftwindow'] = 100./5.0
92
93
94
95 test.append({'REF' : {}, 'NEW' : {}})
96
97 test[-1]['REF']['trajectory'] = ['../TrajectoryTest1.nc']
98 test[-1]['REF']['time_info'] = (16, 39, 4)
99 test[-1]['REF']['weights'] = 'none'
100 test[-1]['REF']['atoms'] = {'Protein.0': ['*']}
101 test[-1]['REF']['deuter'] = {'Protein.0': ['Methyl']}
102 test[-1]['REF']['ft_window'] = 20.0
103
104
105 test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest1.nc')
106 test[-1]['NEW']['timeinfo'] = '17:39:4'
107 test[-1]['NEW']['weights'] = 'equal'
108 test[-1]['NEW']['subset'] = 'objectname P892 chainname *'
109 test[-1]['NEW']['deuteration'] = 'objectname P892 chemfragment methyl'
110 test[-1]['NEW']['differentiation'] = 0
111 test[-1]['NEW']['fftwindow'] = 100./20.0
112
113
114
115 test.append({'REF' : {}, 'NEW' : {}})
116
117 test[-1]['REF']['trajectory'] = ['../TrajectoryTest1.nc']
118 test[-1]['REF']['time_info'] = (1, 20, 2)
119 test[-1]['REF']['weights'] = 'none'
120 test[-1]['REF']['atoms'] = {'Protein.0': ['Oxygen','Nitrogen']}
121 test[-1]['REF']['deuter'] = None
122 test[-1]['REF']['ft_window'] = 4.0
123
124
125 test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest1.nc')
126 test[-1]['NEW']['timeinfo'] = '2:20:2'
127 test[-1]['NEW']['weights'] = 'equal'
128 test[-1]['NEW']['subset'] = 'objectname P892 atomelement oxygen,nitrogen'
129 test[-1]['NEW']['deuteration'] = None
130 test[-1]['NEW']['differentiation'] = 0
131 test[-1]['NEW']['fftwindow'] = 100./4.0
132
133
134
135 test.append({'REF' : {}, 'NEW' : {}})
136
137 test[-1]['REF']['trajectory'] = ['../TrajectoryTest1.nc']
138 test[-1]['REF']['time_info'] = (1, 20, 2)
139 test[-1]['REF']['weights'] = 'mass'
140 test[-1]['REF']['atoms'] = {'Protein.0': ['Nitrogen']}
141 test[-1]['REF']['deuter'] = None
142 test[-1]['REF']['ft_window'] = 40.0
143
144
145 test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest1.nc')
146 test[-1]['NEW']['timeinfo'] = "2:20:2"
147 test[-1]['NEW']['weights'] = 'mass'
148 test[-1]['NEW']['subset'] = 'objectname P892 atomelement nitrogen'
149 test[-1]['NEW']['deuteration'] = None
150 test[-1]['NEW']['differentiation'] = 0
151 test[-1]['NEW']['fftwindow'] = 100./40.0
152
153
154
155 test.append({'REF' : {}, 'NEW' : {}})
156
157 test[-1]['REF']['trajectory'] = ['../TrajectoryTest1.nc']
158 test[-1]['REF']['time_info'] = (1, 20, 2)
159 test[-1]['REF']['weights'] = 'none'
160 test[-1]['REF']['atoms'] = {'Protein.0': ['Carbon']}
161 test[-1]['REF']['deuter'] = None
162 test[-1]['REF']['ft_window'] = 20.0
163
164
165 test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest1.nc')
166 test[-1]['NEW']['timeinfo'] = "2:20:2"
167 test[-1]['NEW']['weights'] = 'equal'
168 test[-1]['NEW']['subset'] = 'objectname P892 atomelement carbon'
169 test[-1]['NEW']['deuteration'] = None
170 test[-1]['NEW']['differentiation'] = 0
171 test[-1]['NEW']['fftwindow'] = 100./20.0
172
173
174
175 test.append({'REF' : {}, 'NEW' : {}})
176
177 test[-1]['REF']['trajectory'] = ['../TrajectoryTest2.nc']
178 test[-1]['REF']['time_info'] = (1, 20, 2)
179 test[-1]['REF']['weights'] = 'mass'
180 test[-1]['REF']['atoms_pdb'] = '../TrajectoryTest2_1.pdb'
181 test[-1]['REF']['deuter'] = None
182 test[-1]['REF']['ft_window'] = 80.0
183
184
185 test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest2.nc')
186 test[-1]['NEW']['timeinfo'] = "2:20:2"
187 test[-1]['NEW']['weights'] = 'mass'
188 test[-1]['NEW']['subset'] = 'filename %s' % os.path.join(nmoldyn_package_path,"Tests",'TrajectoryTest2_1.nms')
189 test[-1]['NEW']['deuteration'] = None
190 test[-1]['NEW']['differentiation'] = 1
191 test[-1]['NEW']['fftwindow'] = 100./80.0
192
193
194
195 test.append({'REF' : {}, 'NEW' : {}})
196
197 test[-1]['REF']['trajectory'] = ['../TrajectoryTest2.nc']
198 test[-1]['REF']['time_info'] = (1, 20, 1)
199 test[-1]['REF']['weights'] = 'none'
200 test[-1]['REF']['atoms'] = {'Protein.0': ['Hydrogen']}
201 test[-1]['REF']['deuter'] = None
202 test[-1]['REF']['ft_window'] = 4.0
203
204
205 test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest2.nc')
206 test[-1]['NEW']['timeinfo'] = "2:20:1"
207 test[-1]['NEW']['weights'] = 'equal'
208 test[-1]['NEW']['subset'] = 'objectname P1960 atomelement hydrogen'
209 test[-1]['NEW']['deuteration'] = None
210 test[-1]['NEW']['differentiation'] = 1
211 test[-1]['NEW']['fftwindow'] = 100./4.0
212
213
214
215 test.append({'REF' : {}, 'NEW' : {}})
216
217 test[-1]['REF']['trajectory'] = ['../TrajectoryTest2.nc']
218 test[-1]['REF']['time_info'] = (1, 20, 2)
219 test[-1]['REF']['weights'] = 'none'
220 test[-1]['REF']['atoms'] = {'Protein.0': ['SideChain']}
221 test[-1]['REF']['deuter'] = {'Protein.0': ['Hydrogen']}
222 test[-1]['REF']['ft_window'] = 20.0
223
224
225 test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest2.nc')
226 test[-1]['NEW']['timeinfo'] = "2:20:2"
227 test[-1]['NEW']['weights'] = 'equal'
228 test[-1]['NEW']['subset'] = 'objectname P1960 misc sidechains'
229 test[-1]['NEW']['deuteration'] = 'objectname P1960 atomelement hydrogen'
230 test[-1]['NEW']['differentiation'] = 1
231 test[-1]['NEW']['fftwindow'] = 100./20.0
232
233
234
235 test.append({'REF' : {}, 'NEW' : {}})
236
237 test[-1]['REF']['trajectory'] = ['../TrajectoryTest2.nc']
238 test[-1]['REF']['time_info'] = (1, 20, 2)
239 test[-1]['REF']['weights'] = 'none'
240 test[-1]['REF']['atoms'] = {'Protein.0': ['SideChain']}
241 test[-1]['REF']['deuter'] = {'Protein.0': ['SideChain']}
242 test[-1]['REF']['ft_window'] = 10.0
243
244
245 test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest2.nc')
246 test[-1]['NEW']['timeinfo'] = "2:20:2"
247 test[-1]['NEW']['weights'] = 'equal'
248 test[-1]['NEW']['subset'] = 'objectname P1960 misc sidechains'
249 test[-1]['NEW']['deuteration'] = 'objectname P1960 misc sidechains'
250 test[-1]['NEW']['differentiation'] = 1
251 test[-1]['NEW']['fftwindow'] = 100./10.0
252
253
254
255 test.append({'REF' : {}, 'NEW' : {}})
256
257 test[-1]['REF']['trajectory'] = ['../TrajectoryTest2.nc']
258 test[-1]['REF']['time_info'] = (1, 20, 2)
259 test[-1]['REF']['weights'] = 'none'
260 test[-1]['REF']['atoms'] = {'Protein.0': ['BackBone','SideChain']}
261 test[-1]['REF']['deuter'] = {'Protein.0': ['SideChain']}
262 test[-1]['REF']['ft_window'] = 20.0
263
264
265 test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest2.nc')
266 test[-1]['NEW']['timeinfo'] = "2:20:2"
267 test[-1]['NEW']['weights'] = 'equal'
268 test[-1]['NEW']['subset'] = 'objectname P1960 misc backbone,sidechains'
269 test[-1]['NEW']['deuteration'] = 'objectname P1960 misc sidechains'
270 test[-1]['NEW']['differentiation'] = 1
271 test[-1]['NEW']['fftwindow'] = 100./20.0
272
273
274
275 test.append({'REF' : {}, 'NEW' : {}})
276
277 test[-1]['REF']['trajectory'] = ['../TrajectoryTest2.nc']
278 test[-1]['REF']['time_info'] = (1, 20, 2)
279 test[-1]['REF']['weights'] = 'none'
280 test[-1]['REF']['atoms'] = {'Protein.0': ['Oxygen', 'Nitrogen', 'Carbon', 'Hydrogen']}
281 test[-1]['REF']['deuter'] = {'Protein.0': ['BackBone']}
282 test[-1]['REF']['ft_window'] = 20.0
283
284
285 test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest2.nc')
286 test[-1]['NEW']['timeinfo'] = "2:20:2"
287 test[-1]['NEW']['weights'] = 'equal'
288 test[-1]['NEW']['subset'] = 'objectname P1960 atomelement carbon,nitrogen,oxygen,hydrogen'
289 test[-1]['NEW']['deuteration'] = 'objectname P1960 misc backbone'
290 test[-1]['NEW']['differentiation'] = 1
291 test[-1]['NEW']['fftwindow'] = 100./20.0
292
293
294
295 test.append({'REF' : {}, 'NEW' : {}})
296
297 test[-1]['REF']['trajectory'] = ['../TrajectoryTest2.nc']
298 test[-1]['REF']['time_info'] = (1, 40, 2)
299 test[-1]['REF']['weights'] = 'none'
300 test[-1]['REF']['atoms'] = {'Protein.0': ['C_alpha']}
301 test[-1]['REF']['deuter'] = None
302 test[-1]['REF']['ft_window'] = 12.0
303
304
305 test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest2.nc')
306 test[-1]['NEW']['timeinfo'] = "2:40:2"
307 test[-1]['NEW']['weights'] = 'equal'
308 test[-1]['NEW']['subset'] = 'objectname P1960 chemfragment c_alphas'
309 test[-1]['NEW']['deuteration'] = None
310 test[-1]['NEW']['differentiation'] = 1
311 test[-1]['NEW']['fftwindow'] = 100./12.0
312