IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
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.
double compute_score (const ProfilesTemp &profiles, Vector< double > &weights, bool use_offset=false, bool NNLS=true) const
 compute a weighted score that minimizes chi
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
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
Public Member Functions inherited from IMP::saxs::ProfileFitter< ChiScore >
 ProfileFitter (const Profile *exp_profile)
 Constructor.
double compute_offset (const Profile *model_profile) const
 computes offset for fitting for fitting the modeled profile
double compute_scale_factor (const Profile *model_profile, double offset=0.0) const
 computes the scaling factor needed for fitting the modeled profile
double compute_score (const Profile *model_profile, bool use_offset=false, const std::string fit_file_name="") const
 compute fit score
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
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
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
CheckLevel get_check_level () const
 get_derived_object (self)
 Return this object cast to the most derived subclass.
LogLevel get_log_level () const
virtual VersionInfo get_version_info () const
 Get information about the module and version of the object.
void set_check_level (CheckLevel l)
void set_log_level (LogLevel l)
 Set the logging level used in this object.
const std::string & get_name () const
 Get the (not necessarily unique) name of this object.
void set_name (std::string name)
virtual std::string get_type_name () const
void set_was_used (bool tf) const
void show (std::ostream &out=std::cout) const
virtual void clear_caches ()

Additional Inherited Members

Protected Member Functions inherited from IMP::Object
 Object (std::string name)
 Construct an object with the given name.
virtual void do_destroy ()
Protected Attributes inherited from IMP::saxs::ProfileFitter< ChiScore >
PointerMember< const Profile > exp_profile_
PointerMember< ChiScore > scoring_function_

Constructor & Destructor Documentation

◆ WeightedProfileFitter()

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

◆ compute_score()

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 107 of file WeightedProfileFitter.h.

Here is the call graph for this function:

◆ fit_profile()

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 167 of file WeightedProfileFitter.h.

Here is the call graph for this function:

◆ write_fit_file()

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 180 of file WeightedProfileFitter.h.

Here is the call graph for this function:

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