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  # relax module imports. 
26  from specific_analyses.parameter_object import Param_list 
27   
28   
29 -class N_state_params(Param_list):
30 """The N-state model parameter list singleton.""" 31 32 # Class variable for storing the class instance (for the singleton design pattern). 33 _instance = None 34
35 - def __init__(self):
36 """Define all the parameters of the analysis.""" 37 38 # The object is already initialised. 39 if self._initialised: return 40 41 # Execute the base class __init__() method. 42 Param_list.__init__(self) 43 44 # Add the base data. 45 self._add_align_data() 46 47 # Add up the model parameters. 48 self._add('probs', scope='global', default=0.0, desc='The probabilities of each state', py_type=list, set='params', err=True, sim=True) 49 self._add('alpha', scope='global', units='rad', default=0.0, desc='The alpha Euler angles (for the rotation of each state)', py_type=list, set='params', err=True, sim=True) 50 self._add('beta', scope='global', units='rad', default=0.0, desc='The beta Euler angles (for the rotation of each state)', py_type=list, set='params', err=True, sim=True) 51 self._add('gamma', scope='global', units='rad', default=0.0, desc='The gamma Euler angles (for the rotation of each state)', py_type=list, set='params', err=True, sim=True) 52 self._add('paramagnetic_centre', scope='global', units='Angstrom', desc='The paramagnetic centre', py_type=list, set='params', err=True, sim=True) 53 54 # Add the minimisation data. 55 self._add_min_data(min_stats_global=False, min_stats_spin=True) 56 57 # Set up the user function documentation. 58 self._set_uf_title("N-state model parameters") 59 self._uf_param_table(label="table: N-state parameters", caption="N-state model parameters.", scope='global', type=True) 60 self._uf_param_table(label="table: N-state parameter value setting", caption="N-state model parameters.", scope='global', type=True) 61 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) 62 63 # Value setting documentation. 64 for doc in self._uf_doc_loop(["table: N-state parameter value setting", "table: N-state parameter value setting with defaults"]): 65 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.")
66