diff --git a/create_envir_with_ttclust.yml b/create_envir_with_ttclust.yml index 733d18b..dc1d4a5 100644 --- a/create_envir_with_ttclust.yml +++ b/create_envir_with_ttclust.yml @@ -1,6 +1,7 @@ name: ttclust channels: - defaults +- conda-forge dependencies: - argcomplete - cython @@ -9,10 +10,7 @@ dependencies: - numpy - pandas - scipy >= 0.18 -- omnia::mdtraj -- pip -- pip: - - prettytable - - argparse - - sklearn - - ttclust \ No newline at end of file +- conda-forge::mdtraj +- scikit-learn +- conda-forge::prettytable +- numba \ No newline at end of file diff --git a/environment.yml b/environment.yml index b716648..4f54b41 100644 --- a/environment.yml +++ b/environment.yml @@ -1,6 +1,7 @@ name: ttclust channels: - defaults +- conda-forge dependencies: - argcomplete - cython @@ -9,7 +10,7 @@ dependencies: - numpy - pandas - scipy >= 0.18 -- conda-forge::mdtraj +- mdtraj - scikit-learn -- conda-forge::prettytable +- prettytable - numba diff --git a/setup.py b/setup.py index e4f87fb..8f37806 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ MAJOR = 4 MINOR = 8 -PATCH = 2 +PATCH = 3 VERSION = "{}.{}.{}".format(MAJOR, MINOR, PATCH) with open("ttclust/version.py", "w") as f: diff --git a/ttclust/ttclust.py b/ttclust/ttclust.py index b20efc4..6a8b5c9 100644 --- a/ttclust/ttclust.py +++ b/ttclust/ttclust.py @@ -488,7 +488,7 @@ def calculate_representative_frame_spread(clusters_list, DM): cluster.spread = sum(mean_rmsd_per_frame.values()) / len(frames) cluster.spread *= 10 -@jit(nopython=True) +@jit(nopython=True, parallel=False, cache=True, nogil=True) def calc_rmsd_2frames(ref, frame): """ RMSD calculation between a reference and a frame. @@ -700,13 +700,14 @@ def create_cluster_table(traj, args): else: print(" Matrix shape: {}".format(distances.shape)) print(" Scipy linkage in progress. Please wait. It can be long") - try: + # linkage method from https://docs.scipy.org/doc/scipy/reference/generated/scipy.cluster.hierarchy.linkage.html + linkage_methods = ['single','average','complete','weighted','centroid','median','ward'] + if args["method"] in linkage_methods: linkage = sch.linkage(distances, method=args["method"]) - except: + else: printScreenLogfile("ERROR : method name given for clustering didn't recognized") printScreenLogfile(" : methods are : single; complete; average; weighted; centroid; ward.") - printScreenLogfile(" : check https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/sc" - "ipy.cluster.hierarchy.linkage.html for more info") + printScreenLogfile(" : check https://docs.scipy.org/doc/scipy/reference/generated/scipy.cluster.hierarchy.linkage.html") sys.exit(1) print(" >Done!") print(" ...Saving linkage matrix...") diff --git a/ttclust/version.py b/ttclust/version.py index 29fd62a..87a867f 100644 --- a/ttclust/version.py +++ b/ttclust/version.py @@ -1 +1 @@ -__version__ = '4.8.2' +__version__ = '4.8.3'