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

Source Code for Module specific_analyses.n_state_model.parameter_object

  1  ############################################################################### 
  2  #                                                                             # 
  3  # Copyright (C) 2007-2014 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 module for the N-state model parameter list object.""" 
 24   
 25  # Python module imports. 
 26  from math import pi 
 27   
 28  # relax module imports. 
 29  from specific_analyses.parameter_object import Param_list 
 30   
 31   
32 -class N_state_params(Param_list):
33 """The N-state model 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 data. 48 self._add_align_data() 49 self._add_align_tensor() 50 51 # Add up the model parameters. 52 self._add( 53 'probs', 54 scope = 'global', 55 default = 0.0, 56 desc = 'The probabilities of each state', 57 py_type = list, 58 set = 'params', 59 scaling = 0.1, 60 grid_lower = 0.0, 61 grid_upper = 1.0, 62 err = True, 63 sim = True 64 ) 65 self._add( 66 'alpha', 67 scope = 'global', 68 units = 'rad', 69 default = 0.0, 70 desc = 'The alpha Euler angles (for the rotation of each state)', 71 py_type = list, 72 set = 'params', 73 grid_lower = 0.0, 74 grid_upper = 2*pi, 75 err = True, 76 sim = True 77 ) 78 self._add( 79 'beta', 80 scope = 'global', 81 units = 'rad', 82 default = 0.0, 83 desc = 'The beta Euler angles (for the rotation of each state)', 84 py_type = list, 85 set = 'params', 86 grid_lower = 0.0, 87 grid_upper = 2*pi, 88 err = True, 89 sim = True 90 ) 91 self._add( 92 'gamma', 93 scope = 'global', 94 units = 'rad', 95 default = 0.0, 96 desc = 'The gamma Euler angles (for the rotation of each state)', 97 py_type = list, 98 set = 'params', 99 grid_lower = 0.0, 100 grid_upper = 2*pi, 101 err = True, 102 sim = True 103 ) 104 self._add( 105 'paramagnetic_centre', 106 scope = 'global', 107 units = 'Angstrom', 108 desc = 'The paramagnetic centre', 109 py_type = list, 110 set = 'params', 111 scaling = 1e2, 112 grid_lower = -100.0, 113 grid_upper = 100, 114 err = True, 115 sim = True 116 ) 117 118 # Add the minimisation data. 119 self._add_min_data(min_stats_global=False, min_stats_spin=True) 120 121 # Set up the user function documentation. 122 self._set_uf_title("N-state model parameters") 123 self._uf_param_table(label="table: N-state parameters", caption="N-state model parameters.", scope='global', type=True) 124 self._uf_param_table(label="table: N-state parameter value setting", caption="N-state model parameters.", scope='global', type=True) 125 self._uf_param_table(label="table: N-state parameter value setting with defaults", caption="N-state model parameter value setting.", scope='global', default=True, type=True) 126 127 # Value setting documentation. 128 for doc in self._uf_doc_loop(["table: N-state parameter value setting", "table: N-state parameter value setting with defaults"]): 129 doc.add_paragraph("Setting parameters for the N-state model is a little different from the other type of analyses as each state has a set of parameters with the same names as the other states. To set the parameters for a specific state c (ranging from 0 for the first to N-1 for the last, the number c should be given as the index argument. So the Euler angle gamma of the third state is specified using the parameter name 'gamma' and index of 2.")
130