/** * \file AlignmentParams.h * \brief Parameters for alignments. * * Copyright 2007-2013 IMP Inventors. All rights reserved. */ #ifndef IMPMULTIFIT_ALIGNMENT_PARAMS_H #define IMPMULTIFIT_ALIGNMENT_PARAMS_H #include #include #include #include #include #include #include IMPMULTIFIT_BEGIN_NAMESPACE struct DominoParams { DominoParams() : max_value_threshold_(10.), max_anchor_penetration_(0.1), heap_size_(10000),cache_size_(50000){} void add(const boost::property_tree::ptree &pt) { max_value_threshold_ = pt.get("domino.max_value_threshold"); max_num_states_for_subset_ = pt.get("domino.max_num_states_for_subset"); max_anchor_penetration_ = pt.get("domino.max_anchor_penetration"); heap_size_ = pt.get("domino.heap_size"); cache_size_ = pt.get("domino.cache_size"); } void show(std::ostream& s=std::cout) const{ s<<"domino parameters: max_val_thr="<("xlink.k"); max_xlink_val_ = pt.get("xlink.max_value"); treat_between_residues_ = pt.get("xlink.between_residues"); } void show(std::ostream& s=std::cout) const{ s<<"xlink parameters: upper_bound:"<("connectivity.k"); max_conn_rest_val_ = pt.get("connectivity.max_value"); } void show(std::ostream& s=std::cout) const{ s<<"connectivity parameters: upper_bound="<("fragments.radius_scale"); load_atomic_ = pt.get("fragments.atomic"); subunit_rigid_ = pt.get("fragments.rigid"); } void show(std::ostream& s=std::cout) const{ s<<"fragment parameters: frag_len="<("radius_of_gyration.max_score"); } float get_max_score()const{return max_score_;} float get_scale() const {return scale_;} void show(std::ostream& s=std::cout) const{ s<<"rog params: scale="<("excluded_volume.distance"); pair_slack_ = pt.get("excluded_volume.slack"); hlb_mean_ = pt.get("excluded_volume.lower_bound"); hlb_k_ = pt.get("excluded_volume.k"); maximum_ev_score_for_pair_ = pt.get("excluded_volume.max_score_for_pair"); allowed_percentage_of_bad_pairs_ = pt.get("excluded_volume.allowed_percentage_of_bad_pairs"); scoring_mode_ = pt.get("excluded_volume.scoring_mode"); //possible scoring modes are 0-2 if (scoring_mode_ < 0 || scoring_mode_ > 2) { throw boost::property_tree::ptree_bad_data( "excluded_volume.scoring_mode should be 0, 1, or 2", scoring_mode_); } } void show(std::ostream& s=std::cout) const{ s<<"EV params: pair_distance="<("filters.conn_max_violations"); max_num_violated_xlink_ = pt.get("filters.xlink_max_violations"); max_num_violated_ev_ = pt.get("filters.ev_max_violations"); } void show(std::ostream& s=std::cout) const{ s<<"filters params: max_num_violated_xlink="<("fitting.pca_max_angle_diff"); pca_max_size_diff_ = pt.get("fitting.pca_max_size_diff"); pca_max_cent_dist_diff_ = pt.get("fitting.pca_max_cent_dist_diff"); max_asmb_fit_score_ = pt.get("fitting.max_asmb_fit_score"); } void show(std::ostream& s=std::cout) const{ s<<"filters params: pca_max_angle_diff="<("complementarity.max_score"); max_penetration_ = pt.get("complementarity.max_penetration"); interior_layer_thickness_ = pt.get("complementarity.interior_layer_thickness"); boundary_coef_ = pt.get("complementarity.boundary_coef"); comp_coef_ = pt.get("complementarity.comp_coef"); penetration_coef_ = pt.get("complementarity.penetration_coef"); } void show(std::ostream& s=std::cout) const{ s<<"complementarity params: max_score="<