IMP logo
IMP Reference Guide  2.20.1
The Integrative Modeling Platform
IMP::saxs::WeightedProfileFitter< ScoringFunctionT > Class Template Reference

Fitting of multiple profiles to the experimental one. More...

#include <IMP/saxs/WeightedProfileFitter.h>

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

Detailed Description

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

Fitting of multiple profiles to the experimental one.

The weights of the profiles are computed analytically using non-negative least squares fitting (NNLS).

Definition at line 28 of file WeightedProfileFitter.h.

Public Member Functions

 WeightedProfileFitter (const Profile *exp_profile)
 Constructor. More...
 
double compute_score (const ProfilesTemp &profiles, Vector< double > &weights, bool use_offset=false, bool NNLS=true) const
 compute a weighted score that minimizes chi More...
 
WeightedFitParameters fit_profile (ProfilesTemp partial_profiles, 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
 fit profiles by optimization of c1/c2 and weights More...
 
void write_fit_file (ProfilesTemp partial_profiles, const WeightedFitParameters &fp, const std::string fit_file_name, bool use_offset=false) const
 write a fit file More...
 
- Public Member Functions inherited from IMP::saxs::ProfileFitter< ScoringFunctionT >
 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 Profileget_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
 

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 ()
 
- Protected Attributes inherited from IMP::saxs::ProfileFitter< ScoringFunctionT >
PointerMember< const Profileexp_profile_
 
PointerMember< ScoringFunctionT > scoring_function_
 

Constructor & Destructor Documentation

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

Constructor.

Parameters
[in]exp_profileExperimental profile we want to fit

Definition at line 35 of file WeightedProfileFitter.h.

+ Here is the call graph for this function:

Member Function Documentation

template<typename ScoringFunctionT >
double IMP::saxs::WeightedProfileFitter< ScoringFunctionT >::compute_score ( const ProfilesTemp profiles,
Vector< double > &  weights,
bool  use_offset = false,
bool  NNLS = true 
) const

compute a weighted score that minimizes chi

it is assumed that the q values of the profiles are the same as the q values of the experimental profile. Use Profile::resample to resample if(NNLS = true, solve non-negative least squares, otherwise solve just least squares, that may return negative weights to be discarded later

Definition at line 91 of file WeightedProfileFitter.h.

+ Here is the call graph for this function:

template<typename ScoringFunctionT >
WeightedFitParameters IMP::saxs::WeightedProfileFitter< ScoringFunctionT >::fit_profile ( ProfilesTemp  partial_profiles,
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

fit profiles by optimization of c1/c2 and weights

it is assumed that the q values of the profiles are the same as the q values of the experimental profile. Use Profile::resample to resample

Definition at line 151 of file WeightedProfileFitter.h.

template<typename ScoringFunctionT >
void IMP::saxs::WeightedProfileFitter< ScoringFunctionT >::write_fit_file ( ProfilesTemp  partial_profiles,
const WeightedFitParameters fp,
const std::string  fit_file_name,
bool  use_offset = false 
) const

write a fit file

Definition at line 164 of file WeightedProfileFitter.h.

+ Here is the call graph for this function:


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