1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 """The module for the frame order parameter list object."""
24
25
26 from math import pi
27
28
29 from lib.errors import RelaxError
30 from specific_analyses.parameter_object import Param_list
31
32
34 """Determine the upper grid bound for the angular parameters, excluding the bound value.
35
36 @keyword incs: The number of grid search increments.
37 @type incs: int
38 @keyword model_info: The model information from model_loop(). This is unused.
39 @type model_info: None
40 @return: The upper grid search bound for the angular parameters, excluding the bound value.
41 @rtype: float
42 """
43
44
45 if incs in [None, 1]:
46 return 2.0 * pi
47
48
49 return 2.0*pi * (1.0 - 1.0/incs)
50
51
53 """Determine the upper grid bound for the axis alpha angle.
54
55 @keyword incs: The number of grid search increments.
56 @type incs: int
57 @keyword model_info: The model information from model_loop(). This is unused.
58 @type model_info: None
59 @return: The upper grid search bound for the axis alpha angle.
60 @rtype: float
61 """
62
63
64 if incs in [None, 1]:
65 return pi
66
67
68 return pi * (1.0 - 2.0/incs)
69
70
72 """Determine the lower grid bound for the cone and torsion angles.
73
74 @keyword incs: The number of grid search increments.
75 @type incs: int
76 @keyword model_info: The model information from model_loop(). This is unused.
77 @type model_info: None
78 @return: The lower grid search bound for the cone and torsion angles.
79 @rtype: float
80 """
81
82
83 if incs in [None, 1]:
84 return 0.0
85
86
87 return pi * (1.0/(incs+1))
88
89
91 """Determine the upper grid bound for the cone and torsion angles.
92
93 @keyword incs: The number of grid search increments.
94 @type incs: int
95 @keyword model_info: The model information from model_loop(). This is unused.
96 @type model_info: None
97 @return: The upper grid search bound for the cone and torsion angles.
98 @rtype: float
99 """
100
101
102 if incs in [None, 1]:
103 return pi
104
105
106 return pi * (1.0 - 1.0/(incs+1))
107
108
110 """Determine the grid bounds for the pivot coordinates.
111
112 @keyword param: The parameter to find the bound for. This should be one of 'pivot_x', 'pivot_y', or 'pivot_z'.
113 @type param: str
114 @keyword extent: The length in Angstrom to extend out from the current coordinate to reach the grid bound.
115 @type extent: float
116 @return: The grid search bound for the given coordinate.
117 @rtype: float
118 """
119
120
121 if not hasattr(cdp, param):
122 raise RelaxError("The pivot point has not been set, cannot determine the grid search bounds.")
123
124
125 val = getattr(cdp, param)
126
127
128 return val + extent
129
130
132 """Determine the lower grid bound for the pivot X coordinate.
133
134 @keyword incs: The number of grid search increments.
135 @type incs: int
136 @keyword model_info: The model information from model_loop(). This is unused.
137 @type model_info: None
138 @keyword size: The half grid size in Angstrom.
139 @type size: float
140 @return: The lower grid search bound for the coordinate.
141 @rtype: float
142 """
143
144
145 return pivot_grid_bound(param='pivot_x', extent=-size)
146
147
149 """Determine the upper grid bound for the pivot X coordinate.
150
151 @keyword incs: The number of grid search increments.
152 @type incs: int
153 @keyword model_info: The model information from model_loop(). This is unused.
154 @type model_info: None
155 @keyword size: The half grid size in Angstrom.
156 @type size: float
157 @return: The upper grid search bound for the coordinate.
158 @rtype: float
159 """
160
161
162 return pivot_grid_bound(param='pivot_x', extent=size)
163
164
166 """Determine the lower grid bound for the pivot Y coordinate.
167
168 @keyword incs: The number of grid search increments.
169 @type incs: int
170 @keyword model_info: The model information from model_loop(). This is unused.
171 @type model_info: None
172 @keyword size: The half grid size in Angstrom.
173 @type size: float
174 @return: The lower grid search bound for the coordinate.
175 @rtype: float
176 """
177
178
179 return pivot_grid_bound(param='pivot_y', extent=-size)
180
181
183 """Determine the upper grid bound for the pivot Y coordinate.
184
185 @keyword incs: The number of grid search increments.
186 @type incs: int
187 @keyword model_info: The model information from model_loop(). This is unused.
188 @type model_info: None
189 @keyword size: The half grid size in Angstrom.
190 @type size: float
191 @return: The upper grid search bound for the coordinate.
192 @rtype: float
193 """
194
195
196 return pivot_grid_bound(param='pivot_y', extent=size)
197
198
200 """Determine the lower grid bound for the pivot Z coordinate.
201
202 @keyword incs: The number of grid search increments.
203 @type incs: int
204 @keyword model_info: The model information from model_loop(). This is unused.
205 @type model_info: None
206 @keyword size: The half grid size in Angstrom.
207 @type size: float
208 @return: The lower grid search bound for the coordinate.
209 @rtype: float
210 """
211
212
213 return pivot_grid_bound(param='pivot_z', extent=-size)
214
215
217 """Determine the upper grid bound for the pivot Z coordinate.
218
219 @keyword incs: The number of grid search increments.
220 @type incs: int
221 @keyword model_info: The model information from model_loop(). This is unused.
222 @type model_info: None
223 @keyword size: The half grid size in Angstrom.
224 @type size: float
225 @return: The upper grid search bound for the coordinate.
226 @rtype: float
227 """
228
229
230 return pivot_grid_bound(param='pivot_z', extent=size)
231
232
233
235 """The frame order parameter list singleton."""
236
237
238 _instance = None
239
241 """Define all the parameters of the analysis."""
242
243
244 if self._initialised: return
245
246
247 Param_list.__init__(self)
248
249
250 self._add_model_info()
251
252
253 self._add_align_data()
254
255
256 self._add(
257 'pivot_x',
258 scope = 'global',
259 units = 'Angstrom',
260 desc = 'The pivot point position x coordinate',
261 py_type = float,
262 set = 'params',
263 grid_lower = pivot_x_lower,
264 grid_upper = pivot_x_upper,
265 err = True,
266 sim = True
267 )
268 self._add(
269 'pivot_y',
270 scope = 'global',
271 units = 'Angstrom',
272 desc = 'The pivot point position y coordinate',
273 py_type = float,
274 set = 'params',
275 grid_lower = pivot_y_lower,
276 grid_upper = pivot_y_upper,
277 err = True,
278 sim = True
279 )
280 self._add(
281 'pivot_z',
282 scope = 'global',
283 units = 'Angstrom',
284 desc = 'The pivot point position z coordinate',
285 py_type = float,
286 set = 'params',
287 grid_lower = pivot_z_lower,
288 grid_upper = pivot_z_upper,
289 err = True,
290 sim = True
291 )
292 self._add(
293 'pivot_disp',
294 scope = 'global',
295 units = 'Angstrom',
296 desc = 'The 2nd pivot point displacement - the minimum distance between the two rotor axes',
297 py_type = float,
298 set = 'params',
299 grid_lower = 10.0,
300 grid_upper = 60.0,
301 err = True,
302 sim = True
303 )
304 self._add(
305 'ave_pos_x',
306 scope = 'global',
307 units = 'Angstrom',
308 desc = 'The average position x translation',
309 py_type = float,
310 set = 'params',
311 grid_lower = -50,
312 grid_upper = 50,
313 err = True,
314 sim = True
315 )
316 self._add(
317 'ave_pos_y',
318 scope = 'global',
319 units = 'Angstrom',
320 desc = 'The average position y translation',
321 py_type = float,
322 set = 'params',
323 grid_lower = -50,
324 grid_upper = 50,
325 err = True,
326 sim = True
327 )
328 self._add(
329 'ave_pos_z',
330 scope = 'global',
331 units = 'Angstrom',
332 desc = 'The average position z translation',
333 py_type = float,
334 set = 'params',
335 grid_lower = -50,
336 grid_upper = 50,
337 err = True,
338 sim = True
339 )
340 self._add(
341 'ave_pos_alpha',
342 scope = 'global',
343 units = 'rad',
344 desc = 'The average position alpha Euler angle',
345 py_type = float,
346 set = 'params',
347 grid_lower = 0.0,
348 grid_upper = angle_upper_excluding_bound,
349 err = True,
350 sim = True
351 )
352 self._add(
353 'ave_pos_beta',
354 scope = 'global',
355 units = 'rad',
356 desc = 'The average position beta Euler angle',
357 py_type = float,
358 set = 'params',
359 grid_lower = 0.0,
360 grid_upper = pi,
361 err = True,
362 sim = True
363 )
364 self._add(
365 'ave_pos_gamma',
366 scope = 'global',
367 units = 'rad',
368 desc = 'The average position gamma Euler angle',
369 py_type = float,
370 set = 'params',
371 grid_lower = 0.0,
372 grid_upper = angle_upper_excluding_bound,
373 err = True,
374 sim = True
375 )
376 self._add(
377 'eigen_alpha',
378 scope = 'global',
379 units = 'rad',
380 desc = 'The Eigenframe alpha Euler angle',
381 py_type = float,
382 set = 'params',
383 grid_lower = 0.0,
384 grid_upper = angle_upper_excluding_bound,
385 err = True,
386 sim = True
387 )
388 self._add(
389 'eigen_beta',
390 scope = 'global',
391 units = 'rad',
392 desc = 'The Eigenframe beta Euler angle',
393 py_type = float,
394 set = 'params',
395 grid_lower = 0.0,
396 grid_upper = pi,
397 err = True,
398 sim = True
399 )
400 self._add(
401 'eigen_gamma',
402 scope = 'global',
403 units = 'rad',
404 desc = 'The Eigenframe gamma Euler angle',
405 py_type = float,
406 set = 'params',
407 grid_lower = 0.0,
408 grid_upper = angle_upper_excluding_bound,
409 err = True,
410 sim = True
411 )
412 self._add(
413 'axis_theta',
414 scope = 'global',
415 units = 'rad',
416 desc = 'The cone axis polar angle (for the isotropic cone model)',
417 py_type = float,
418 set = 'params',
419 grid_lower = 0.0,
420 grid_upper = pi,
421 err = True,
422 sim = True
423 )
424 self._add(
425 'axis_phi',
426 scope = 'global',
427 units = 'rad',
428 desc = 'The cone axis azimuthal angle (for the isotropic cone model)',
429 py_type = float,
430 set = 'params',
431 grid_lower = 0.0,
432 grid_upper = angle_upper_excluding_bound,
433 err = True,
434 sim = True
435 )
436 self._add(
437 'axis_alpha',
438 scope = 'global',
439 units = 'rad',
440 desc = 'The rotor axis alpha angle (the rotation angle out of the xy plane)',
441 py_type = float,
442 set = 'params',
443 grid_lower = -pi,
444 grid_upper = axis_alpha_upper,
445 err = True,
446 sim = True
447 )
448 self._add(
449 'cone_theta_x',
450 scope = 'global',
451 units = 'rad',
452 desc = 'The pseudo-ellipse cone opening half-angle for the x-axis',
453 py_type = float,
454 set = 'params',
455 grid_lower = cone_angle_lower,
456 grid_upper = cone_angle_upper,
457 err = True,
458 sim = True
459 )
460 self._add(
461 'cone_theta_y',
462 scope = 'global',
463 units = 'rad',
464 desc = 'The pseudo-ellipse cone opening half-angle for the y-axis',
465 py_type = float,
466 set = 'params',
467 grid_lower = cone_angle_lower,
468 grid_upper = cone_angle_upper,
469 err = True,
470 sim = True
471 )
472 self._add(
473 'cone_theta',
474 scope = 'global',
475 units = 'rad',
476 desc = 'The isotropic cone opening half-angle',
477 py_type = float,
478 set = 'params',
479 grid_lower = cone_angle_lower,
480 grid_upper = cone_angle_upper,
481 err = True,
482 sim = True
483 )
484 self._add(
485 'cone_sigma_max',
486 scope = 'global',
487 units = 'rad',
488 desc = 'The torsion angle',
489 py_type = float,
490 set = 'params',
491 grid_lower = cone_angle_lower,
492 grid_upper = cone_angle_upper,
493 err = True,
494 sim = True
495 )
496 self._add(
497 'cone_sigma_max_2',
498 scope = 'global',
499 units = 'rad',
500 desc = 'The torsion angle of the 2nd motional mode',
501 py_type = float,
502 set = 'params',
503 grid_lower = cone_angle_lower,
504 grid_upper = cone_angle_upper,
505 err = True,
506 sim = True
507 )
508
509
510 self._add_min_data(min_stats_global=True)
511
512
513 self._set_uf_title("Frame order parameters")
514 self._uf_param_table(label="table: frame order parameters", caption="Frame order parameters.", scope='global')
515 self._uf_param_table(label="table: frame order parameter value setting with defaults", caption="Frame order parameter value setting.", scope='global', default=True)
516