clustering  0.12
Clustering suite for molecular dynamics trajectories.
 All Classes Namespaces Files Functions Variables Typedefs
Typedefs | Functions
Clustering::MPP Namespace Reference

functions related to "Most Probable Path"-clustering More...

Typedefs

using SparseMatrixF = boost::numeric::ublas::mapped_matrix< float >
 BOOST implementation of a sparse matrix for floats.
 
using Neighborhood = Clustering::Tools::Neighborhood
 Neighborhood per frame.
 

Functions

SparseMatrixF transition_counts (std::vector< std::size_t > trajectory, std::vector< std::size_t > concat_limits, std::size_t n_lag_steps)
 
SparseMatrixF row_normalized_transition_probabilities (SparseMatrixF count_matrix, std::set< std::size_t > microstate_names)
 compute transition matrix from counts by normalization of rows
 
std::map< std::size_t,
std::size_t > 
single_step_future_state (SparseMatrixF transition_matrix, std::set< std::size_t > cluster_names, float q_min, std::map< std::size_t, float > min_free_energy)
 
std::map< std::size_t,
std::vector< std::size_t > > 
most_probable_path (std::map< std::size_t, std::size_t > future_state, std::set< std::size_t > cluster_names)
 
std::map< std::size_t,
std::size_t > 
microstate_populations (std::vector< std::size_t > clusters, std::set< std::size_t > cluster_names)
 compute cluster populations
 
std::map< std::size_t, float > microstate_min_free_energy (const std::vector< std::size_t > &clustering, const std::vector< float > &free_energy)
 
std::map< std::size_t,
std::size_t > 
path_sinks (std::vector< std::size_t > clusters, std::map< std::size_t, std::vector< std::size_t >> mpp, SparseMatrixF transition_matrix, std::set< std::size_t > cluster_names, float q_min, std::vector< float > free_energy)
 
std::vector< std::size_t > lumped_trajectory (std::vector< std::size_t > trajectory, std::map< std::size_t, std::size_t > sinks)
 
std::tuple< std::vector
< std::size_t >, std::map
< std::size_t, std::size_t > > 
fixed_metastability_clustering (std::vector< std::size_t > initial_trajectory, std::vector< std::size_t > concat_limits, float q_min, std::size_t lagtime, std::vector< float > free_energy)
 run clustering for given Q_min value
 
void main (boost::program_options::variables_map args)
 

Detailed Description

functions related to "Most Probable Path"-clustering

Function Documentation

std::vector< std::size_t > Clustering::MPP::lumped_trajectory ( std::vector< std::size_t >  trajectory,
std::map< std::size_t, std::size_t >  sinks 
)

lump states based on path sinks and return new trajectory. new microstates will have IDs of sinks.

Definition at line 238 of file mpp.cpp.

void Clustering::MPP::main ( boost::program_options::variables_map  args)

MPP clustering control function and user interface
parsed arguments:

  • basename: name format for output files
  • input: input file with microstate trajectory
  • lagtime: lag for transition estimation in units of frame numbers
  • qmin-from: lower limit for metastability (Q_min)
  • qmin-to: upper limit for metastability (Q_min)
  • qmin-step: stepping for metastability (Q_min)
  • concat-limits: discontinuities for concatenated, non-uniformly long trajectories
  • concat-nframes: number of frames per sub-trajectory for concatenated, uniformly long trajectories

Definition at line 320 of file mpp.cpp.

std::map< std::size_t, float > Clustering::MPP::microstate_min_free_energy ( const std::vector< std::size_t > &  clustering,
const std::vector< float > &  free_energy 
)

assign every state the lowest free energy value of all of its frames.

Definition at line 167 of file mpp.cpp.

std::map< std::size_t, std::vector< std::size_t > > Clustering::MPP::most_probable_path ( std::map< std::size_t, std::size_t >  future_state,
std::set< std::size_t >  cluster_names 
)

for every state, compute most probable path by following the 'future_state'-mapping recursively

Definition at line 135 of file mpp.cpp.

std::map< std::size_t, std::size_t > Clustering::MPP::path_sinks ( std::vector< std::size_t >  clusters,
std::map< std::size_t, std::vector< std::size_t >>  mpp,
SparseMatrixF  transition_matrix,
std::set< std::size_t >  cluster_names,
float  q_min,
std::vector< float >  free_energy 
)

compute path sinks, i.e. states of highest metastability, and lowest free energy per path. these sinks will be states all other states of the given path will be lumped into.

Definition at line 184 of file mpp.cpp.

std::map< std::size_t, std::size_t > Clustering::MPP::single_step_future_state ( SparseMatrixF  transition_matrix,
std::set< std::size_t >  cluster_names,
float  q_min,
std::map< std::size_t, float >  min_free_energy 
)

compute immediate future (i.e. without lag) of every state from highest probable transitions; exclude self-transitions.

Definition at line 85 of file mpp.cpp.

SparseMatrixF Clustering::MPP::transition_counts ( std::vector< std::size_t >  trajectory,
std::vector< std::size_t >  concat_limits,
std::size_t  n_lag_steps 
)

count transitions from one to the other cluster with certain lag and return as count matrix (row/col := from/to)

Definition at line 33 of file mpp.cpp.