Package Bio :: Package FSSP :: Module fssp_rec
[hide private]
[frames] | no frames]

Source Code for Module Bio.FSSP.fssp_rec

 1  # A superclass for reading [f]ixed-column type [f]lat-[f]ile records. (e.g. 
2 -class fff_rec:
3 - def __init__(self, inrec=''):
4 self.data = inrec
5
6 - def __repr__(self):
7 return str(self.data)
8 __str__ = __repr__ 9
10 - def __len__(self):
11 return len(self.data)
12
13 - def __getitem__(self, index):
14 if isinstance(index, slice): 15 return self.data[index] 16 elif (isinstance(index, tuple) or isinstance(index, list)) \ 17 and len(index) == 2: 18 #Not sure if this is needed anymore: 19 return self.data[index[0]:index[1]] 20 else: 21 return self.data[index]
22 23 24 # Definition of the align section in a FSSP file
25 -class align(object):
26 abs_res_num = (0, 4) 27 pdb_res_num = (4, 9) 28 chain_id = 10 29 res_name = 12 30 ss1 = 15 31 turn3 = 17 32 turn4 = 18 33 turn5 = (20, 22) 34 acc = (34, 37) 35 start_aa_list = 42
36