1
2
3
4
5
6
7
8
9
10 from tempfile import mktemp
11 import os
12 from MMTK import Units
13
14
15 template = {'REF' : {}, 'NEW' : {}}
16
17 template['REF']['title'] = 'Incoherent Scattering Function (Gaussian approx.)'
18 template['REF']['log_file'] = 'logfile.log'
19 template['REF']['output_files'] = {'fft' : 'DISFG_Sqw_test.nc', 'isf' : 'DISFG_Fqt_test.nc'}
20 template['REF']['units_frequency'] = 1/Units.ps
21 template['REF']['trajectory'] = ['../TrajectoryTest1.nc']
22 template['REF']['weights'] = 'incoherent'
23 template['REF']['units_q'] = 1/Units.nm
24 template['REF']['frequency_points'] = 1000000
25
26
27 template['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest1.nc')
28 template['NEW']['weights'] = 'incoherent'
29 template['NEW']['disfg'] = mktemp(suffix = '_ISFG.nc', prefix = 'nMOLDYN_')
30 template['NEW']['pyroserver'] = 'monoprocessor'
31 template['NEW']['analysis'] = 'DynamicIncoherentStructureFactorGaussian_serial(self.testParameters)'
32
33 test = []
34
35
36 test.append({'REF' : {}, 'NEW' : {}})
37
38 test[-1]['REF']['time_info'] = (0, 49, 1)
39 test[-1]['REF']['atoms_pdb'] = '../TrajectoryTest1_1.pdb'
40 test[-1]['REF']['deuter'] = None
41 test[-1]['REF']['q_vector_set'] = ([3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0], 1.000000, 500, None)
42 test[-1]['REF']['ft_window'] = 80.0
43
44
45 test[-1]['NEW']['timeinfo'] = '1:49:1'
46 test[-1]['NEW']['subset'] = 'filename %s' % os.path.join(nmoldyn_package_path,"Tests",'TrajectoryTest1_1.nms')
47 test[-1]['NEW']['deuteration'] = None
48 test[-1]['NEW']['qShellValues'] = "3.:10.:1."
49 test[-1]['NEW']['fftWindow'] = 100./80.0
50
51
52
53 test.append({'REF' : {}, 'NEW' : {}})
54
55 test[-1]['REF']['time_info'] = (0, 19, 1)
56 test[-1]['REF']['atoms'] = {'Protein.0': ["BackBone"]}
57 test[-1]['REF']['deuter'] = None
58 test[-1]['REF']['q_vector_set'] = ([3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0], 0.800000, 500, None)
59 test[-1]['REF']['ft_window'] = 10.0
60
61
62 test[-1]['NEW']['timeinfo'] = '1:19:1'
63 test[-1]['NEW']['subset'] = 'objectname P892 misc backbone'
64 test[-1]['NEW']['deuteration'] = None
65 test[-1]['NEW']['qShellValues'] = "3.:10.:1.0"
66 test[-1]['NEW']['fftWindow'] = 100./10.0
67
68
69
70 test.append({'REF' : {}, 'NEW' : {}})
71
72 test[-1]['REF']['time_info'] = (0, 19, 2)
73 test[-1]['REF']['atoms'] = {'Protein.0': ['Methyl']}
74 test[-1]['REF']['deuter'] = None
75 test[-1]['REF']['q_vector_set'] = ([3.0, 5.0, 7.0, 9.0], 0.800000, 500, None)
76 test[-1]['REF']['ft_window'] = 20.0
77
78
79 test[-1]['NEW']['timeinfo'] = '1:19:2'
80 test[-1]['NEW']['subset'] = 'objectname P892 chemfragment methyl'
81 test[-1]['NEW']['deuteration'] = None
82 test[-1]['NEW']['qShellValues'] = "3.:9.:2.0"
83 test[-1]['NEW']['fftWindow'] = 100./20.0
84
85
86
87 test.append({'REF' : {}, 'NEW' : {}})
88
89 test[-1]['REF']['time_info'] = (0, 9, 1)
90 test[-1]['REF']['atoms'] = {'Protein.0': ['Oxygen','Nitrogen']}
91 test[-1]['REF']['deuter'] = None
92 test[-1]['REF']['q_vector_set'] = ([4.0, 5.0, 6.0, 7.0, 8.0], 1.200000, 500, None)
93 test[-1]['REF']['ft_window'] = 50.0
94
95
96 test[-1]['NEW']['timeinfo'] = '1:9:1'
97 test[-1]['NEW']['subset'] = 'objectname P892 atomelement nitrogen,oxygen'
98 test[-1]['NEW']['deuteration'] = None
99 test[-1]['NEW']['qShellValues'] = "4.:8.:1.0"
100 test[-1]['NEW']['fftWindow'] = 100./50.0
101
102
103
104 test.append({'REF' : {}, 'NEW' : {}})
105
106 test[-1]['REF']['time_info'] = (5, 29, 3)
107 test[-1]['REF']['atoms'] = {'Protein.0': ['Hydrogen']}
108 test[-1]['REF']['deuter'] = None
109 test[-1]['REF']['q_vector_set'] = ([4.0, 5.0, 6.0, 7.0, 8.0, 9.0], 0.900000, 500, None)
110 test[-1]['REF']['ft_window'] = 10.0
111
112
113 test[-1]['NEW']['timeinfo'] = '6:29:3'
114 test[-1]['NEW']['subset'] = 'objectname P892 atomelement hydrogen'
115 test[-1]['NEW']['deuteration'] = None
116 test[-1]['NEW']['qShellValues'] = "4.:9.:1.0"
117 test[-1]['NEW']['fftWindow'] = 100./10.0
118
119
120
121 test.append({'REF' : {}, 'NEW' : {}})
122
123 test[-1]['REF']['time_info'] = (4, 23, 2)
124 test[-1]['REF']['atoms'] = {'Protein.0': ['*']}
125 test[-1]['REF']['deuter'] = {'Protein.0': ['Methyl']}
126 test[-1]['REF']['q_vector_set'] = ([3.0, 4.0, 6.0, 7.0, 9.0], 1.00000, 500, None)
127 test[-1]['REF']['ft_window'] = 40.0
128
129
130 test[-1]['NEW']['timeinfo'] = '5:23:2'
131 test[-1]['NEW']['subset'] = None
132 test[-1]['NEW']['deuteration'] = 'objectname P892 chemfragment methyl'
133 test[-1]['NEW']['qShellValues'] = [3.0, 4.0, 6.0, 7.0, 9.0]
134 test[-1]['NEW']['fftWindow'] = 100./40.0
135
136
137
138 test.append({'REF' : {}, 'NEW' : {}})
139
140 test[-1]['REF']['time_info'] = (0, 19, 1)
141 test[-1]['REF']['atoms'] = {'Protein.0': ['Carbon']}
142 test[-1]['REF']['deuter'] = None
143 test[-1]['REF']['q_vector_set'] = ([4.0, 5.0, 6.0, 7.0, 8.0], 0.500000, 500, None)
144 test[-1]['REF']['ft_window'] = 80.0
145
146
147 test[-1]['NEW']['timeinfo'] = '1:19:1'
148 test[-1]['NEW']['subset'] = 'objectname P892 atomelement carbon'
149 test[-1]['NEW']['deuteration'] = None
150 test[-1]['NEW']['qShellValues'] = "4.:8.:1.0"
151 test[-1]['NEW']['fftWindow'] = 100./80.0
152
153
154
155 test.append({'REF' : {}, 'NEW' : {}})
156
157 test[-1]['REF']['time_info'] = (3, 39, 4)
158 test[-1]['REF']['atoms'] = {'Protein.0': ['Sulfur']}
159 test[-1]['REF']['deuter'] = None
160 test[-1]['REF']['q_vector_set'] = ([3.0, 4.0, 5.0, 6.0], 1.800000, 500, None)
161 test[-1]['REF']['ft_window'] = 10.0
162
163
164 test[-1]['NEW']['timeinfo'] = '4:39:4'
165 test[-1]['NEW']['subset'] = 'objectname P892 atomelement sulfur'
166 test[-1]['NEW']['deuteration'] = None
167 test[-1]['NEW']['qShellValues'] = "3.:6.:1.0"
168 test[-1]['NEW']['fftWindow'] = 100./10.0
169
170
171
172 test.append({'REF' : {}, 'NEW' : {}})
173
174 test[-1]['REF']['time_info'] = (0, 19, 1)
175 test[-1]['REF']['atoms'] = {'Protein.0': ['SideChain']}
176 test[-1]['REF']['deuter'] = {'Protein.0': ['Hydrogen']}
177 test[-1]['REF']['q_vector_set'] = ([7.5, 8.5, 9.5], 0.800000, 500, None)
178 test[-1]['REF']['ft_window'] = 20.0
179
180
181 test[-1]['NEW']['timeinfo'] = '1:19:1'
182 test[-1]['NEW']['subset'] = 'objectname P892 misc sidechains'
183 test[-1]['NEW']['deuteration'] = 'objectname P892 atomelement hydrogen'
184 test[-1]['NEW']['qShellValues'] = "7.5:9.5:1.0"
185 test[-1]['NEW']['fftWindow'] = 100./20.0
186
187
188
189 test.append({'REF' : {}, 'NEW' : {}})
190
191 test[-1]['REF']['time_info'] = (3, 30, 3)
192 test[-1]['REF']['atoms'] = {'Protein.0': ['BackBone','SideChain']}
193 test[-1]['REF']['deuter'] = None
194 test[-1]['REF']['q_vector_set'] = ([3.0, 4.0, 5.0, 6.0, 7.0], 1.500000, 500, None)
195 test[-1]['REF']['ft_window'] = 25.0
196
197
198 test[-1]['NEW']['timeinfo'] = '4:30:3'
199 test[-1]['NEW']['subset'] = 'objectname P892 misc backbone,sidechains'
200 test[-1]['NEW']['deuteration'] = None
201 test[-1]['NEW']['qShellValues'] = "3.:7.:1.0"
202 test[-1]['NEW']['fftWindow'] = 100./25.0
203
204
205
206 test.append({'REF' : {}, 'NEW' : {}})
207
208 test[-1]['REF']['trajectory'] = ['../TrajectoryTest3.nc']
209 test[-1]['REF']['time_info'] = (5, 19, 2)
210 test[-1]['REF']['atoms'] = {'Water': ['Hydrogen']}
211 test[-1]['REF']['deuter'] = None
212 test[-1]['REF']['q_vector_set'] = ([5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0], 1.000000, 500, None)
213 test[-1]['REF']['ft_window'] = 10.0
214
215
216 test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest3.nc')
217 test[-1]['NEW']['timeinfo'] = '6:19:2'
218 test[-1]['NEW']['subset'] = 'objectname AC3 atomelement hydrogen'
219 test[-1]['NEW']['deuteration'] = None
220 test[-1]['NEW']['qShellValues'] = "5.:12.:1.0"
221 test[-1]['NEW']['fftWindow'] = 100./10.0
222
223
224
225 test.append({'REF' : {}, 'NEW' : {}})
226
227 test[-1]['REF']['trajectory'] = ['../TrajectoryTest3.nc']
228 test[-1]['REF']['time_info'] = (0, 19, 1)
229 test[-1]['REF']['atoms'] = {'Water': ['Oxygen', 'Hydrogen']}
230 test[-1]['REF']['deuter'] = {'Water': ['Hydrogen']}
231 test[-1]['REF']['q_vector_set'] = ([5.6, 6.4, 7.3, 10.5, 20.4], 0.600000, 500, None)
232 test[-1]['REF']['ft_window'] = 8.0
233
234
235 test[-1]['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest3.nc')
236 test[-1]['NEW']['timeinfo'] = '1:19:1'
237 test[-1]['NEW']['subset'] = 'objectname AC3 atomelement hydrogen,oxygen'
238 test[-1]['NEW']['deuteration'] = 'objectname AC3 atomelement hydrogen'
239 test[-1]['NEW']['qShellValues'] = (5.6, 6.4, 7.3, 10.5, 20.4)
240 test[-1]['NEW']['fftWindow'] = 100./8.0
241