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

Source Code for Module bmrblib.experimental_details.nmr_spectrometer_v3_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 method saveframe category. 
24   
25  For example, see http://www.bmrb.wisc.edu/dictionary/3.1html_frame/frame_SaveFramePage.html#method 
26  """ 
27   
28  # relax module imports. 
29  from bmrblib.experimental_details.nmr_spectrometer import NMRSpectrometerSaveframe, NMRSpectrometer 
30   
31   
32 -class NMRSpectrometerSaveframe_v3_1(NMRSpectrometerSaveframe):
33 """The NMR spectrometer saveframe class.""" 34
35 - def add_tag_categories(self):
36 """Create the tag categories.""" 37 38 # The tag category objects. 39 self.tag_categories.append(NMRSpectrometer_v3_1(self))
40 41 42
43 -class NMRSpectrometer_v3_1(NMRSpectrometer):
44 """Base class for the NMRSpectrometer tag category.""" 45
46 - def __init__(self, sf):
47 """Setup the NMRSpectrometer tag category. 48 49 @param sf: The saveframe object. 50 @type sf: saveframe instance 51 """ 52 53 # Initialise the baseclass. 54 super(NMRSpectrometer_v3_1, self).__init__(sf) 55 56 # The category name. 57 self.tag_category_label = 'NMR_spectrometer' 58 59 # Change tag names. 60 self['SfCategory'].tag_name = 'Sf_category' 61 self['SfFramecode'].tag_name = 'Sf_framecode' 62 63 # Change the variable name. 64 self['SfFramecode'].var_name = 'name'
65