IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform

#include <IMP/saxs/Profile.h>

Inheritance diagram for IMP::saxs::Profile:

Detailed Description

Basic profile class, can be initialized from the input file (experimental or theoretical) or computed from a set of Model Particles (theoretical)

Definition at line 34 of file Profile.h.

Public Member Functions

 Profile (const std::string &file_name, bool fit_file=false, double max_q=0.0, int units=1)
 init from file
 Profile (double qmin=0.0, double qmax=0.5, double delta=0.005)
 init for theoretical profile
void add (const Profile *other_profile, double weight=1.0)
 add another profile - useful for rigid bodies
void add (const Vector< Profile * > &profiles, const Vector< double > &weights=Vector< double >())
 add other profiles - useful for weighted ensembles
void add_errors ()
 add simulated error
void add_noise (double percentage=0.03)
 add simulated noise
void add_partial_profiles (const Profile *other_profile, double weight=1.0)
 add partial profiles
void add_partial_profiles (const Vector< Profile * > &profiles, const Vector< double > &weights=Vector< double >())
 add other partial profiles
void background_adjust (double start_q)
 background adjustment option
double calculate_I0 (const Particles &particles, FormFactorType ff_type=HEAVY_ATOMS)
 calculate Intensity at zero (= squared number of electrons)
void calculate_profile (const Particles &particles, FormFactorType ff_type=HEAVY_ATOMS, bool reciprocal=false)
 computes theoretical profile
void calculate_profile (const Particles &particles1, const Particles &particles2, FormFactorType ff_type=HEAVY_ATOMS)
void calculate_profile_constant_form_factor (const Particles &particles, double form_factor=1.0)
 calculate profile for any type of Particles that have coordinates
void calculate_profile_partial (const Particles &particles, const Vector< double > &surface=Vector< double >(), FormFactorType ff_type=HEAVY_ATOMS)
 compute profile for fitting with hydration layer and excluded volume
void calculate_profile_partial (const Particles &particles1, const Particles &particles2, const Vector< double > &surface1=Vector< double >(), const Vector< double > &surface2=Vector< double >(), FormFactorType ff_type=HEAVY_ATOMS)
 compute profile for fitting with hydration layer and excluded volume
void calculate_profile_reciprocal_partial (const Particles &particles, const Vector< double > &surface=Vector< double >(), FormFactorType ff_type=HEAVY_ATOMS)
void calculate_profile_symmetric (const Particles &particles, unsigned int n, FormFactorType ff_type=HEAVY_ATOMS)
void copy_errors (const Profile *exp_profile)
void distribution_2_profile (const RadialDistributionFunction &r_dist)
 convert to reciprocal space I(q) = Sum(P(r)*sin(qr)/qr)
void downsample (Profile *downsampled_profile, unsigned int point_number) const
 downsample the profile to a given number of points
double get_average_radius () const
double get_delta_q () const
 return sampling resolution
double get_error (unsigned int i) const
const Eigen::VectorXd & get_errors () const
unsigned int get_id () const
const Eigen::VectorXd & get_intensities () const
double get_intensity (unsigned int i) const
double get_max_q () const
 return maximal sampling point
double get_min_q () const
 return minimal sampling point
std::string get_name () const
double get_q (unsigned int i) const
const Eigen::VectorXd & get_qs () const
virtual std::string get_type_name () const override
virtual ::IMP::VersionInfo get_version_info () const override
 Get information about the module and version of the object.
double get_weight (unsigned int i) const
bool is_partial_profile () const
bool is_uniform_sampling () const
 checks the sampling of experimental profile
double mean_intensity () const
 calculate mean intensity
void offset (double c)
 offset profile by c, I(q) = I(q) - c
void profile_2_distribution (RadialDistributionFunction &rd, double max_distance) const
 convert to real space P(r) function P(r) = 1/2PI^2 Sum(I(q)*qr*sin(qr))
double radius_of_gyration (double end_q_rg=1.3) const
 compute radius of gyration with Guinier approximation
void read_partial_profiles (const std::string &file_name)
 read a partial profile from file (7 columns)
void read_SAXS_file (const std::string &file_name, bool fit_file=false, double max_q=0.0, int units=1)
 reads SAXS profile from file
void resample (const Profile *exp_profile, Profile *resampled_profile) const
 return a profile that is sampled on the q values of the exp_profile
void scale (double c)
 scale
void set_average_radius (double r)
void set_average_volume (double v)
void set_beam_profile (std::string beam_profile_file)
void set_errors (const Eigen::VectorXd &e)
void set_ff_table (FormFactorTable *ff_table)
 required for reciprocal space calculation
void set_id (unsigned int id)
void set_intensities (const Eigen::VectorXd &i)
void set_intensity (unsigned int i, double iq)
void set_name (std::string name)
void set_qs (const Eigen::VectorXd &q)
unsigned int size () const
 return number of entries in SAXS profile
void sum_partial_profiles (double c1, double c2, bool check_cashed=true)
 computes full profile for given fitting parameters
void write_partial_profiles (const std::string &file_name) const
 write a partial profile to file
void write_SAXS_file (const std::string &file_name, double max_q=0.0) const
 print to file
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
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)
void set_was_used (bool tf) const
void show (std::ostream &out=std::cout) const
virtual void clear_caches ()

Static Public Attributes

static const double modulation_function_parameter_

Protected Member Functions

void init (unsigned int size=0, unsigned int partial_profiles_size=0)
Protected Member Functions inherited from IMP::Object
 Object (std::string name)
 Construct an object with the given name.
virtual void do_destroy ()

Protected Attributes

double average_radius_
double average_volume_
Pointer< Profile > beam_profile_
double c1_
double c2_
double delta_q_
Eigen::VectorXd error_
bool experimental_
FormFactorTable * ff_table_
unsigned int id_
Eigen::VectorXd intensity_
double max_q_
double min_q_
std::string name_
std::vector< Eigen::VectorXd > partial_profiles_
Eigen::VectorXd q_
std::map< double, unsigned int > q_mapping_

Constructor & Destructor Documentation

◆ Profile() [1/2]

IMP::saxs::Profile::Profile ( const std::string & file_name,
bool fit_file = false,
double max_q = 0.0,
int units = 1 )

init from file

Parameters
[in]file_nameprofile file name
[in]fit_fileif true, intensities are read from column 3
[in]max_qread till maximal q value = max_q, or all if max_q<=0
[in]unitsgets 1, 2, or 3 for unknown q units, 1/A, or 1/nm

◆ Profile() [2/2]

IMP::saxs::Profile::Profile ( double qmin = 0.0,
double qmax = 0.5,
double delta = 0.005 )

init for theoretical profile

◆ ~Profile()

virtual IMP::saxs::Profile::~Profile ( )
virtual

Definition at line 252 of file Profile.h.

Member Function Documentation

◆ add() [1/2]

void IMP::saxs::Profile::add ( const Profile * other_profile,
double weight = 1.0 )

add another profile - useful for rigid bodies

Here is the call graph for this function:

◆ add() [2/2]

void IMP::saxs::Profile::add ( const Vector< Profile * > & profiles,
const Vector< double > & weights = Vector< double >() )

add other profiles - useful for weighted ensembles

◆ add_errors()

void IMP::saxs::Profile::add_errors ( )

add simulated error

◆ add_noise()

void IMP::saxs::Profile::add_noise ( double percentage = 0.03)

add simulated noise

◆ add_partial_profiles() [1/2]

void IMP::saxs::Profile::add_partial_profiles ( const Profile * other_profile,
double weight = 1.0 )

add partial profiles

Here is the call graph for this function:

◆ add_partial_profiles() [2/2]

void IMP::saxs::Profile::add_partial_profiles ( const Vector< Profile * > & profiles,
const Vector< double > & weights = Vector< double >() )

add other partial profiles

◆ background_adjust()

void IMP::saxs::Profile::background_adjust ( double start_q)

background adjustment option

◆ calculate_I0()

double IMP::saxs::Profile::calculate_I0 ( const Particles & particles,
FormFactorType ff_type = HEAVY_ATOMS )

calculate Intensity at zero (= squared number of electrons)

◆ calculate_profile() [1/2]

void IMP::saxs::Profile::calculate_profile ( const Particles & particles,
FormFactorType ff_type = HEAVY_ATOMS,
bool reciprocal = false )

computes theoretical profile

Definition at line 53 of file Profile.h.

◆ calculate_profile() [2/2]

void IMP::saxs::Profile::calculate_profile ( const Particles & particles1,
const Particles & particles2,
FormFactorType ff_type = HEAVY_ATOMS )

computes theoretical profile contribution from inter-molecular interactions between the particles

Definition at line 87 of file Profile.h.

◆ calculate_profile_constant_form_factor()

void IMP::saxs::Profile::calculate_profile_constant_form_factor ( const Particles & particles,
double form_factor = 1.0 )

calculate profile for any type of Particles that have coordinates

◆ calculate_profile_partial() [1/2]

void IMP::saxs::Profile::calculate_profile_partial ( const Particles & particles,
const Vector< double > & surface = Vector< double >(),
FormFactorType ff_type = HEAVY_ATOMS )

compute profile for fitting with hydration layer and excluded volume

A partial profile is a pre-computed profile, where intensities are split into 6 parts that can be summed up into a regular profile given a pair of c1/c2 values by sum_partial_profiles function. see FoXS paper for details.

◆ calculate_profile_partial() [2/2]

void IMP::saxs::Profile::calculate_profile_partial ( const Particles & particles1,
const Particles & particles2,
const Vector< double > & surface1 = Vector< double >(),
const Vector< double > & surface2 = Vector< double >(),
FormFactorType ff_type = HEAVY_ATOMS )

compute profile for fitting with hydration layer and excluded volume

◆ distribution_2_profile()

void IMP::saxs::Profile::distribution_2_profile ( const RadialDistributionFunction & r_dist)

convert to reciprocal space I(q) = Sum(P(r)*sin(qr)/qr)

◆ downsample()

void IMP::saxs::Profile::downsample ( Profile * downsampled_profile,
unsigned int point_number ) const

downsample the profile to a given number of points

Here is the call graph for this function:

◆ get_average_radius()

double IMP::saxs::Profile::get_average_radius ( ) const

Definition at line 178 of file Profile.h.

◆ get_delta_q()

double IMP::saxs::Profile::get_delta_q ( ) const

return sampling resolution

Definition at line 158 of file Profile.h.

◆ get_error()

double IMP::saxs::Profile::get_error ( unsigned int i) const

Definition at line 168 of file Profile.h.

◆ get_errors()

const Eigen::VectorXd & IMP::saxs::Profile::get_errors ( ) const

Definition at line 176 of file Profile.h.

◆ get_id()

unsigned int IMP::saxs::Profile::get_id ( ) const

Definition at line 190 of file Profile.h.

◆ get_intensities()

const Eigen::VectorXd & IMP::saxs::Profile::get_intensities ( ) const

Definition at line 175 of file Profile.h.

◆ get_intensity()

double IMP::saxs::Profile::get_intensity ( unsigned int i) const

Definition at line 166 of file Profile.h.

◆ get_max_q()

double IMP::saxs::Profile::get_max_q ( ) const

return maximal sampling point

Definition at line 164 of file Profile.h.

◆ get_min_q()

double IMP::saxs::Profile::get_min_q ( ) const

return minimal sampling point

Definition at line 161 of file Profile.h.

◆ get_name()

std::string IMP::saxs::Profile::get_name ( ) const

Definition at line 188 of file Profile.h.

◆ get_q()

double IMP::saxs::Profile::get_q ( unsigned int i) const

Definition at line 167 of file Profile.h.

◆ get_qs()

const Eigen::VectorXd & IMP::saxs::Profile::get_qs ( ) const

Definition at line 174 of file Profile.h.

◆ get_type_name()

virtual std::string IMP::saxs::Profile::get_type_name ( ) const
overridevirtual

Reimplemented from IMP::Object.

Definition at line 252 of file Profile.h.

◆ get_version_info()

virtual ::IMP::VersionInfo IMP::saxs::Profile::get_version_info ( ) const
overridevirtual

Get information about the module and version of the object.

Reimplemented from IMP::Object.

Definition at line 252 of file Profile.h.

Here is the call graph for this function:

◆ get_weight()

double IMP::saxs::Profile::get_weight ( unsigned int i) const

Definition at line 169 of file Profile.h.

◆ is_partial_profile()

bool IMP::saxs::Profile::is_partial_profile ( ) const

Definition at line 186 of file Profile.h.

◆ is_uniform_sampling()

bool IMP::saxs::Profile::is_uniform_sampling ( ) const

checks the sampling of experimental profile

◆ mean_intensity()

double IMP::saxs::Profile::mean_intensity ( ) const

calculate mean intensity

◆ offset()

void IMP::saxs::Profile::offset ( double c)

offset profile by c, I(q) = I(q) - c

Here is the call graph for this function:

◆ profile_2_distribution()

void IMP::saxs::Profile::profile_2_distribution ( RadialDistributionFunction & rd,
double max_distance ) const

convert to real space P(r) function P(r) = 1/2PI^2 Sum(I(q)*qr*sin(qr))

◆ radius_of_gyration()

double IMP::saxs::Profile::radius_of_gyration ( double end_q_rg = 1.3) const

compute radius of gyration with Guinier approximation

ln[I(q)]=ln[I(0)] - (q^2*rg^2)/3

Parameters
[in]end_q_rgdetermines the range of profile used for approximation: i.e. q*rg < end_q_rg. Use 1.3 for globular proteins, 0.8 for elongated

◆ read_partial_profiles()

void IMP::saxs::Profile::read_partial_profiles ( const std::string & file_name)

read a partial profile from file (7 columns)

◆ read_SAXS_file()

void IMP::saxs::Profile::read_SAXS_file ( const std::string & file_name,
bool fit_file = false,
double max_q = 0.0,
int units = 1 )

reads SAXS profile from file

Parameters
[in]file_nameprofile file name
[in]fit_fileif true, intensities are read from column 3
[in]max_qread till maximal q value = max_q, or all if max_q<=0
[in]unitsgets 1, 2, or 3 for unknown q units, 1/A, or 1/nm

◆ resample()

void IMP::saxs::Profile::resample ( const Profile * exp_profile,
Profile * resampled_profile ) const

return a profile that is sampled on the q values of the exp_profile

Here is the call graph for this function:

◆ scale()

void IMP::saxs::Profile::scale ( double c)

scale

◆ set_average_radius()

void IMP::saxs::Profile::set_average_radius ( double r)

Definition at line 202 of file Profile.h.

◆ set_average_volume()

void IMP::saxs::Profile::set_average_volume ( double v)

Definition at line 204 of file Profile.h.

◆ set_beam_profile()

void IMP::saxs::Profile::set_beam_profile ( std::string beam_profile_file)

Definition at line 210 of file Profile.h.

◆ set_errors()

void IMP::saxs::Profile::set_errors ( const Eigen::VectorXd & e)

Definition at line 195 of file Profile.h.

◆ set_ff_table()

void IMP::saxs::Profile::set_ff_table ( FormFactorTable * ff_table)

required for reciprocal space calculation

Definition at line 200 of file Profile.h.

◆ set_id()

void IMP::saxs::Profile::set_id ( unsigned int id)

Definition at line 208 of file Profile.h.

◆ set_intensities()

void IMP::saxs::Profile::set_intensities ( const Eigen::VectorXd & i)

Definition at line 194 of file Profile.h.

◆ set_intensity()

void IMP::saxs::Profile::set_intensity ( unsigned int i,
double iq )

Definition at line 197 of file Profile.h.

◆ set_name()

void IMP::saxs::Profile::set_name ( std::string name)

Definition at line 206 of file Profile.h.

◆ set_qs()

void IMP::saxs::Profile::set_qs ( const Eigen::VectorXd & q)

Definition at line 193 of file Profile.h.

◆ size()

unsigned int IMP::saxs::Profile::size ( ) const

return number of entries in SAXS profile

Definition at line 181 of file Profile.h.

◆ sum_partial_profiles()

void IMP::saxs::Profile::sum_partial_profiles ( double c1,
double c2,
bool check_cashed = true )

computes full profile for given fitting parameters

◆ write_partial_profiles()

void IMP::saxs::Profile::write_partial_profiles ( const std::string & file_name) const

write a partial profile to file

◆ write_SAXS_file()

void IMP::saxs::Profile::write_SAXS_file ( const std::string & file_name,
double max_q = 0.0 ) const

print to file

Parameters
[in]file_nameoutput file name
[in]max_qoutput till maximal q value = max_q, or all if max_q<=0

Member Data Documentation

◆ average_radius_

double IMP::saxs::Profile::average_radius_
protected

Definition at line 295 of file Profile.h.

◆ average_volume_

double IMP::saxs::Profile::average_volume_
protected

Definition at line 296 of file Profile.h.

◆ beam_profile_

Pointer<Profile> IMP::saxs::Profile::beam_profile_
protected

Definition at line 304 of file Profile.h.

◆ c1_

double IMP::saxs::Profile::c1_
protected

Definition at line 292 of file Profile.h.

◆ c2_

double IMP::saxs::Profile::c2_
protected

Definition at line 292 of file Profile.h.

◆ delta_q_

double IMP::saxs::Profile::delta_q_
protected

Definition at line 287 of file Profile.h.

◆ error_

Eigen::VectorXd IMP::saxs::Profile::error_
protected

Definition at line 284 of file Profile.h.

◆ experimental_

bool IMP::saxs::Profile::experimental_
protected

Definition at line 294 of file Profile.h.

◆ ff_table_

FormFactorTable* IMP::saxs::Profile::ff_table_
protected

Definition at line 288 of file Profile.h.

◆ id_

unsigned int IMP::saxs::Profile::id_
protected

Definition at line 302 of file Profile.h.

◆ intensity_

Eigen::VectorXd IMP::saxs::Profile::intensity_
protected

Definition at line 283 of file Profile.h.

◆ max_q_

double IMP::saxs::Profile::max_q_
protected

Definition at line 286 of file Profile.h.

◆ min_q_

double IMP::saxs::Profile::min_q_
protected

Definition at line 286 of file Profile.h.

◆ modulation_function_parameter_

const double IMP::saxs::Profile::modulation_function_parameter_
static

Definition at line 250 of file Profile.h.

◆ name_

std::string IMP::saxs::Profile::name_
protected

Definition at line 301 of file Profile.h.

◆ partial_profiles_

std::vector<Eigen::VectorXd> IMP::saxs::Profile::partial_profiles_
protected

Definition at line 291 of file Profile.h.

◆ q_

Eigen::VectorXd IMP::saxs::Profile::q_
protected

Definition at line 282 of file Profile.h.

◆ q_mapping_

std::map<double, unsigned int> IMP::saxs::Profile::q_mapping_
mutableprotected

Definition at line 299 of file Profile.h.


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