Package bmrblib :: Package assembly_supercategory :: Module entity_v2_1
[hide private]
[frames] | no frames]

Source Code for Module bmrblib.assembly_supercategory.entity_v2_1

 1  ############################################################################# 
 2  #                                                                           # 
 3  # The BMRB library.                                                         # 
 4  #                                                                           # 
 5  # Copyright (C) 2009-2010 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 entity 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.assembly_supercategory.entity import EntitySaveframe, Entity, EntityCompIndex 
30   
31   
32 -class EntitySaveframe_v2_1(EntitySaveframe):
33 """The v2.1 entity saveframe class.""" 34 35 # Class variables. 36 sf_label = 'monomeric_polymer' 37
38 - def add_tag_categories(self):
39 """Create the v2.1 tag categories.""" 40 41 # The tag category objects. 42 self.tag_categories.append(Entity_v2_1(self)) 43 self.tag_categories.append(EntityCompIndex_v2_1(self))
44 45 46
47 -class Entity_v2_1(Entity):
48 """v2.1 Entity tag category.""" 49
50 - def __init__(self, sf):
51 """Setup the Entity tag category. 52 53 @param sf: The saveframe object. 54 @type sf: saveframe instance 55 """ 56 57 # Initialise the baseclass. 58 super(Entity_v2_1, self).__init__(sf) 59 60 # Change tag names. 61 self['SfCategory'].tag_name = 'Saveframe_category' 62 self['Name'].tag_name = 'Name_common' 63 self['Type'].tag_name = 'Mol_type' 64 self['PolymerType'].tag_name = 'Mol_polymer_class' 65 self['ThiolState'].tag_name = 'Mol_thiol_state' 66 self['PolymerSeqOneLetterCode'].tag_name = 'Mol_residue_sequence' 67 self['FormulaWeight'].tag_name = 'Molecular_mass' 68 self['DBQueryDate'].tag_name = 'Sequence_homology_query_date' 69 self['DBQueryRevisedLastDate'].tag_name = 'Sequence_homology_query_revised_last_date'
70 71 72
73 -class EntityCompIndex_v2_1(EntityCompIndex):
74 """v2.1 EntityCompIndex tag category.""" 75
76 - def __init__(self, sf):
77 """Setup the EntityCompIndex_v2_1 tag category. 78 79 @param sf: The saveframe object. 80 @type sf: saveframe instance 81 """ 82 83 # Initialise the baseclass. 84 super(EntityCompIndex_v2_1, self).__init__(sf) 85 86 # Change tag names. 87 self['EntityCompIndexID'].tag_name = 'Residue_seq_code' 88 self['CompID'].tag_name = 'Residue_label'
89