allpy
diff lib/block.py @ 153:0c7f6117481b
idea implemented: pdb and sec_str data moved from monomer to sequence
author | boris <bnagaev@gmail.com> |
---|---|
date | Tue, 26 Oct 2010 21:53:23 +0400 |
parents | 675b402094be |
children | 854e33626cbe |
line diff
1.1 --- a/lib/block.py Tue Oct 26 13:32:19 2010 +0400 1.2 +++ b/lib/block.py Tue Oct 26 21:53:23 2010 +0400 1.3 @@ -87,8 +87,10 @@ 1.4 m1 = self.project.alignment[sequence][i] 1.5 m2 = self.project.alignment[sequence][j] 1.6 if m1 and m2: 1.7 - ca1 = m1.pdb_residues[chain]['CA'] 1.8 - ca2 = m2.pdb_residues[chain]['CA'] 1.9 + r1 = sequence.pdb_residues[chain][m1] 1.10 + r2 = sequence.pdb_residues[chain][m2] 1.11 + ca1 = r1['CA'] 1.12 + ca2 = r2['CA'] 1.13 d = ca1 - ca2 # Bio.PDB feature 1.14 distances.append(d) 1.15 if len(distances) >= 2: 1.16 @@ -129,7 +131,7 @@ 1.17 1.18 def ca_atoms(self, sequence, pdb_chain): 1.19 """ Iterates Ca-atom of monomers of this sequence from this block """ 1.20 - return (monomer.pdb_residues[pdb_chain] for monomer in self.monomers()) 1.21 + return (sequence.pdb_residues[pdb_chain][monomer] for monomer in self.monomers()) 1.22 1.23 def sequences_chains(self): 1.24 """ Iterates pairs (sequence, chain) """