Package specific_analyses :: Package consistency_tests :: Module parameter_object
[hide private]
[frames] | no frames]

Source Code for Module specific_analyses.consistency_tests.parameter_object

  1  ############################################################################### 
  2  #                                                                             # 
  3  # Copyright (C) 2002-2005,2007-2014 Edward d'Auvergne                         # 
  4  # Copyright (C) 2006 Chris MacRaild                                           # 
  5  # Copyright (C) 2007-2008 Sebastien Morin                                     # 
  6  #                                                                             # 
  7  # This file is part of the program relax (http://www.nmr-relax.com).          # 
  8  #                                                                             # 
  9  # This program is free software: you can redistribute it and/or modify        # 
 10  # it under the terms of the GNU General Public License as published by        # 
 11  # the Free Software Foundation, either version 3 of the License, or           # 
 12  # (at your option) any later version.                                         # 
 13  #                                                                             # 
 14  # This program is distributed in the hope that it will be useful,             # 
 15  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
 16  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
 17  # GNU General Public License for more details.                                # 
 18  #                                                                             # 
 19  # You should have received a copy of the GNU General Public License           # 
 20  # along with this program.  If not, see <http://www.gnu.org/licenses/>.       # 
 21  #                                                                             # 
 22  ############################################################################### 
 23   
 24  # Module docstring. 
 25  """The module for the consistency testing parameter list object.""" 
 26   
 27  # relax module imports. 
 28  from lib.physical_constants import N15_CSA 
 29  from specific_analyses.parameter_object import Param_list 
 30   
 31   
32 -class Consistency_tests_params(Param_list):
33 """The consistency testing parameter list singleton.""" 34 35 # Class variable for storing the class instance (for the singleton design pattern). 36 _instance = None 37
38 - def __init__(self):
39 """Define all the parameters of the analysis.""" 40 41 # The object is already initialised. 42 if self._initialised: return 43 44 # Execute the base class __init__ method. 45 Param_list.__init__(self) 46 47 # Add the base information for the analysis. 48 self._add_csa(default = N15_CSA) 49 self._add( 50 'orientation', 51 scope = 'spin', 52 default = 15.7, 53 units = 'degrees', 54 desc = "Angle between the 15N-1H vector and the principal axis of the 15N chemical shift tensor", 55 py_type = float, 56 set = 'fixed', 57 grace_string = '\\q\\xq\\Q' 58 ) 59 self._add( 60 'tc', 61 scope = 'spin', 62 default = 13 * 1e-9, 63 units = 'ns', 64 desc = "The single global correlation time estimate/approximation", 65 py_type = float, 66 set = 'fixed', 67 grace_string = '\\q\\xt\\f{}c\\Q' 68 ) 69 70 # Add the model parameters. 71 self._add( 72 'j0', 73 scope = 'spin', 74 desc = 'Spectral density value at 0 MHz (from Farrow et al. (1995) JBNMR, 6: 153-162)', 75 py_type = float, 76 set = 'params', 77 grace_string = '\\qJ(0)\\Q', 78 err = True, 79 sim = True 80 ) 81 self._add( 82 'f_eta', 83 scope = 'spin', 84 desc = 'Eta-test (from Fushman et al. (1998) JACS, 120: 10947-10952)', 85 py_type = float, 86 set = 'params', 87 grace_string = '\\qF\\s\\xh\\Q', 88 err = True, 89 sim = True 90 ) 91 self._add( 92 'f_r2', 93 scope = 'spin', 94 desc = 'R2-test (from Fushman et al. (1998) JACS, 120: 10947-10952)', 95 py_type = float, 96 set = 'params', 97 grace_string = '\\qF\\sR2\\Q', 98 err = True, 99 sim = True 100 ) 101 102 # Set up the user function documentation. 103 self._set_uf_title("Consistency testing parameters") 104 self._uf_param_table(label="table: consistency testing parameters", caption="Consistency testing parameters.") 105 self._uf_param_table(label="table: consistency testing parameter value setting", caption="Consistency testing parameters.") 106 self._uf_param_table(label="table: consistency testing parameter value setting with defaults", caption="Consistency testing parameter value setting.", default=True) 107 108 # Value setting documentation. 109 for doc in self._uf_doc_loop(["table: consistency testing parameter value setting", "table: consistency testing parameter value setting with defaults"]): 110 doc.add_paragraph("In consistency testing, the CSA value, angle Theta ('orientation') and global correlation time must be set prior to the calculation of consistency functions.")
111