Clustering
Summary This script will generate files to cluster a SubPEx run
calculate_clusters_per_bin(bins, settings)
¶
create_bin_cpptraj_files(bins, settings, directory)
¶
create_cpptraj_file_bins(bins, settings, directory, key, selection_string)
¶
Creates the cpptraj file for a bin.
PARAMETER | DESCRIPTION |
---|---|
bins |
A dictionary with the bins and the walkers in each bin.
TYPE:
|
settings |
The settings dictionary.
TYPE:
|
directory |
The directory where the cpptraj files will be created.
TYPE:
|
key |
The name of the bin.
TYPE:
|
selection_string |
The selection string that will be used.
TYPE:
|
get_bins_dictionary(west, settings)
¶
Creates a dictionary with the bins and the walkers in each bin.
PARAMETER | DESCRIPTION |
---|---|
west |
The west.h5 file as a dictionary.
TYPE:
|
settings |
The settings dictionary.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
dict
|
A dictionary with the bins and the walkers in each bin.
TYPE:
|
get_clustering_bins_cpptraj(west, settings, directory)
¶
get_clustering_command_cpptraj(method, num_clusters, selection_string)
¶
Creates the clustering command for cpptraj.
PARAMETER | DESCRIPTION |
---|---|
method |
the clustering method to use. Currently, only hierarchical is implemented.
TYPE:
|
num_clusters |
The number of clusters to use.
TYPE:
|
selection_string |
The selection string for cpptraj.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
str
|
The clustering command for cpptraj.
TYPE:
|
get_clustering_generation_cpptraj(west_file, settings, directory)
¶
get_generation_walkers_list(directory_gen)
¶
get_number_clusters_generation(west_file, max_clusters, min_clusters=3)
¶
Gets the number of clusters for each generation.
PARAMETER | DESCRIPTION |
---|---|
west_file |
The west.h5 file.
TYPE:
|
max_clusters |
The maximum number of clusters to use.
TYPE:
|
min_clusters |
The minimum number of clusters to use. Defaults to 3.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[int]
|
List[int]: The number of clusters for each generation. |
get_selection_cpptraj(filename)
¶
Takes the filename of the selection string used in SubPEx and returns a selection string formated for cpptraj. The selection will take all heavy atoms of each of the residues.
PARAMETER | DESCRIPTION |
---|---|
filename |
The filename of the selection string used in SubPEx.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
str
|
The selection string formated for cpptraj.
TYPE:
|