IMP logo
IMP Reference Guide  2.10.1
The Integrative Modeling Platform
IMP::saxs::ProfileFitter< ScoringFunctionT > Class Template Reference

Fit two profiles with user-defined scoring function as a template parameter. More...

#include <IMP/saxs/ProfileFitter.h>

+ Inheritance diagram for IMP::saxs::ProfileFitter< ScoringFunctionT >:

Detailed Description

template<typename ScoringFunctionT = ChiScore>
class IMP::saxs::ProfileFitter< ScoringFunctionT >

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...
 
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 Profileexp_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 ()
 

Constructor & Destructor Documentation

template<typename ScoringFunctionT = ChiScore>
IMP::saxs::ProfileFitter< ScoringFunctionT >::ProfileFitter ( const Profile exp_profile)

Constructor.

Parameters
[in]exp_profileExperimental profile we want to fit

Definition at line 35 of file ProfileFitter.h.

Member Function Documentation

template<typename ScoringFunctionT = ChiScore>
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.

template<typename ScoringFunctionT = ChiScore>
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.

template<typename ScoringFunctionT >
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 202 of file ProfileFitter.h.

+ Here is the call graph for this function:

template<typename ScoringFunctionT >
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]

Parameters
[in]partial_profilepartial profiles computed
[in]min_c1minimal c1 value
[in]max_c1maximal c1 value
[in]min_c2minimal c2 value
[in]max_c2maximal c2 value
[in]use_offsetuse offset in fitting
[in]fit_file_namewrite fit in the given filename, nothing is written if empty
Returns
FitParameters (score, c1, c2)

Definition at line 178 of file ProfileFitter.h.

+ Here is the call graph for this function:

template<typename ScoringFunctionT >
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 116 of file ProfileFitter.h.

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: