From 083e26c86f82a74ac98ead21d322b9e5b92e9734 Mon Sep 17 00:00:00 2001 From: Thibault Date: Sun, 1 Sep 2019 19:23:38 +0200 Subject: [PATCH] bug fix in saving the representative frame (again). --- recipes/meta.yaml | 9 ++++++--- setup.py | 2 +- ttclust/ttclust.py | 7 +++---- ttclust/version.py | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/recipes/meta.yaml b/recipes/meta.yaml index 7fd8d8d..3194ad9 100644 --- a/recipes/meta.yaml +++ b/recipes/meta.yaml @@ -11,9 +11,9 @@ package: # sha256: 205a41d04f11a9e6ce25987d002887b57e584565737d023f0caae1e1152cd3d9 source: - path: ../ + path: ../ + - chanels: - tubiana - conda-forge @@ -37,7 +37,7 @@ requirements: - pandas - scikit-learn - prettytable - + run: - python - mdtraj @@ -67,3 +67,6 @@ about: extra: recipe-maintainers: - 'tubiana.thibault@gmail.com' + + + diff --git a/setup.py b/setup.py index 344f7f9..829b949 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ MAJOR = 4 MINOR = 6 -PATCH = 7 +PATCH = 9 VERSION = "{}.{}.{}".format(MAJOR, MINOR, PATCH) with open("ttclust/version.py", "w") as f: diff --git a/ttclust/ttclust.py b/ttclust/ttclust.py index 1f78286..8ece53d 100644 --- a/ttclust/ttclust.py +++ b/ttclust/ttclust.py @@ -470,8 +470,7 @@ def calculate_representative_frame_spread(clusters_list, DM): # Representative frame = frame with lower RMSD between all other # frame of the cluster repre = min(mean_rmsd_per_frame, key=mean_rmsd_per_frame.get) - cluster.representative = repre + 1 # Don't forget +1 to get the - # real frame number + cluster.representative = repre # spread = mean rmsd in all the cluster (*10 to have angstöm) cluster.spread = sum(mean_rmsd_per_frame.values()) / len(frames) @@ -721,9 +720,9 @@ def write_representative_frame(traj, cluster, logname): frame = cluster.representative size = cluster.size #bugfix in 4.6.8 - traj[frame-1].save_pdb("{}/C{}-f{}-s{}.pdb".format(logname, + traj[frame].save_pdb("{}/C{}-f{}-s{}.pdb".format(logname, cluster_num, - frame, + frame+1, # +1 to get the 1 index based frame size)) diff --git a/ttclust/version.py b/ttclust/version.py index 57a2b5a..4563888 100644 --- a/ttclust/version.py +++ b/ttclust/version.py @@ -1 +1 @@ -__version__ = '4.6.8' +__version__ = '4.6.9'