Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/diff/9f96bc38bc3d/lib/block.py
Дата изменения: Unknown
Дата индексирования: Sun Feb 3 18:21:21 2013
Кодировка:
allpy: lib/block.py diff

allpy

diff lib/block.py @ 124:9f96bc38bc3d

broken: lib::block::geometrical_core retirns block, not position list
author boris <bnagaev@gmail.com>
date Sat, 23 Oct 2010 23:32:52 +0400
parents b7c3691c47bf
children c84a7840f9b8
line diff
     1.1 --- a/lib/block.py	Sat Oct 23 23:29:18 2010 +0400
     1.2 +++ b/lib/block.py	Sat Oct 23 23:32:52 2010 +0400
     1.3 @@ -7,6 +7,7 @@
     1.4  import monomer
     1.5  import config
     1.6  from graph import Graph
     1.7 +from copy import copy
     1.8  
     1.9  class Block(object):
    1.10      """
    1.11 @@ -61,7 +62,8 @@
    1.12      def geometrical_core(self, max_delta=config.delta, 
    1.13      timeout=config.timeout, minsize=config.minsize):
    1.14          """
    1.15 -        returns sorted list of positions, representing geometrical core
    1.16 +        returns new block, representing geometrical core
    1.17 +        
    1.18          delta -- threshold of distance spreading
    1.19          
    1.20          If more than one pdb chain for some sequence provided, consider all of them
    1.21 @@ -88,7 +90,8 @@
    1.22                          if delta <= max_delta:
    1.23                              lines[Graph.line(i, j)] = 1.0 / (1.0 + max_delta)
    1.24          graph = Graph(nodes, lines)
    1.25 -        return graph.cliques(timeout=timeout, minsize=minsize)
    1.26 +        positions = graph.cliques(timeout=timeout, minsize=minsize)
    1.27 +        return Block(self.project, copy(self.sequences), positions)
    1.28      
    1.29      def xstring(self, x):
    1.30          """