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