|
|
unsigned int | min_multiplicator (unsigned int orig, unsigned int mult) |
| | return minimum multiplicator to fulfill result * mult >= orig
|
| |
|
void | write_fes (std::string fname, std::vector< float > fes, std::string header_comment, std::map< std::string, float > stringMap) |
| | write free energies as column into given file
|
| |
|
void | write_pops (std::string fname, std::vector< std::size_t > pops, std::string header_comment, std::map< std::string, float > stringMap) |
| | write populations as column into given file
|
| |
|
std::vector< std::size_t > | read_clustered_trajectory (std::string filename) |
| | read states from trajectory (given as plain text file)
|
| |
|
void | write_clustered_trajectory (std::string filename, std::vector< std::size_t > traj, std::string header_comment, std::map< std::string, float > stringMap) |
| | write state trajectory into plain text file
|
| |
| std::string | stringprintf (const std::string &str,...) |
| | printf-version for std::string More...
|
| |
|
std::vector< float > | read_free_energies (std::string filename) |
| | read free energies from plain text file
|
| |
| std::pair< Neighborhood, Neighborhood > | read_neighborhood (const std::string filename) |
| |
| std::vector< std::size_t > | read_concat_limits (std::string filename) |
| |
| void | write_neighborhood (const std::string filename, const Neighborhood &nh, const Neighborhood &nh_high_dens, std::string header_comment, std::map< std::string, float > stringMap) |
| |
|
std::map< std::size_t, std::size_t > | microstate_populations (std::vector< std::size_t > traj) |
| | compute microstate populations from clustered trajectory
|
| |
|
void | check_concat_limits (std::vector< std::size_t > concat_limits, std::size_t n_frames) |
| | check if concat limits were passed correctly
|
| |
|
float | read_next_float (std::ifstream &ifs) |
| | read the next float of ifstream
|
| |
|
void | read_comments (std::string filename, std::map< std::string, float > &stringMap) |
| | read comments of stringMap from file. Comments should start with #@
|
| |
|
void | append_commentsMap (std::string &header_comment, std::map< std::string, float > &stringMap) |
| | append commentsMap to header comment
|
| |
|
template<typename NUM > |
| std::vector< NUM > | read_single_column (std::string filename) |
| | read single column of numbers from given file. number type (int, float, ...) given as template parameter
|
| |
|
template<typename NUM > |
| void | write_single_column (std::string filename, std::vector< NUM > dat, std::string header_comment, bool with_scientific_format=false) |
| | write single column of numbers to given file. number type (int, float, ...) given as template parameter
|
| |
|
template<typename KEY , typename VAL > |
| void | write_map (std::string filename, std::map< KEY, VAL > mapping, std::string header_comment, bool val_then_key=false) |
| | write key-value map to plain text file with key as first and value as second column
|
| |
| template<typename NUM > |
| std::tuple< NUM *, std::size_t, std::size_t > | read_coords (std::string filename, std::vector< std::size_t > usecols=std::vector< std::size_t >()) |
| |
|
template<typename NUM > |
| void | free_coords (NUM *coords) |
| | free memory pointing to coordinates
|
| |
| template<typename NUM > |
| std::vector< NUM > | dim1_sorted_coords (const NUM *coords, std::size_t n_rows, std::size_t n_cols) |
| |
| template<typename NUM > |
| std::vector< NUM > | boxlimits (const std::vector< NUM > &xs, std::size_t boxsize, std::size_t n_rows, std::size_t n_cols) |
| |
|
template<typename NUM > |
| std::pair< std::size_t, std::size_t > | min_max_box (const std::vector< NUM > &limits, NUM val, NUM radius) |
| | return indices of min and max boxes around value for given radius.
|
| |
|
template<typename NUM > |
| NUM | string_to_num (const std::string &s) |
| | convert std::string to number of given template format
|
| |
|
template<typename T > |
| std::vector< T > | unique_elements (std::vector< T > xs) |
| | return distinct elements of vector
|
| |
additional tools used throughout the clustering package
This module contains helper functions. Most of them are for reading or writing files.