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 Lipari-Szabo model-free parameter list object."""
24
25
26 from lib.physical_constants import N15_CSA
27 from pipe_control import relax_data
28 from specific_analyses.parameter_object import Param_list
29 from specific_analyses.model_free.parameters import conv_factor_rex, units_rex
30
31
33 """The Lipari-Szabo model-free parameter list singleton."""
34
35
36 _instance = None
37
39 """Define all the parameters of the analysis."""
40
41
42 if self._initialised: return
43
44
45 Param_list.__init__(self)
46
47
48 self._add('ri_data', scope='spin', desc=relax_data.return_data_desc('ri_data'), py_type=dict, err=False, sim=True)
49 self._add('ri_data_err', scope='spin', desc=relax_data.return_data_desc('ri_data_err'), py_type=dict, err=False, sim=False)
50
51
52 self._add_model_info(equation_flag=True)
53
54
55 self._add_diffusion_params()
56
57
58 self._add('s2', scope='spin', default=0.8, desc='S2, the model-free generalised order parameter (S2 = S2f.S2s)', py_type=float, set='params', grace_string='\\qS\\v{0.4}\\z{0.71}2\\Q', err=True, sim=True)
59 self._add('s2f', scope='spin', default=0.8, desc='S2f, the faster motion model-free generalised order parameter', py_type=float, set='params', grace_string='\\qS\\sf\\N\\h{-0.2}\\v{0.4}\\z{0.71}2\\Q', err=True, sim=True)
60 self._add('s2s', scope='spin', default=0.8, desc='S2s, the slower motion model-free generalised order parameter', py_type=float, set='params', grace_string='\\qS\\ss\\N\\h{-0.2}\\v{0.4}\\z{0.71}2\\Q', err=True, sim=True)
61 self._add('local_tm', scope='spin', default=10.0 * 1e-9, desc='The spin specific global correlation time (seconds)', py_type=float, set='params', grace_string='\\xt\\f{}\\sm', units='ns', err=True, sim=True)
62 self._add('te', scope='spin', default=100.0 * 1e-12, desc='Single motion effective internal correlation time (seconds)', py_type=float, set='params', conv_factor=1e-12, grace_string='\\xt\\f{}\\se', units='ps', err=True, sim=True)
63 self._add('tf', scope='spin', default=10.0 * 1e-12, desc='Faster motion effective internal correlation time (seconds)', py_type=float, set='params', conv_factor=1e-12, grace_string='\\xt\\f{}\\sf', units='ps', err=True, sim=True)
64 self._add('ts', scope='spin', default=1000.0 * 1e-12, desc='Slower motion effective internal correlation time (seconds)', py_type=float, set='params', conv_factor=1e-12, grace_string='\\xt\\f{}\\ss', units='ps', err=True, sim=True)
65 self._add('rex', scope='spin', default=0.0, desc='Chemical exchange relaxation (sigma_ex = Rex / omega**2)', py_type=float, set='params', conv_factor=conv_factor_rex, units=units_rex, grace_string='\\qR\\sex\\Q', err=True, sim=True)
66 self._add_csa(default=N15_CSA, set='params', err=True, sim=True)
67
68
69 self._add_min_data(min_stats_global=True, min_stats_spin=True)
70
71
72 self._set_uf_title("Model-free parameters")
73 self._uf_param_table(label="table: model-free parameters", caption="Model-free parameters.")
74 self._uf_param_table(label="table: model-free parameter writing", caption="Model-free parameters.")
75 self._uf_param_table(label="table: model-free parameters and min stats", caption="Model-free parameters and minimisation statistics.", sets=['params', 'fixed', 'min'])
76 self._uf_param_table(label="table: all model-free parameters", caption="Model-free parameters.", scope=None)
77 self._uf_param_table(label="table: model-free parameter value setting", caption="Model-free parameters.")
78 self._uf_param_table(label="table: model-free parameter value setting with defaults", caption="Model-free parameter value setting.", default=True)
79
80
81 for doc in self._uf_doc_loop(["table: model-free parameter value setting", "table: model-free parameter value setting with defaults"]):
82 doc.add_paragraph("Setting a parameter value may have no effect depending on which model-free model is chosen. For example if S2f values and S2s values are set but the data pipe corresponds to the model-free model 'm4' then because these data values are not parameters of the model they will have no effect.")
83 doc.add_paragraph("Note that the Rex values are scaled quadratically with field strength and should be supplied as a field strength independent value. Use the following formula to obtain the correct value:")
84 doc.add_verbatim(" value = rex / (2.0 * pi * frequency) ** 2")
85 doc.add_paragraph("where:")
86 doc.add_list_element("rex is the chemical exchange value for the current frequency.")
87 doc.add_list_element("frequency is the proton frequency corresponding to the data.")
88
89
90 for doc in self._uf_doc_loop(["table: model-free parameter writing"]):
91 doc.add_paragraph("For model-free theory it is assumed that Rex values are scaled quadratically with field strength. The values will be very small as they will be written out as a field strength independent value. Hence use the following formula to convert the value to that expected for a given magnetic field strength:")
92 doc.add_verbatim(" Rex = value * (2.0 * pi * frequency) ** 2")
93 doc.add_paragraph("The frequency is that of the proton in Hertz.")
94