Package bmrblib :: Package experimental_details :: Module sample_conditions_v2_1
[hide private]
[frames] | no frames]

Source Code for Module bmrblib.experimental_details.sample_conditions_v2_1

 1  ############################################################################# 
 2  #                                                                           # 
 3  # The BMRB library.                                                         # 
 4  #                                                                           # 
 5  # Copyright (C) 2009-2011 Edward d'Auvergne                                 # 
 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 saveframe category (used to be called order_parameters). 
24   
25  For example, see http://www.bmrb.wisc.edu/dictionary/htmldocs/nmr_star/dictionary_files/complete_form_v21.txt 
26  """ 
27   
28  # relax module imports. 
29  from bmrblib.experimental_details.sample_conditions import SampleConditionsSaveframe, SampleConditionList, SampleConditionCitation, SampleConditionVariable 
30   
31   
32 -class SampleConditionsSaveframe_v2_1(SampleConditionsSaveframe):
33 """The v2.1 sample conditions saveframe class.""" 34
35 - def add_tag_categories(self):
36 """Create the v2.1 tag categories.""" 37 38 # The tag category objects. 39 self.tag_categories.append(SampleConditionList_v2_1(self)) 40 self.tag_categories.append(SampleConditionVariable_v2_1(self))
41 42 43
44 -class SampleConditionList_v2_1(SampleConditionList):
45 """The v2.1 SampleConditionList tag category.""" 46
47 - def __init__(self, sf):
48 """Setup the SampleConditionList tag category. 49 50 @param sf: The saveframe object. 51 @type sf: saveframe instance 52 """ 53 54 # Initialise the baseclass. 55 super(SampleConditionList_v2_1, self).__init__(sf) 56 57 # Change tag names. 58 self['SfCategory'].tag_name = 'Saveframe_category'
59 60 61
62 -class SampleConditionVariable_v2_1(SampleConditionVariable):
63 """The v2.1 SampleConditionVariable tag category.""" 64
65 - def __init__(self, sf):
66 """Setup the SampleConditionVariable tag category. 67 68 @param sf: The saveframe object. 69 @type sf: saveframe instance 70 """ 71 72 # Initialise the baseclass. 73 super(SampleConditionVariable_v2_1, self).__init__(sf) 74 75 # Change tag names. 76 self['Type'].tag_name = 'Variable_type' 77 self['Val'].tag_name = 'Variable_value' 78 self['ValErr'].tag_name = 'Variable_value_error' 79 self['ValUnits'].tag_name = 'Variable_value_units'
80