Skip to content

Commit

Permalink
Merge branch 'release-1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
tzok committed Jul 24, 2020
2 parents 199a808 + 89a53cd commit f74d805
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions eltetrado
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ from Bio.PDB import PDBParser, MMCIFParser, Structure, Residue, Atom
from Bio.PDB.Atom import DisorderedAtom
from Bio.PDB.StructureBuilder import StructureBuilder

__version__ = '0.0.2-rc4'
__version__ = '1.0.0'

LW_SCORE = {
'cWW': 1, 'tWW': 2, 'cWH': 3, 'tWH': 4, 'cWS': 5, 'tWS': 6,
Expand Down Expand Up @@ -529,7 +529,7 @@ class Analysis:
classification = list(self.__get_classification())
score = (
sum(scores[c] for c in classification),
self.__sum_squares_chain_distances(chain_groups, permutation))
self.__sum_squares_chain_distances(permutation))
# print('Checking reorder:', ', '.join(permutation), ''.join(classification))
if score < best_score:
best_score = score
Expand Down Expand Up @@ -577,9 +577,10 @@ class Analysis:
break
return chains.values()

def __sum_squares_chain_distances(self, chain_groups: Iterable[set], chain_order: Tuple) -> int:
def __sum_squares_chain_distances(self, chain_order: Tuple) -> int:
chain_pairs = set(
(frozenset((p.pair[0].chain, p.pair[1].chain)) for h in self.helices for t in h.tetrads for p in t.pairs))
(frozenset((p.pair[0].chain, p.pair[1].chain)) for h in self.helices for t in h.tetrads for p in t.pairs
if p.pair[0].chain != p.pair[1].chain))
index = {chain: chain_order.index(chain) for chain in chain_order}
sum_sq = 0
for c1, c2 in chain_pairs:
Expand Down
2 changes: 1 addition & 1 deletion has_tetrad
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import tempfile

from collections import defaultdict

__version__ = '0.0.2-rc4'
__version__ = '1.0.0'


class Pair:
Expand Down

0 comments on commit f74d805

Please sign in to comment.