Package user_functions :: Module model_free
[hide private]
[frames] | no frames]

Source Code for Module user_functions.model_free

  1  ############################################################################### 
  2  #                                                                             # 
  3  # Copyright (C) 2003-2006,2008-2010,2012-2013,2019 Edward d'Auvergne          # 
  4  #                                                                             # 
  5  # This file is part of the program relax (http://www.nmr-relax.com).          # 
  6  #                                                                             # 
  7  # This program is free software: you can redistribute it and/or modify        # 
  8  # it under the terms of the GNU General Public License as published by        # 
  9  # the Free Software Foundation, either version 3 of the License, or           # 
 10  # (at your option) any later version.                                         # 
 11  #                                                                             # 
 12  # This program is distributed in the hope that it will be useful,             # 
 13  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
 14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
 15  # GNU General Public License for more details.                                # 
 16  #                                                                             # 
 17  # You should have received a copy of the GNU General Public License           # 
 18  # along with this program.  If not, see <http://www.gnu.org/licenses/>.       # 
 19  #                                                                             # 
 20  ############################################################################### 
 21   
 22  # Module docstring. 
 23  """The model_free user function definitions for model-free analysis.""" 
 24   
 25  # Python module imports. 
 26  from os import sep 
 27   
 28  # relax module imports. 
 29  from graphics import ANALYSIS_IMAGE_PATH 
 30  from lib.text.gui import csa, local_tm, r, rex, s2, s2f, te, tf, ts 
 31  from specific_analyses.model_free.uf import create_model, delete, remove_tm, select_model 
 32  from user_functions.data import Uf_info; uf_info = Uf_info() 
 33  from user_functions.objects import Desc_container 
 34   
 35   
 36  # The user function class. 
 37  uf_class = uf_info.add_class('model_free') 
 38  uf_class.title = "Class for model-free analysis." 
 39  uf_class.menu_text = "&model_free" 
 40  uf_class.gui_icon = "relax.model-free" 
 41   
 42   
 43  # The model_free.create_model user function. 
 44  uf = uf_info.add_uf('model_free.create_model') 
 45  uf.title = "Create a model-free model." 
 46  uf.title_short = "Model-free model creation." 
 47  uf.display = True 
 48  uf.add_keyarg( 
 49      name = "model", 
 50      basic_types = ["str"], 
 51      desc_short = "model name", 
 52      desc = "The new name of the model-free model." 
 53  ) 
 54  uf.add_keyarg( 
 55      name = "equation", 
 56      basic_types = ["str"], 
 57      desc_short = "model-free equation", 
 58      desc = "The model-free equation.", 
 59      wiz_element_type = "combo", 
 60      wiz_combo_choices = [ 
 61          "Original model-free equation {S2, te}", 
 62          "Extended model-free equation {S2f, tf, S2, ts}", 
 63          "Extended model-free equation {S2f, tf, S2s, ts}" 
 64      ], 
 65      wiz_combo_data = [ 
 66          "mf_orig", 
 67          "mf_ext", 
 68          "mf_ext2" 
 69      ], 
 70      wiz_read_only = True 
 71  ) 
 72  uf.add_keyarg( 
 73      name = "params", 
 74      basic_types = ["str"], 
 75      container_types = ["list"], 
 76      dim = (None,), 
 77      desc_short = "model-free parameters", 
 78      desc = "The array of parameter names of the model.", 
 79      wiz_element_type = "combo_list", 
 80      wiz_combo_choices = [ 
 81          "S2 - generalised order parameter (single motion)", 
 82          "te - effective correlation time (single motion)", 
 83          "S2f - generalised order parameter (faster motion)", 
 84          "S2s - generalised order parameter (slower motion)", 
 85          "tf - effective correlation time (faster motion)", 
 86          "ts - effective correlation time (slower motion)", 
 87          "Rex - chemical exchange relaxation", 
 88          "r - average bond length <r>", 
 89          "CSA - chemical shift anisotropy" 
 90      ], 
 91      wiz_combo_data = [ 
 92          "s2", 
 93          "te", 
 94          "s2f", 
 95          "s2s", 
 96          "tf", 
 97          "ts", 
 98          "rex", 
 99          "r", 
100          "csa" 
101      ], 
102      wiz_read_only = True 
103  ) 
104  uf.add_keyarg( 
105      name = "spin_id", 
106      basic_types = ["str"], 
107      desc_short = "spin identification string", 
108      desc = "The spin identification string.", 
109      can_be_none = True 
110  ) 
111  # Description. 
112  uf.desc.append(Desc_container()) 
113  uf.desc[-1].add_paragraph("This user function should almost never be used.  It is provided for academic reasons for the study of old analyses and published results.  If you are looking for a normal model-free model, use the model_free.select_model user function instead.") 
114  # Model-free equation. 
115  uf.desc.append(Desc_container("Model-free equation")) 
116  uf.desc[-1].add_paragraph("The model-free equation can be one of the following:") 
117  uf.desc[-1].add_list_element("'mf_orig' selects the original model-free equations with parameters {S2, te}.") 
118  uf.desc[-1].add_list_element("'mf_ext' selects the extended model-free equations with parameters {S2f, tf, S2, ts}.") 
119  uf.desc[-1].add_list_element("'mf_ext2' selects the extended model-free equations with parameters {S2f, tf, S2s, ts}.") 
120  # Model-free parameters. 
121  uf.desc.append(Desc_container("Model-free parameters")) 
122  uf.desc[-1].add_paragraph("The following parameters are accepted for the original model-free equation:") 
123  uf.desc[-1].add_item_list_element("'s2'", " The square of the generalised order parameter.") 
124  uf.desc[-1].add_item_list_element("'te'", " The effective correlation time.") 
125  uf.desc[-1].add_paragraph("The following parameters are accepted for the extended model-free equation:") 
126  uf.desc[-1].add_item_list_element("'s2f'", "The square of the generalised order parameter of the faster motion.") 
127  uf.desc[-1].add_item_list_element("'tf'", " The effective correlation time of the faster motion.") 
128  uf.desc[-1].add_item_list_element("'s2'", " The square of the generalised order parameter S2 = S2f * S2s.") 
129  uf.desc[-1].add_item_list_element("'ts'", " The effective correlation time of the slower motion.") 
130  uf.desc[-1].add_paragraph("The following parameters are accepted for the extended 2 model-free equation:") 
131  uf.desc[-1].add_item_list_element("'s2f'", "The square of the generalised order parameter of the faster motion.") 
132  uf.desc[-1].add_item_list_element("'tf'", " The effective correlation time of the faster motion.") 
133  uf.desc[-1].add_item_list_element("'s2s'", "The square of the generalised order parameter of the slower motion.") 
134  uf.desc[-1].add_item_list_element("'ts'", " The effective correlation time of the slower motion.") 
135  uf.desc[-1].add_paragraph("The following parameters are accepted for all equations:") 
136  uf.desc[-1].add_item_list_element("'rex'", "The chemical exchange relaxation.") 
137  uf.desc[-1].add_item_list_element("'r'", "  The average bond length <r>.") 
138  uf.desc[-1].add_item_list_element("'csa'", "The chemical shift anisotropy.") 
139  # Spin identification string. 
140  uf.desc.append(Desc_container("Spin identification string")) 
141  uf.desc[-1].add_paragraph("If 'spin_id' is supplied then the model will only be created for the corresponding spins.  Otherwise the model will be created for all spins.") 
142  # Prompt examples. 
143  uf.desc.append(Desc_container("Prompt examples")) 
144  uf.desc[-1].add_paragraph("The following commands will create the model-free model 'm1' which is based on the original model-free equation and contains the single parameter 's2'.") 
145  uf.desc[-1].add_prompt("relax> model_free.create_model('m1', 'mf_orig', ['s2'])") 
146  uf.desc[-1].add_prompt("relax> model_free.create_model(model='m1', params=['s2'], equation='mf_orig')") 
147  uf.desc[-1].add_paragraph("The following commands will create the model-free model 'large_model' which is based on the extended model-free equation and contains the seven parameters 's2f', 'tf', 's2', 'ts', 'rex', 'csa', 'r'.") 
148  uf.desc[-1].add_prompt("relax> model_free.create_model('large_model', 'mf_ext', ['s2f', 'tf', 's2', 'ts', 'rex', 'csa', 'r'])") 
149  uf.desc[-1].add_prompt("relax> model_free.create_model(model='large_model', params=['s2f', 'tf', 's2', 'ts', 'rex', 'csa', 'r'], equation='mf_ext')") 
150  uf.backend = create_model 
151  uf.menu_text = "&create_model" 
152  uf.gui_icon = "oxygen.actions.list-add-relax-blue" 
153  uf.wizard_height_desc = 450 
154  uf.wizard_size = (1000, 750) 
155  uf.wizard_apply_button = False 
156  uf.wizard_image = ANALYSIS_IMAGE_PATH + 'model_free' + sep + 'model_free_200x200.png' 
157   
158   
159  # The model_free.delete user function. 
160  uf = uf_info.add_uf('model_free.delete') 
161  uf.title = "Delete all model-free data from the current data pipe." 
162  uf.title_short = "Model-free data deletion." 
163  uf.display = True 
164  # Description. 
165  uf.desc.append(Desc_container()) 
166  uf.desc[-1].add_paragraph("This will delete all of the model-free data - parameters, model, etc. - from the current data pipe.") 
167  # Prompt examples. 
168  uf.desc.append(Desc_container("Prompt examples")) 
169  uf.desc[-1].add_paragraph("To delete all model-free data, type:") 
170  uf.desc[-1].add_prompt("relax> model_free.delete()") 
171  uf.backend = delete 
172  uf.menu_text = "&delete" 
173  uf.gui_icon = "oxygen.actions.list-remove" 
174  uf.wizard_size = (600, 300) 
175  uf.wizard_apply_button = False 
176  uf.wizard_image = ANALYSIS_IMAGE_PATH + 'model_free' + sep + 'model_free_200x200.png' 
177   
178   
179  # The model_free.remove_tm user function. 
180  uf = uf_info.add_uf('model_free.remove_tm') 
181  uf.title = "Remove the local tm parameter from a model." 
182  uf.title_short = "Local tm parameter removal." 
183  uf.display = True 
184  uf.add_keyarg( 
185      name = "spin_id", 
186      basic_types = ["str"], 
187      desc_short = "spin ID string", 
188      desc = "The spin identification string.", 
189      can_be_none = True 
190  ) 
191  # Description. 
192  uf.desc.append(Desc_container()) 
193  uf.desc[-1].add_paragraph("This function will remove the local tm parameter from the model-free parameter set.  If there is no local tm parameter within the set nothing will happen.") 
194  uf.desc[-1].add_paragraph("If no spin identification string is given, then the function will apply to all spins.") 
195  # Prompt examples. 
196  uf.desc.append(Desc_container("Prompt examples")) 
197  uf.desc[-1].add_paragraph("The following command will remove the parameter 'tm':") 
198  uf.desc[-1].add_prompt("relax> model_free.remove_tm()") 
199  uf.backend = remove_tm 
200  uf.menu_text = "&remove_tm" 
201  uf.gui_icon = "oxygen.actions.list-remove" 
202  uf.wizard_height_desc = 300 
203  uf.wizard_size = (700, 400) 
204  uf.wizard_apply_button = False 
205  uf.wizard_image = ANALYSIS_IMAGE_PATH + 'model_free' + sep + 'model_free_200x200.png' 
206   
207   
208  # The model_free.select_model user function. 
209  uf = uf_info.add_uf('model_free.select_model') 
210  uf.title = "Select a preset model-free model." 
211  uf.title_short = "Model-free model choice." 
212  uf.display = True 
213  uf.add_keyarg( 
214      name = "model", 
215      basic_types = ["str"], 
216      desc_short = "preset model name", 
217      desc = "The name of the preset model.", 
218      wiz_element_type = "combo", 
219      wiz_combo_choices = [ 
220          "m0:  {}", 
221          "m1:  {%s}" % s2, 
222          "m2:  {%s, %s}" % (s2, te), 
223          "m3:  {%s, %s}" % (s2, rex), 
224          "m4:  {%s, %s, %s}" % (s2, te, rex), 
225          "m5:  {%s, %s, %s}" % (s2, s2f, ts), 
226          "m6:  {%s, %s, %s, %s}" % (s2, tf, s2f, ts), 
227          "m7:  {%s, %s, %s, %s}" % (s2, s2f, ts, rex), 
228          "m8:  {%s, %s, %s, %s, %s}" % (s2, tf, s2f, ts, rex), 
229          "m9:  {%s}" % rex, 
230          "", 
231          "tm0:  {%s}" % local_tm, 
232          "tm1:  {%s, %s}" % (local_tm, s2), 
233          "tm2:  {%s, %s, %s}" % (local_tm, s2, te), 
234          "tm3:  {%s, %s, %s}" % (local_tm, s2, rex), 
235          "tm4:  {%s, %s, %s, %s}" % (local_tm, s2, te, rex), 
236          "tm5:  {%s, %s, %s, %s}" % (local_tm, s2, s2f, ts), 
237          "tm6:  {%s, %s, %s, %s, %s}" % (local_tm, s2, tf, s2f, ts), 
238          "tm7:  {%s, %s, %s, %s, %s}" % (local_tm, s2, s2f, ts, rex), 
239          "tm8:  {%s, %s, %s, %s, %s, %s}" % (local_tm, s2, tf, s2f, ts, rex), 
240          "tm9:  {%s, %s}" % (local_tm, rex), 
241          "", 
242          "m10:  {%s}" % csa, 
243          "m11:  {%s, %s}" % (csa, s2), 
244          "m12:  {%s, %s, %s}" % (csa, s2, te), 
245          "m13:  {%s, %s, %s}" % (csa, s2, rex), 
246          "m14:  {%s, %s, %s, %s}" % (csa, s2, te, rex), 
247          "m15:  {%s, %s, %s, %s}" % (csa, s2, s2f, ts), 
248          "m16:  {%s, %s, %s, %s, %s}" % (csa, s2, tf, s2f, ts), 
249          "m17:  {%s, %s, %s, %s, %s}" % (csa, s2, s2f, ts, rex), 
250          "m18:  {%s, %s, %s, %s, %s, %s}" % (csa, s2, tf, s2f, ts, rex), 
251          "m19:  {%s, %s}" % (csa, rex), 
252          "", 
253          "tm10:  {%s, %s}" % (local_tm, csa), 
254          "tm11:  {%s, %s, %s}" % (local_tm, csa, s2), 
255          "tm12:  {%s, %s, %s, %s}" % (local_tm, csa, s2, te), 
256          "tm13:  {%s, %s, %s, %s}" % (local_tm, csa, s2, rex), 
257          "tm14:  {%s, %s, %s, %s, %s}" % (local_tm, csa, s2, te, rex), 
258          "tm15:  {%s, %s, %s, %s, %s}" % (local_tm, csa, s2, s2f, ts), 
259          "tm16:  {%s, %s, %s, %s, %s, %s}" % (local_tm, csa, s2, tf, s2f, ts), 
260          "tm17:  {%s, %s, %s, %s, %s, %s}" % (local_tm, csa, s2, s2f, ts, rex), 
261          "tm18:  {%s, %s, %s, %s, %s, %s, %s}" % (local_tm, csa, s2, tf, s2f, ts, rex), 
262          "tm19:  {%s, %s, %s}" % (local_tm, csa, rex), 
263          "", 
264          "m20:  {%s}" % r, 
265          "m21:  {%s, %s}" % (r, s2), 
266          "m22:  {%s, %s, %s}" % (r, s2, te), 
267          "m23:  {%s, %s, %s}" % (r, s2, rex), 
268          "m24:  {%s, %s, %s, %s}" % (r, s2, te, rex), 
269          "m25:  {%s, %s, %s, %s}" % (r, s2, s2f, ts), 
270          "m26:  {%s, %s, %s, %s, %s}" % (r, s2, tf, s2f, ts), 
271          "m27:  {%s, %s, %s, %s, %s}" % (r, s2, s2f, ts, rex), 
272          "m28:  {%s, %s, %s, %s, %s, %s}" % (r, s2, tf, s2f, ts, rex), 
273          "m29:  {%s, %s}" % (r, rex), 
274          "", 
275          "tm20:  {%s, %s}" % (local_tm, r), 
276          "tm21:  {%s, %s, %s}" % (local_tm, r, s2), 
277          "tm22:  {%s, %s, %s, %s}" % (local_tm, r, s2, te), 
278          "tm23:  {%s, %s, %s, %s}" % (local_tm, r, s2, rex), 
279          "tm24:  {%s, %s, %s, %s, %s}" % (local_tm, r, s2, te, rex), 
280          "tm25:  {%s, %s, %s, %s, %s}" % (local_tm, r, s2, s2f, ts), 
281          "tm26:  {%s, %s, %s, %s, %s, %s}" % (local_tm, r, s2, tf, s2f, ts), 
282          "tm27:  {%s, %s, %s, %s, %s, %s}" % (local_tm, r, s2, s2f, ts, rex), 
283          "tm28:  {%s, %s, %s, %s, %s, %s, %s}" % (local_tm, r, s2, tf, s2f, ts, rex), 
284          "tm29:  {%s, %s, %s}" % (local_tm, r, rex), 
285          "", 
286          "m30:  {%s, %s}" % (r, csa), 
287          "m31:  {%s, %s, %s}" % (r, csa, s2), 
288          "m32:  {%s, %s, %s, %s}" % (r, csa, s2, te), 
289          "m33:  {%s, %s, %s, %s}" % (r, csa, s2, rex), 
290          "m34:  {%s, %s, %s, %s, %s}" % (r, csa, s2, te, rex), 
291          "m35:  {%s, %s, %s, %s, %s}" % (r, csa, s2, s2f, ts), 
292          "m36:  {%s, %s, %s, %s, %s, %s}" % (r, csa, s2, tf, s2f, ts), 
293          "m37:  {%s, %s, %s, %s, %s, %s}" % (r, csa, s2, s2f, ts, rex), 
294          "m38:  {%s, %s, %s, %s, %s, %s, %s}" % (r, csa, s2, tf, s2f, ts, rex), 
295          "m39:  {%s, %s, %s}" % (r, csa, rex), 
296          "", 
297          "tm30:  {%s, %s, %s}" % (local_tm, r, csa), 
298          "tm31:  {%s, %s, %s, %s}" % (local_tm, r, csa, s2), 
299          "tm32:  {%s, %s, %s, %s, %s}" % (local_tm, r, csa, s2, te), 
300          "tm33:  {%s, %s, %s, %s, %s}" % (local_tm, r, csa, s2, rex), 
301          "tm34:  {%s, %s, %s, %s, %s, %s}" % (local_tm, r, csa, s2, te, rex), 
302          "tm35:  {%s, %s, %s, %s, %s, %s}" % (local_tm, r, csa, s2, s2f, ts), 
303          "tm36:  {%s, %s, %s, %s, %s, %s, %s}" % (local_tm, r, csa, s2, tf, s2f, ts), 
304          "tm37:  {%s, %s, %s, %s, %s, %s, %s}" % (local_tm, r, csa, s2, s2f, ts, rex), 
305          "tm38:  {%s, %s, %s, %s, %s, %s, %s, %s}" % (local_tm, r, csa, s2, tf, s2f, ts, rex), 
306          "tm39:  {%s, %s, %s, %s}" % (local_tm, r, csa, rex) 
307      ], 
308      wiz_combo_data = [ 
309          "m0", 
310          "m1", 
311          "m2", 
312          "m3", 
313          "m4", 
314          "m5", 
315          "m6", 
316          "m7", 
317          "m8", 
318          "m9", 
319          None, 
320          "tm0", 
321          "tm1", 
322          "tm2", 
323          "tm3", 
324          "tm4", 
325          "tm5", 
326          "tm6", 
327          "tm7", 
328          "tm8", 
329          "tm9", 
330          None, 
331          "m10", 
332          "m11", 
333          "m12", 
334          "m13", 
335          "m14", 
336          "m15", 
337          "m16", 
338          "m17", 
339          "m18", 
340          "m19", 
341          None, 
342          "tm10", 
343          "tm11", 
344          "tm12", 
345          "tm13", 
346          "tm14", 
347          "tm15", 
348          "tm16", 
349          "tm17", 
350          "tm18", 
351          "tm19", 
352          None, 
353          "m20", 
354          "m21", 
355          "m22", 
356          "m23", 
357          "m24", 
358          "m25", 
359          "m26", 
360          "m27", 
361          "m28", 
362          "m29", 
363          None, 
364          "tm20", 
365          "tm21", 
366          "tm22", 
367          "tm23", 
368          "tm24", 
369          "tm25", 
370          "tm26", 
371          "tm27", 
372          "tm28", 
373          "tm29", 
374          None, 
375          "m30", 
376          "m31", 
377          "m32", 
378          "m33", 
379          "m34", 
380          "m35", 
381          "m36", 
382          "m37", 
383          "m38", 
384          "m39", 
385          None, 
386          "tm30", 
387          "tm31", 
388          "tm32", 
389          "tm33", 
390          "tm34", 
391          "tm35", 
392          "tm36", 
393          "tm37", 
394          "tm38", 
395          "tm39" 
396      ], 
397      wiz_read_only = True 
398  ) 
399  uf.add_keyarg( 
400      name = "spin_id", 
401      basic_types = ["str"], 
402      desc_short = "spin ID string", 
403      desc = "The spin identification string.", 
404      can_be_none = True 
405  ) 
406  # Description. 
407  uf.desc.append(Desc_container()) 
408  uf.desc[-1].add_paragraph("This allows a standard model-free model to be selected from a long list of models.") 
409  # The preset models. 
410  uf.desc.append(Desc_container("The preset models")) 
411  uf.desc[-1].add_paragraph("The standard preset model-free models are") 
412  uf.desc[-1].add_item_list_element("'m0'", "{},") 
413  uf.desc[-1].add_item_list_element("'m1'", "{S2},") 
414  uf.desc[-1].add_item_list_element("'m2'", "{S2, te},") 
415  uf.desc[-1].add_item_list_element("'m3'", "{S2, Rex},") 
416  uf.desc[-1].add_item_list_element("'m4'", "{S2, te, Rex},") 
417  uf.desc[-1].add_item_list_element("'m5'", "{S2f, S2, ts},") 
418  uf.desc[-1].add_item_list_element("'m6'", "{S2f, tf, S2, ts},") 
419  uf.desc[-1].add_item_list_element("'m7'", "{S2f, S2, ts, Rex},") 
420  uf.desc[-1].add_item_list_element("'m8'", "{S2f, tf, S2, ts, Rex},") 
421  uf.desc[-1].add_item_list_element("'m9'", "{Rex}.") 
422  uf.desc[-1].add_paragraph("The preset model-free models with optimisation of the CSA value are") 
423  uf.desc[-1].add_item_list_element("'m10'", "{CSA},") 
424  uf.desc[-1].add_item_list_element("'m11'", "{CSA, S2},") 
425  uf.desc[-1].add_item_list_element("'m12'", "{CSA, S2, te},") 
426  uf.desc[-1].add_item_list_element("'m13'", "{CSA, S2, Rex},") 
427  uf.desc[-1].add_item_list_element("'m14'", "{CSA, S2, te, Rex},") 
428  uf.desc[-1].add_item_list_element("'m15'", "{CSA, S2f, S2, ts},") 
429  uf.desc[-1].add_item_list_element("'m16'", "{CSA, S2f, tf, S2, ts},") 
430  uf.desc[-1].add_item_list_element("'m17'", "{CSA, S2f, S2, ts, Rex},") 
431  uf.desc[-1].add_item_list_element("'m18'", "{CSA, S2f, tf, S2, ts, Rex},") 
432  uf.desc[-1].add_item_list_element("'m19'", "{CSA, Rex}.") 
433  uf.desc[-1].add_paragraph("The preset model-free models with optimisation of the bond length are") 
434  uf.desc[-1].add_item_list_element("'m20'", "{r},") 
435  uf.desc[-1].add_item_list_element("'m21'", "{r, S2},") 
436  uf.desc[-1].add_item_list_element("'m22'", "{r, S2, te},") 
437  uf.desc[-1].add_item_list_element("'m23'", "{r, S2, Rex},") 
438  uf.desc[-1].add_item_list_element("'m24'", "{r, S2, te, Rex},") 
439  uf.desc[-1].add_item_list_element("'m25'", "{r, S2f, S2, ts},") 
440  uf.desc[-1].add_item_list_element("'m26'", "{r, S2f, tf, S2, ts},") 
441  uf.desc[-1].add_item_list_element("'m27'", "{r, S2f, S2, ts, Rex},") 
442  uf.desc[-1].add_item_list_element("'m28'", "{r, S2f, tf, S2, ts, Rex},") 
443  uf.desc[-1].add_item_list_element("'m29'", "{r, CSA, Rex}.") 
444  uf.desc[-1].add_paragraph("The preset model-free models with both optimisation of the bond length and CSA are") 
445  uf.desc[-1].add_item_list_element("'m30'", "{r, CSA},") 
446  uf.desc[-1].add_item_list_element("'m31'", "{r, CSA, S2},") 
447  uf.desc[-1].add_item_list_element("'m32'", "{r, CSA, S2, te},") 
448  uf.desc[-1].add_item_list_element("'m33'", "{r, CSA, S2, Rex},") 
449  uf.desc[-1].add_item_list_element("'m34'", "{r, CSA, S2, te, Rex},") 
450  uf.desc[-1].add_item_list_element("'m35'", "{r, CSA, S2f, S2, ts},") 
451  uf.desc[-1].add_item_list_element("'m36'", "{r, CSA, S2f, tf, S2, ts},") 
452  uf.desc[-1].add_item_list_element("'m37'", "{r, CSA, S2f, S2, ts, Rex},") 
453  uf.desc[-1].add_item_list_element("'m38'", "{r, CSA, S2f, tf, S2, ts, Rex},") 
454  uf.desc[-1].add_item_list_element("'m39'", "{r, CSA, Rex}.") 
455  uf.desc[-1].add_paragraph("Warning:  The models in the thirties range fail when using standard R1, R2, and NOE relaxation data.  This is due to the extreme flexibly of these models where a change in the parameter 'r' is compensated by a corresponding change in the parameter 'csa' and vice versa.") 
456  uf.desc.append(Desc_container("The preset local tm models")) 
457  uf.desc[-1].add_paragraph("Additional preset model-free models, which are simply extensions of the above models with the addition of a local tm parameter are:") 
458  uf.desc[-1].add_item_list_element("'tm0'", "{tm},") 
459  uf.desc[-1].add_item_list_element("'tm1'", "{tm, S2},") 
460  uf.desc[-1].add_item_list_element("'tm2'", "{tm, S2, te},") 
461  uf.desc[-1].add_item_list_element("'tm3'", "{tm, S2, Rex},") 
462  uf.desc[-1].add_item_list_element("'tm4'", "{tm, S2, te, Rex},") 
463  uf.desc[-1].add_item_list_element("'tm5'", "{tm, S2f, S2, ts},") 
464  uf.desc[-1].add_item_list_element("'tm6'", "{tm, S2f, tf, S2, ts},") 
465  uf.desc[-1].add_item_list_element("'tm7'", "{tm, S2f, S2, ts, Rex},") 
466  uf.desc[-1].add_item_list_element("'tm8'", "{tm, S2f, tf, S2, ts, Rex},") 
467  uf.desc[-1].add_item_list_element("'tm9'", "{tm, Rex}.") 
468  uf.desc[-1].add_paragraph("The preset model-free models with optimisation of the CSA value are") 
469  uf.desc[-1].add_item_list_element("'tm10'", "{tm, CSA},") 
470  uf.desc[-1].add_item_list_element("'tm11'", "{tm, CSA, S2},") 
471  uf.desc[-1].add_item_list_element("'tm12'", "{tm, CSA, S2, te},") 
472  uf.desc[-1].add_item_list_element("'tm13'", "{tm, CSA, S2, Rex},") 
473  uf.desc[-1].add_item_list_element("'tm14'", "{tm, CSA, S2, te, Rex},") 
474  uf.desc[-1].add_item_list_element("'tm15'", "{tm, CSA, S2f, S2, ts},") 
475  uf.desc[-1].add_item_list_element("'tm16'", "{tm, CSA, S2f, tf, S2, ts},") 
476  uf.desc[-1].add_item_list_element("'tm17'", "{tm, CSA, S2f, S2, ts, Rex},") 
477  uf.desc[-1].add_item_list_element("'tm18'", "{tm, CSA, S2f, tf, S2, ts, Rex},") 
478  uf.desc[-1].add_item_list_element("'tm19'", "{tm, CSA, Rex}.") 
479  uf.desc[-1].add_paragraph("The preset model-free models with optimisation of the bond length are") 
480  uf.desc[-1].add_item_list_element("'tm20'", "{tm, r},") 
481  uf.desc[-1].add_item_list_element("'tm21'", "{tm, r, S2},") 
482  uf.desc[-1].add_item_list_element("'tm22'", "{tm, r, S2, te},") 
483  uf.desc[-1].add_item_list_element("'tm23'", "{tm, r, S2, Rex},") 
484  uf.desc[-1].add_item_list_element("'tm24'", "{tm, r, S2, te, Rex},") 
485  uf.desc[-1].add_item_list_element("'tm25'", "{tm, r, S2f, S2, ts},") 
486  uf.desc[-1].add_item_list_element("'tm26'", "{tm, r, S2f, tf, S2, ts},") 
487  uf.desc[-1].add_item_list_element("'tm27'", "{tm, r, S2f, S2, ts, Rex},") 
488  uf.desc[-1].add_item_list_element("'tm28'", "{tm, r, S2f, tf, S2, ts, Rex},") 
489  uf.desc[-1].add_item_list_element("'tm29'", "{tm, r, CSA, Rex}.") 
490  uf.desc[-1].add_paragraph("The preset model-free models with both optimisation of the bond length and CSA are") 
491  uf.desc[-1].add_item_list_element("'tm30'", "{tm, r, CSA},") 
492  uf.desc[-1].add_item_list_element("'tm31'", "{tm, r, CSA, S2},") 
493  uf.desc[-1].add_item_list_element("'tm32'", "{tm, r, CSA, S2, te},") 
494  uf.desc[-1].add_item_list_element("'tm33'", "{tm, r, CSA, S2, Rex},") 
495  uf.desc[-1].add_item_list_element("'tm34'", "{tm, r, CSA, S2, te, Rex},") 
496  uf.desc[-1].add_item_list_element("'tm35'", "{tm, r, CSA, S2f, S2, ts},") 
497  uf.desc[-1].add_item_list_element("'tm36'", "{tm, r, CSA, S2f, tf, S2, ts},") 
498  uf.desc[-1].add_item_list_element("'tm37'", "{tm, r, CSA, S2f, S2, ts, Rex},") 
499  uf.desc[-1].add_item_list_element("'tm38'", "{tm, r, CSA, S2f, tf, S2, ts, Rex},") 
500  uf.desc[-1].add_item_list_element("'tm39'", "{tm, r, CSA, Rex}.") 
501  # Spin identification string. 
502  uf.desc.append(Desc_container("Spin identification string")) 
503  uf.desc[-1].add_paragraph("If 'spin_id' is supplied then the model will only be selected for the corresponding spins.  Otherwise the model will be selected for all spins.") 
504  # Prompt examples. 
505  uf.desc.append(Desc_container("Prompt examples")) 
506  uf.desc[-1].add_paragraph("To pick model 'm1' for all selected spins, type:") 
507  uf.desc[-1].add_prompt("relax> model_free.select_model('m1')") 
508  uf.desc[-1].add_prompt("relax> model_free.select_model(model='m1')") 
509  uf.backend = select_model 
510  uf.menu_text = "&select_model" 
511  uf.gui_icon = "oxygen.actions.list-add" 
512  uf.wizard_height_desc = 450 
513  uf.wizard_size = (1000, 750) 
514  uf.wizard_apply_button = False 
515  uf.wizard_image = ANALYSIS_IMAGE_PATH + 'model_free' + sep + 'model_free_200x200.png' 
516