allpy
changeset 345:91b015afd92b
Changed names & docstrings of classes in allpy.pdb to identify their mixinity. (closes #13)
author | Daniil Alexeyevsky <me.dendik@gmail.com> |
---|---|
date | Thu, 20 Jan 2011 21:51:24 +0300 |
parents | 0586317b3a99 |
children | 7880ea44e56b |
files | allpy/pdb.py |
diffstat | 1 files changed, 20 insertions(+), 4 deletions(-) [+] |
line diff
1.1 --- a/allpy/pdb.py Wed Jan 19 20:33:51 2011 +0300 1.2 +++ b/allpy/pdb.py Thu Jan 20 21:51:24 2011 +0300 1.3 @@ -75,8 +75,12 @@ 1.4 #~ model = parse[5] 1.5 #~ return code, chain, model 1.6 1.7 -class Sequence(base.Sequence): 1.8 - """Sequence with associated PDB structure. 1.9 +class SequenceMixin(base.Sequence): 1.10 + """Mixin for adding PDB data to a Sequence. 1.11 + 1.12 + Please note: since this is a mixin, no objects of this class should be 1.13 + created. This class is intended to be subclassed together with one of 1.14 + Sequence classes. 1.15 1.16 Attributes: 1.17 1.18 @@ -221,7 +225,13 @@ 1.19 return chain in self.pdb_secstr and monomer in self.pdb_secstr[chain] 1.20 1.21 1.22 -class Alignment(base.Alignment): 1.23 +class AlignmentMixin(base.Alignment): 1.24 + """Mixin to add 3D properties to alignments. 1.25 + 1.26 + Please note: since this is a mixin, no objects of this class should be 1.27 + created. This class is intended to be subclassed together with one of 1.28 + Alignment classes. 1.29 + """ 1.30 1.31 def secstr(self, sequence, pdb_chain, gap='-'): 1.32 """ Returns string representing secondary structure """ 1.33 @@ -229,7 +239,13 @@ 1.34 (sequence.pdb_secstr[pdb_chain][m] if sequence.secstr_has(pdb_chain, m) else gap) 1.35 for m in self.body[sequence]]) 1.36 1.37 -class Block(base.Block): 1.38 +class BlockMixin(base.Block): 1.39 + """Mixin to add 3D properties to blocks. 1.40 + 1.41 + Please note: since this is a mixin, no objects of this class should be 1.42 + created. This class is intended to be subclassed together with one of 1.43 + Block classes. 1.44 + """ 1.45 1.46 def geometrical_cores(self, max_delta=config.delta, 1.47 timeout=config.timeout, minsize=config.minsize,