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