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

Support for small angle X-ray scattering (SAXS) data. More...

Detailed Description

Support for small angle X-ray scattering (SAXS) data.

Small angle X-ray scattering (SAXS) is an experimental technique that uses scattering of X-rays at low angles to determine structural information about proteins in solution. This has the advantage that a crystal is not required; however, the information is rotationally averaged.

This module provides a number of classes to handle SAXS profiles. For example, Restraint includes the fit to a SAXS profile as an IMP restraint.

See also IMP::foxs for a command line tool to generate a SAXS profile for a protein and fit it against an experimental profile, or IMP::saxs_merge for a tool to combine multiple experimental profiles.

We provide a number of command line tools to handle SAXS profiles:

cluster_profiles

Cluster SAXS profiles.

compute_chi

Calculate chi value for SAXS profiles.

compute_vr

Calculate volatility ratio for SAXS profiles.

compute_rg

Compute radius of gyration from SAXS profiles.

validate_profile

Validate SAXS profiles.

weight_profiles

Weighting of the profiles.

Info

Author(s): Dina Schneidman, Seung Joong Kim, Yannick Spill

Maintainer: duhovka

License: LGPL This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Publications:

Classes

class  ChiFreeScore
class  ChiScore
class  ChiScoreLog
class  DeltaDistributionFunction
class  DerivativeCalculator
class  Distribution
class  FitParameters
 Parameters of a fit, from ProfileFitter. More...
class  FormFactorTable
class  Profile
class  ProfileClustering
class  ProfileFitter
 Fit two profiles with user-defined scoring function as a template parameter. More...
class  RadialDistributionFunction
class  RadiusOfGyrationRestraint
 Calculate score based on radius of gyration, taken from saxs profile. More...
class  RatioVolatilityScore
class  Restraint
 Calculate score based on fit to SAXS profile. More...
class  RigidBodiesProfileHandler
 Handle the profile for a set of particles, which may include rigid bodies. More...
class  SolventAccessibleSurface
class  WeightedFitParameters
 Parameters of a weighted fit, from WeightedProfileFitter. More...
class  WeightedProfileFitter
 Fitting of multiple profiles to the experimental one. More...

Typedefs

typedef IMP::Vector< IMP::Pointer< Profile > > Profiles
typedef IMP::Vector< IMP::WeakPointer< Profile > > ProfilesTemp

Enumerations

enum  FormFactorType { ALL_ATOMS , HEAVY_ATOMS , CA_ATOMS , RESIDUES }
 type of the form factors for profile calculations More...

Functions

double compute_max_distance (const Particles &particles)
 compute max distance
double compute_max_distance (const Particles &particles1, const Particles &particles2)
Profile * compute_profile (Particles particles, double min_q=0.0, double max_q=0.5, double delta_q=0.001, FormFactorTable *ft=get_default_form_factor_table(), FormFactorType ff_type=HEAVY_ATOMS, bool hydration_layer=true, bool fit=true, bool reciprocal=false, bool ab_initio=false, bool vacuum=false, std::string beam_profile_file="")
 profile calculation for particles and a given set of options
void get_coordinates (const Particles &particles, std::vector< algebra::Vector3D > &coordinates)
FormFactorTable * get_default_form_factor_table ()
void get_form_factors (const Particles &particles, FormFactorTable *ff_table, Vector< double > &form_factors, FormFactorType ff_type)
Eigen::VectorXd NNLS (const Eigen::MatrixXd &A, const Eigen::VectorXd &b)
 non-negative least square fitting for profile weight solving problem
double radius_of_gyration (const Particles &particles)
 compute radius_of_gyration
void read_files (Model *m, const std::vector< std::string > &files, std::vector< std::string > &pdb_file_names, std::vector< std::string > &dat_files, std::vector< IMP::Particles > &particles_vec, Profiles &exp_profiles, bool residue_level=false, bool heavy_atoms_only=true, int multi_model_pdb=2, bool explicit_water=false, float max_q=0.0, int units=1)
 Parse PDB and profile files.
void read_pdb (Model *m, const std::string file, std::vector< std::string > &pdb_file_names, std::vector< IMP::Particles > &particles_vec, bool residue_level=false, bool heavy_atoms_only=true, int multi_model_pdb=2, bool explicit_water=false)
 Read PDB (or mmCIF) files.
std::string trim_extension (const std::string file_name)

Standard module functions

All IMP modules have a set of standard functions to help get information about the module and about files associated with the module.

std::string get_module_version ()
std::string get_module_name ()
std::string get_data_path (std::string file_name)
 Return the full path to one of this module's data files.
std::string get_example_path (std::string file_name)
 Return the full path to one of this module's example files.

Typedef Documentation

◆ Profiles

A vector of reference-counting object pointers.

Definition at line 336 of file Profile.h.

◆ ProfilesTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
Profile

Definition at line 336 of file Profile.h.

Enumeration Type Documentation

◆ FormFactorType

type of the form factors for profile calculations

Definition at line 33 of file FormFactorTable.h.

Function Documentation

◆ compute_max_distance() [1/2]

double IMP::saxs::compute_max_distance ( const Particles & particles)

compute max distance

Definition at line 40 of file saxs/utility.h.

Here is the call graph for this function:

◆ compute_max_distance() [2/2]

double IMP::saxs::compute_max_distance ( const Particles & particles1,
const Particles & particles2 )

compute max distance between pairs of particles one from particles1 and the other from particles2

Definition at line 56 of file saxs/utility.h.

Here is the call graph for this function:

◆ compute_profile()

Profile * IMP::saxs::compute_profile ( Particles particles,
double min_q = 0.0,
double max_q = 0.5,
double delta_q = 0.001,
FormFactorTable * ft = get_default_form_factor_table(),
FormFactorType ff_type = HEAVY_ATOMS,
bool hydration_layer = true,
bool fit = true,
bool reciprocal = false,
bool ab_initio = false,
bool vacuum = false,
std::string beam_profile_file = "" )

profile calculation for particles and a given set of options

Here is the call graph for this function:

◆ get_coordinates()

void IMP::saxs::get_coordinates ( const Particles & particles,
std::vector< algebra::Vector3D > & coordinates )

Definition at line 20 of file saxs/utility.h.

◆ get_data_path()

std::string IMP::saxs::get_data_path ( std::string file_name)

Return the full path to one of this module's data files.

To read the data file "data_library" that was placed in the data directory of this module, do something like

std::ifstream in(IMP::saxs::get_data_path("data_library"));
std::string get_data_path(std::string file_name)
Return the full path to one of this module's data files.

This will ensure that the code works both when IMP is installed or if used via the setup_environment.sh script.

Note
Each module has its own data directory, so be sure to use this function from the correct module.
Here is the call graph for this function:

◆ get_default_form_factor_table()

FormFactorTable * IMP::saxs::get_default_form_factor_table ( )

Get the default table.

Here is the call graph for this function:

◆ get_example_path()

std::string IMP::saxs::get_example_path ( std::string file_name)

Return the full path to one of this module's example files.

To read the example file "example_protein.pdb" that was placed in the examples directory of this module, do something like

std::ifstream in(IMP::saxs::get_example_path("example_protein.pdb"));
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.

This will ensure that the code works both when IMP is installed or if used via the setup_environment.sh script.

Note
Each module has its own example directory, so be sure to use this function from the correct module.
Here is the call graph for this function:

◆ get_form_factors()

void IMP::saxs::get_form_factors ( const Particles & particles,
FormFactorTable * ff_table,
Vector< double > & form_factors,
FormFactorType ff_type )

Definition at line 29 of file saxs/utility.h.

◆ get_module_name()

std::string IMP::saxs::get_module_name ( )

Definition at line 148 of file saxs_config.h.

◆ NNLS()

Eigen::VectorXd IMP::saxs::NNLS ( const Eigen::MatrixXd & A,
const Eigen::VectorXd & b )

non-negative least square fitting for profile weight solving problem

Definition at line 19 of file nnls.h.

Here is the call graph for this function:

◆ radius_of_gyration()

double IMP::saxs::radius_of_gyration ( const Particles & particles)

compute radius_of_gyration

Definition at line 74 of file saxs/utility.h.

Here is the call graph for this function:

◆ read_files()

void IMP::saxs::read_files ( Model * m,
const std::vector< std::string > & files,
std::vector< std::string > & pdb_file_names,
std::vector< std::string > & dat_files,
std::vector< IMP::Particles > & particles_vec,
Profiles & exp_profiles,
bool residue_level = false,
bool heavy_atoms_only = true,
int multi_model_pdb = 2,
bool explicit_water = false,
float max_q = 0.0,
int units = 1 )

Parse PDB and profile files.

Here is the call graph for this function:

◆ read_pdb()

void IMP::saxs::read_pdb ( Model * m,
const std::string file,
std::vector< std::string > & pdb_file_names,
std::vector< IMP::Particles > & particles_vec,
bool residue_level = false,
bool heavy_atoms_only = true,
int multi_model_pdb = 2,
bool explicit_water = false )

Read PDB (or mmCIF) files.

Here is the call graph for this function: