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