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 - def __repr__(self):
6 return str(self.data)
7 __str__ = __repr__ 8
9 - def __len__(self):
10 return len(self.data)
11
12 - def __getitem__(self,index):
13 if isinstance(index, slice): 14 return self.data[index] 15 elif (isinstance(index, tuple) or isinstance(index, list)) \ 16 and len(index) == 2: 17 #Not sure if this is needed anymore: 18 return self.data[index[0]:index[1]] 19 else: 20 return self.data[index]
21 22 # Definition of the align section in a FSSP file
23 -class align:
24 abs_res_num = (0,4) 25 pdb_res_num = (4,9) 26 chain_id = 10 27 res_name = 12 28 ss1 = 15 29 turn3 = 17 30 turn4 = 18 31 turn5 = (20,22) 32 acc = (34,37) 33 start_aa_list = 42
34