1
2
3
4
5
6
7
8
9 from tempfile import mktemp
10 import os
11 from MMTK import Units
12
13
14 template = {'REF' : {}, 'NEW' : {}}
15
16 template['REF']['title'] = 'Elastic Incoherent Scattering Function'
17 template['REF']['log_file'] = 'logfile.log'
18 template['REF']['output_files'] = {'eisf' : 'test.plot'}
19 template['REF']['trajectory'] = ['../TrajectoryTest1.nc']
20 template['REF']['weights'] = 'incoherent'
21 template['REF']['units_q'] = 1/Units.nm
22
23
24 template['NEW']['trajectory'] = os.path.join(nmoldyn_package_path, 'Tests', 'TrajectoryTest1.nc')
25 template['NEW']['weights'] = 'incoherent'
26 template['NEW']['eisf'] = mktemp(suffix = '_EISF.nc', prefix = 'nMOLDYN_')
27 template['NEW']['qVectorsGenerator'] = "3d isotropic"
28 template['NEW']['qVectorsDirection'] = None
29 template['NEW']['qVectorsPerShell'] = 500
30 template['NEW']['pyroserver'] = 'monoprocessor'
31 template['NEW']['analysis'] = 'ElasticIncoherentStructureFactor_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
43
44 test[-1]['NEW']['timeinfo'] = '1:49:1'
45 test[-1]['NEW']['subset'] = 'filename %s' % os.path.join(nmoldyn_package_path,"Tests",'TrajectoryTest1_1.nms')
46 test[-1]['NEW']['deuteration'] = None
47 test[-1]['NEW']['qShellValues'] = "3.:10.:1."
48 test[-1]['NEW']['qShellWidth'] = 1.0
49
50
51
52 test.append({'REF' : {}, 'NEW' : {}})
53
54 test[-1]['REF']['time_info'] = (0, 19, 1)
55 test[-1]['REF']['atoms'] = {'Protein.0': ["BackBone"]}
56 test[-1]['REF']['deuter'] = None
57 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)
58
59
60 test[-1]['NEW']['timeinfo'] = '1:19:1'
61 test[-1]['NEW']['subset'] = 'objectname P892 misc backbone'
62 test[-1]['NEW']['deuteration'] = None
63 test[-1]['NEW']['qShellValues'] = "3.:10.:1.0"
64 test[-1]['NEW']['qShellWidth'] = 0.8
65
66
67
68 test.append({'REF' : {}, 'NEW' : {}})
69
70 test[-1]['REF']['time_info'] = (0, 19, 2)
71 test[-1]['REF']['atoms'] = {'Protein.0': ['Methyl']}
72 test[-1]['REF']['deuter'] = None
73 test[-1]['REF']['q_vector_set'] = ([3.0, 5.0, 7.0, 9.0], 0.800000, 500, None)
74
75
76 test[-1]['NEW']['timeinfo'] = '1:19:2'
77 test[-1]['NEW']['subset'] = 'objectname P892 chemfragment methyl'
78 test[-1]['NEW']['deuteration'] = None
79 test[-1]['NEW']['qShellValues'] = "3.:9.:2.0"
80 test[-1]['NEW']['qShellWidth'] = 0.8
81
82
83
84 test.append({'REF' : {}, 'NEW' : {}})
85
86 test[-1]['REF']['time_info'] = (0, 9, 1)
87 test[-1]['REF']['atoms'] = {'Protein.0': ['Oxygen','Nitrogen']}
88 test[-1]['REF']['deuter'] = None
89 test[-1]['REF']['q_vector_set'] = ([4.0, 5.0, 6.0, 7.0, 8.0], 1.200000, 500, None)
90
91
92 test[-1]['NEW']['timeinfo'] = '1:9:1'
93 test[-1]['NEW']['subset'] = 'objectname P892 atomelement nitrogen,oxygen'
94 test[-1]['NEW']['deuteration'] = None
95 test[-1]['NEW']['qShellValues'] = "4.:8.:1.0"
96 test[-1]['NEW']['qShellWidth'] = 1.2
97
98
99
100 test.append({'REF' : {}, 'NEW' : {}})
101
102 test[-1]['REF']['time_info'] = (5, 29, 3)
103 test[-1]['REF']['atoms'] = {'Protein.0': ['Hydrogen']}
104 test[-1]['REF']['deuter'] = None
105 test[-1]['REF']['q_vector_set'] = ([4.0, 5.0, 6.0, 7.0, 8.0, 9.0], 0.900000, 500, None)
106
107
108 test[-1]['NEW']['timeinfo'] = '6:29:3'
109 test[-1]['NEW']['subset'] = 'objectname P892 atomelement hydrogen'
110 test[-1]['NEW']['deuteration'] = None
111 test[-1]['NEW']['qShellValues'] = "4.:9.:1.0"
112 test[-1]['NEW']['qShellWidth'] = 0.9
113
114
115
116 test.append({'REF' : {}, 'NEW' : {}})
117
118 test[-1]['REF']['time_info'] = (4, 23, 2)
119 test[-1]['REF']['atoms'] = {'Protein.0': ['*']}
120 test[-1]['REF']['deuter'] = {'Protein.0': ['Methyl']}
121 test[-1]['REF']['q_vector_set'] = ([3.0, 4.0, 6.0, 7.0, 9.0], 1.00000, 500, None)
122
123
124 test[-1]['NEW']['timeinfo'] = '5:23:2'
125 test[-1]['NEW']['subset'] = None
126 test[-1]['NEW']['deuteration'] = 'objectname P892 chemfragment methyl'
127 test[-1]['NEW']['qShellValues'] = [3.0, 4.0, 6.0, 7.0, 9.0]
128 test[-1]['NEW']['qShellWidth'] = 1.0
129
130
131
132 test.append({'REF' : {}, 'NEW' : {}})
133
134 test[-1]['REF']['time_info'] = (0, 19, 1)
135 test[-1]['REF']['atoms'] = {'Protein.0': ['Carbon']}
136 test[-1]['REF']['deuter'] = None
137 test[-1]['REF']['q_vector_set'] = ([4.0, 5.0, 6.0, 7.0, 8.0], 0.500000, 500, None)
138
139
140 test[-1]['NEW']['timeinfo'] = '1:19:1'
141 test[-1]['NEW']['subset'] = 'objectname P892 atomelement carbon'
142 test[-1]['NEW']['deuteration'] = None
143 test[-1]['NEW']['qShellValues'] = "4.:8.:1.0"
144 test[-1]['NEW']['qShellWidth'] = 0.5
145
146
147
148 test.append({'REF' : {}, 'NEW' : {}})
149
150 test[-1]['REF']['time_info'] = (3, 39, 4)
151 test[-1]['REF']['atoms'] = {'Protein.0': ['Sulfur']}
152 test[-1]['REF']['deuter'] = None
153 test[-1]['REF']['q_vector_set'] = ([3.0, 4.0, 5.0, 6.0], 1.800000, 500, None)
154
155
156 test[-1]['NEW']['timeinfo'] = '4:39:4'
157 test[-1]['NEW']['subset'] = 'objectname P892 atomelement sulfur'
158 test[-1]['NEW']['deuteration'] = None
159 test[-1]['NEW']['qShellValues'] = "3.:6.:1.0"
160 test[-1]['NEW']['qShellWidth'] = 1.8
161
162
163
164 test.append({'REF' : {}, 'NEW' : {}})
165
166 test[-1]['REF']['time_info'] = (0, 19, 1)
167 test[-1]['REF']['atoms'] = {'Protein.0': ['SideChain']}
168 test[-1]['REF']['deuter'] = {'Protein.0': ['Hydrogen']}
169 test[-1]['REF']['q_vector_set'] = ([7.5, 8.5, 9.5], 0.800000, 500, None)
170
171
172 test[-1]['NEW']['timeinfo'] = '1:19:1'
173 test[-1]['NEW']['subset'] = 'objectname P892 misc sidechains'
174 test[-1]['NEW']['deuteration'] = 'objectname P892 atomelement hydrogen'
175 test[-1]['NEW']['qShellValues'] = "7.5:9.5:1.0"
176 test[-1]['NEW']['qShellWidth'] = 0.8
177
178
179
180 test.append({'REF' : {}, 'NEW' : {}})
181
182 test[-1]['REF']['time_info'] = (3, 30, 3)
183 test[-1]['REF']['atoms'] = {'Protein.0': ['BackBone','SideChain']}
184 test[-1]['REF']['deuter'] = None
185 test[-1]['REF']['q_vector_set'] = ([3.0, 4.0, 5.0, 6.0, 7.0], 1.500000, 500, None)
186
187
188 test[-1]['NEW']['timeinfo'] = '4:30:3'
189 test[-1]['NEW']['subset'] = 'objectname P892 misc backbone,sidechains'
190 test[-1]['NEW']['deuteration'] = None
191 test[-1]['NEW']['qShellValues'] = "3.:7.:1.0"
192 test[-1]['NEW']['qShellWidth'] = 1.5
193
194
195
196 test.append({'REF' : {}, 'NEW' : {}})
197
198 test[-1]['REF']['time_info'] = (5, 19, 2)
199 test[-1]['REF']['atoms'] = {'Protein.0': ['Hydrogen']}
200 test[-1]['REF']['deuter'] = None
201 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)
202
203
204 test[-1]['NEW']['timeinfo'] = '6:19:2'
205 test[-1]['NEW']['subset'] = 'objectname P892 atomelement hydrogen'
206 test[-1]['NEW']['deuteration'] = None
207 test[-1]['NEW']['qShellValues'] = "3.:10.:1.0"
208 test[-1]['NEW']['qShellWidth'] = 1.0
209
210
211
212 test.append({'REF' : {}, 'NEW' : {}})
213
214 test[-1]['REF']['time_info'] = (0, 19, 1)
215 test[-1]['REF']['atoms'] = {'Protein.0': ['Oxygen', 'Nitrogen', 'Carbon', 'Sulfur', 'Hydrogen']}
216 test[-1]['REF']['deuter'] = None
217 test[-1]['REF']['q_vector_set'] = ([3.2, 4.2, 5.6, 6.4, 7.3], 0.600000, 500, None)
218
219
220 test[-1]['NEW']['timeinfo'] = '1:19:1'
221 test[-1]['NEW']['subset'] = 'objectname P892 atomelement carbon,hydrogen,nitrogen,oxygen,sulfur'
222 test[-1]['NEW']['deuteration'] = None
223 test[-1]['NEW']['qShellValues'] = (3.2, 4.2, 5.6, 6.4, 7.3)
224 test[-1]['NEW']['qShellWidth'] = 0.6
225