Package bmrblib :: Package kinetics :: Module heteronucl_NOEs_v2_1
[hide private]
[frames] | no frames]

Source Code for Module bmrblib.kinetics.heteronucl_NOEs_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 v2.1 Heteronuclear NOE data saveframe category. 
 24   
 25  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.kinetics.heteronucl_NOEs import HeteronuclNOESaveframe, HeteronuclNOEList, HeteronuclNOEExperiment, HeteronuclNOESoftware, HeteronuclNOE 
 30   
 31   
32 -class HeteronuclNOESaveframe_v2_1(HeteronuclNOESaveframe):
33 """The v2.1 Heteronuclear NOE data saveframe class.""" 34 35 # Class variables. 36 name = 'Heteronuclear_NOE' 37 label = 'heteronucl_NOE' 38 sf_label = 'heteronuclear_NOE' 39
40 - def add_tag_categories(self):
41 """Create the v2.1 tag categories.""" 42 43 # The tag category objects. 44 self.tag_categories.append(HeteronuclNOEList_v2_1(self)) 45 self.tag_categories.append(HeteronuclNOEExperiment_v2_1(self)) 46 self.tag_categories.append(HeteronuclNOESoftware_v2_1(self)) 47 self.tag_categories.append(HeteronuclNOE_v2_1(self))
48 49
50 - def pre_ops(self):
51 """Perform some saveframe specific operations prior to XML creation.""" 52 53 # The saveframe description. 54 self.sf_framecode = '%s MHz heteronuclear NOE %s' % (self.frq, self.count)
55 56 57
58 -class HeteronuclNOEList_v2_1(HeteronuclNOEList):
59 """v2.1 HeteronuclNOEList tag category.""" 60
61 - def __init__(self, sf):
62 """Setup the HeteronuclNOEList_v2_1 tag category. 63 64 @param sf: The saveframe object. 65 @type sf: saveframe instance 66 """ 67 68 # Initialise the baseclass. 69 super(HeteronuclNOEList_v2_1, self).__init__(sf) 70 71 # Add the tag info. 72 self['SampleConditionListLabel'].tag_name = 'Sample_conditions_label' 73 self['SpectrometerFrequency1H'].tag_name = 'Spectrometer_frequency_1H' 74 self['HeteronuclearNOEValType'].tag_name = 'Heteronuclear_NOE_value_type' 75 self['NOERefVal'].tag_name = 'NOE_reference_value' 76 self['NOERefDescription'].tag_name = 'NOE_reference_description' 77 self['TextDataFormat'].tag_name = 'Text_data_format' 78 self['TextData'].tag_name = 'Text_data'
79 80 81
82 -class HeteronuclNOEExperiment_v2_1(HeteronuclNOEExperiment):
83 """v2.1 HeteronuclNOEExperiment tag category.""" 84
85 - def __init__(self, sf):
86 """Setup the HeteronuclNOEExperiment_v2_1 tag category. 87 88 @param sf: The saveframe object. 89 @type sf: saveframe instance 90 """ 91 92 # Initialise the baseclass. 93 super(HeteronuclNOEExperiment_v2_1, self).__init__(sf) 94 95 # Add the tag info. 96 self['ExperimentName'].tag_name = 'Experiment_label' 97 self['SampleLabel'].tag_name = 'Sample_label'
98 99 100
101 -class HeteronuclNOESoftware_v2_1(HeteronuclNOESoftware):
102 """v2.1 HeteronuclNOESoftware tag category.""" 103
104 - def __init__(self, sf):
105 """Setup the HeteronuclNOESoftware tag category. 106 107 @param sf: The saveframe object. 108 @type sf: saveframe instance 109 """ 110 111 # Initialise the baseclass. 112 super(HeteronuclNOESoftware_v2_1, self).__init__(sf) 113 114 # Add the tag info. 115 self['SoftwareLabel'].tag_name = 'Software_label'
116 117
118 -class HeteronuclNOE_v2_1(HeteronuclNOE):
119 """v2.1 HeteronuclNOE tag category.""" 120
121 - def __init__(self, sf):
122 """Setup the HeteronuclNOE_v2_1 tag category. 123 124 @param sf: The saveframe object. 125 @type sf: saveframe instance 126 """ 127 128 # Initialise the baseclass. 129 super(HeteronuclNOE_v2_1, self).__init__(sf) 130 131 # Change tag names. 132 self['CompIndexID1'].tag_name = 'Residue_seq_code' 133 self['CompID1'].tag_name = 'Residue_label' 134 self['Val'].tag_name = 'Heteronuclear_NOE_value' 135 self['ValErr'].tag_name = 'Heteronuclear_NOE_value_error'
136