IMP logo
IMP Reference Guide  2.22.0
The Integrative Modeling Platform
IMP::bayesianem Namespace Reference

Restraints for handling electron microscopy maps. More...

Detailed Description

Restraints for handling electron microscopy maps.

bayesianem, an IMP module for Bayesian multi-scale modeling of macromolecular structures based on cryo-electron microscopy density maps

Usage:

First, import the module:

``` import IMP.bayesianem import IMP.bayesianem.restraint ```

Then, select the model densities that you want to assign to the EM:

``` sel = IMP.atom.Selection(hierarchy=hier, representation_type=IMP.atom.DENSITIES) densities=sel.get_selected_particles() ```

Finally, create the restraint (replace gmm.txt by your target gmm), and add it to the model.

``` gem = IMP.bayesianem.restraint.GaussianEMRestraintWrapper(densities, target_fn=‘gmm.txt', scale_target_to_mass=True, slope=0.01, target_radii_scale=3.0, target_is_rigid_body=False) gem.add_to_model() gem.set_label("Total") output_objects.append(gem) ```

Info

Author(s): Samuel Hanot, Massimiliano Bonomi, Riccardo Pellarin

Maintainer: Riccardo Pellarin

License: LGPL

Publications: Bayesian multi-scale modeling of macromolecular structures based on cryo-electron microscopy density maps Samuel Hanot, Massimiliano Bonomi, Charles H Greenberg, Andrej Sali, Michael Nilges, Michele Vendruscolo, Riccardo Pellarin bioRxiv 113951; doi: https://doi.org/10.1101/113951 (submitted)

Classes

class  GaussianEMRestraint
 Creates a restraint between two Gaussian Mixture Models, "model" and "density". More...
 

Typedefs

typedef
IMP::algebra::DenseGrid3D
< double > 
DensityGrid
 

Functions

double gem_score_cc (Particles model_ps, Particles density_ps)
 
DensityGrid get_grid (IMP::em::DensityMap *in)
 Return a dense grid containing the voxels of the passed density map. More...
 
IMP::em::DensityMapget_masked_map (const IMP::algebra::Gaussian3Ds &gmm, const Floats &weights, IMP::em::DensityMap *densitymap, double threshold)
 
IMP::algebra::Vector3Ds get_overlap_binned (const IMP::algebra::Gaussian3Ds &gmm, const Floats &weights, IMP::em::DensityMap *dm, double factor=2.5, int Nbin=100)
 
double get_overlap_fast (const IMP::algebra::Gaussian3Ds &gmm, const Floats &weights, IMP::em::DensityMap *dm, double factor=2.5)
 
double get_percentage_closer_than (const IMP::core::XYZs &m1, const IMP::core::XYZs &m2, const double t)
 
double get_rmsd_excluding_higher_than (const IMP::core::XYZs &m1, const IMP::core::XYZs &m2, const double t)
 
double get_rmsd_of_best_population (const IMP::core::XYZs &m1, const IMP::core::XYZs &m2, const double percentage)
 
double get_rmsd_of_best_population (const IMP::atom::Selection &s1, const IMP::atom::Selection &s2, const double percentage)
 
double get_rmsd_of_best_population (const IMP::algebra::Vector3Ds &m1, const IMP::algebra::Vector3Ds &m2, const double percentage)
 
IMP::algebra::Rotation3D get_rotation_matrix (const IMP::algebra::Vector3D &x, const IMP::algebra::Vector3D &y)
 
IMP::em::DensityMapget_sub_map (const IMP::em::DensityMap *dm, const IMP::em::DensityMap *sub_gmm, const IMP::em::DensityMap *gmm)
 
IMP::algebra::Transformation3D get_transformation_aligning_first_to_second (const IMP::atom::Selection &s1, const IMP::atom::Selection &s2)
 Get the transformation to align two selections. More...
 
IMP::algebra::PrincipalComponentAnalysis NormalizePCA (const IMP::algebra::PrincipalComponentAnalysis &pca, const IMP::Particles &ps)
 
IMP::algebra::Transformation3Ds PCAalign (const IMP::algebra::PrincipalComponentAnalysis &pca1, const IMP::algebra::PrincipalComponentAnalysis &pca2)
 
float sgn (double v)
 

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 ()
 Return the version of this module, as a string. More...
 
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. More...
 
std::string get_example_path (std::string file_name)
 Return the full path to one of this module's example files. More...
 

Function Documentation

std::string IMP::bayesianem::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::bayesianem::get_data_path("data_library"));

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.
std::string IMP::bayesianem::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::bayesianem::get_example_path("example_protein.pdb"));

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.
DensityGrid IMP::bayesianem::get_grid ( DensityMap *  in_map)

Return a dense grid containing the voxels of the passed density map.

The returned grid has the same bounding box as the map.

Definition at line 182 of file bayesianem/utilities.h.

+ Here is the call graph for this function:

std::string IMP::bayesianem::get_module_version ( )

Return the version of this module, as a string.

Note
This function is only available in Python.

Definition at line 5 of file EMageFit/__init__.py.

IMP::algebra::Transformation3D IMP::bayesianem::get_transformation_aligning_first_to_second ( const IMP::atom::Selection s1,
const IMP::atom::Selection s2 
)

Get the transformation to align two selections.

Definition at line 95 of file bayesianem/utilities.h.

+ Here is the call graph for this function: