Skip to content

Commit

Permalink
bug fix in saving the representative frame (again).
Browse files Browse the repository at this point in the history
  • Loading branch information
tubiana committed Sep 1, 2019
1 parent 2a93734 commit 083e26c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
9 changes: 6 additions & 3 deletions recipes/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ package:
# sha256: 205a41d04f11a9e6ce25987d002887b57e584565737d023f0caae1e1152cd3d9

source:
path: ../
path: ../



chanels:
- tubiana
- conda-forge
Expand All @@ -37,7 +37,7 @@ requirements:
- pandas
- scikit-learn
- prettytable

run:
- python
- mdtraj
Expand Down Expand Up @@ -67,3 +67,6 @@ about:
extra:
recipe-maintainers:
- '[email protected]'



2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 3 additions & 4 deletions ttclust/ttclust.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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))


Expand Down
2 changes: 1 addition & 1 deletion ttclust/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '4.6.8'
__version__ = '4.6.9'

0 comments on commit 083e26c

Please sign in to comment.