Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/rev/f98cc0c91e06
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 00:54:36 2012
Кодировка:

Поисковые слова: m 8
allpy: f98cc0c91e06

allpy

changeset 515:f98cc0c91e06

blocks3d(): fix a bug when cliques are expanded to rectangles, we need indexes of first and last columns of clique do not use columns.index(...) to do it since different columns can be == and list.index uses ==
author boris (kodomo) <bnagaev@gmail.com>
date Wed, 23 Feb 2011 23:10:47 +0300
parents 1208a7ec6e1b
children 9089a005199e
files allpy/structure.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/allpy/structure.py	Wed Feb 23 22:16:02 2011 +0300
     1.2 +++ b/allpy/structure.py	Wed Feb 23 23:10:47 2011 +0300
     1.3 @@ -300,8 +300,8 @@
     1.4              sequences = set(monomer2sequence[m] for m in clique)
     1.5              columns = set(monomer2column[m] for m in clique)
     1.6              columns = sorted(columns, key=column2pos.get)
     1.7 -            first_column_i = self.columns.index(columns[0])
     1.8 -            last_column_i = self.columns.index(columns[-1])
     1.9 +            first_column_i = column2pos[columns[0]]
    1.10 +            last_column_i = column2pos[columns[-1]]
    1.11              block = copy(self)
    1.12              block.columns = self.columns[first_column_i:last_column_i+1]
    1.13              block.sequences = sequences