IMP Reference Guide
2.21.0
The Integrative Modeling Platform
|
Fit two profiles with user-defined scoring function as a template parameter. More...
#include <IMP/saxs/ProfileFitter.h>
Fit two profiles with user-defined scoring function as a template parameter.
By default chi score is used. The scoring function template parameter class has to implement three basic functions: compute_score, compute_scale_factor and compute_offset. see ChiScore for example. Currently four scoring functions are implemented: ChiScore, ChiScoreLog, ChiFreeScore, and RatioVolatilityScore
Definition at line 29 of file ProfileFitter.h.
Public Member Functions | |
ProfileFitter (const Profile *exp_profile) | |
Constructor. More... | |
ProfileFitter (const Profile *exp_profile, ScoringFunctionT *sf) | |
double | compute_offset (const Profile *model_profile) const |
computes offset for fitting for fitting the modeled profile More... | |
double | compute_scale_factor (const Profile *model_profile, double offset=0.0) const |
computes the scaling factor needed for fitting the modeled profile More... | |
double | compute_score (const Profile *model_profile, bool use_offset=false, const std::string fit_file_name="") const |
compute fit score More... | |
FitParameters | fit_profile (Profile *partial_profile, double min_c1=0.95, double max_c1=1.05, double min_c2=-2.0, double max_c2=4.0, bool use_offset=false, const std::string fit_file_name="") const |
fit experimental profile through optimization of c1 and c2 parameters More... | |
const Profile * | get_profile () const |
void | resample (const Profile *model_profile, Profile *resampled_profile) const |
resampling of the modeled profile is required to fit the q More... | |
void | write_SAXS_fit_file (const std::string &file_name, const Profile *model_profile, const double chi_square, const double c=1, const double offset=0) const |
Public Member Functions inherited from IMP::Object | |
virtual void | clear_caches () |
CheckLevel | get_check_level () const |
LogLevel | get_log_level () const |
virtual VersionInfo | get_version_info () const |
Get information about the module and version of the object. More... | |
void | set_check_level (CheckLevel l) |
void | set_log_level (LogLevel l) |
Set the logging level used in this object. More... | |
void | set_was_used (bool tf) const |
void | show (std::ostream &out=std::cout) const |
const std::string & | get_name () const |
void | set_name (std::string name) |
virtual std::string | get_type_name () const |
Protected Attributes | |
PointerMember< const Profile > | exp_profile_ |
PointerMember< ScoringFunctionT > | scoring_function_ |
Additional Inherited Members | |
Protected Member Functions inherited from IMP::Object | |
Object (std::string name) | |
Construct an object with the given name. More... | |
virtual void | do_destroy () |
IMP::saxs::ProfileFitter< ScoringFunctionT >::ProfileFitter | ( | const Profile * | exp_profile | ) |
Constructor.
[in] | exp_profile | Experimental profile we want to fit |
Definition at line 35 of file ProfileFitter.h.
double IMP::saxs::ProfileFitter< ScoringFunctionT >::compute_offset | ( | const Profile * | model_profile | ) | const |
computes offset for fitting for fitting the modeled profile
resampling of the modeled profile is required prior to calling to this function, in order to match the q values of the exp. profile. this is not done by default to minimize the number of calls to resample.
Definition at line 88 of file ProfileFitter.h.
double IMP::saxs::ProfileFitter< ScoringFunctionT >::compute_scale_factor | ( | const Profile * | model_profile, |
double | offset = 0.0 |
||
) | const |
computes the scaling factor needed for fitting the modeled profile
resampling of the modeled profile is required prior to calling to this function, in order to match the q values of the exp. profile. this is not done by default to minimize the number of calls to resample.
Definition at line 76 of file ProfileFitter.h.
double IMP::saxs::ProfileFitter< ScoringFunctionT >::compute_score | ( | const Profile * | model_profile, |
bool | use_offset = false , |
||
const std::string | fit_file_name = "" |
||
) | const |
compute fit score
Definition at line 205 of file ProfileFitter.h.
FitParameters IMP::saxs::ProfileFitter< ScoringFunctionT >::fit_profile | ( | Profile * | partial_profile, |
double | min_c1 = 0.95 , |
||
double | max_c1 = 1.05 , |
||
double | min_c2 = -2.0 , |
||
double | max_c2 = 4.0 , |
||
bool | use_offset = false , |
||
const std::string | fit_file_name = "" |
||
) | const |
fit experimental profile through optimization of c1 and c2 parameters
c1 - adjusts the excluded volume, valid range [0.95 - 1.05] c2 - adjusts the density of hydration layer, valid range [-2.0 - 4.0]
[in] | partial_profile | partial profiles computed |
[in] | min_c1 | minimal c1 value |
[in] | max_c1 | maximal c1 value |
[in] | min_c2 | minimal c2 value |
[in] | max_c2 | maximal c2 value |
[in] | use_offset | use offset in fitting |
[in] | fit_file_name | write fit in the given filename, nothing is written if empty |
Definition at line 181 of file ProfileFitter.h.
const Profile* IMP::saxs::ProfileFitter< ScoringFunctionT >::get_profile | ( | ) | const |
Definition at line 102 of file ProfileFitter.h.
void IMP::saxs::ProfileFitter< ScoringFunctionT >::resample | ( | const Profile * | model_profile, |
Profile * | resampled_profile | ||
) | const |
resampling of the modeled profile is required to fit the q
Definition at line 119 of file ProfileFitter.h.