IMP logo
IMP Reference Guide  2.11.0
The Integrative Modeling Platform
pca_based_rigid_fitting.h
Go to the documentation of this file.
1 /**
2  * \file IMP/multifit/pca_based_rigid_fitting.h
3  * \brief preforms rigid fitting between a set of particles and a density map
4  *
5  * Copyright 2007-2019 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPMULTIFIT_PCA_BASED_RIGID_FITTING_H
9 #define IMPMULTIFIT_PCA_BASED_RIGID_FITTING_H
10 
11 #include <IMP/core/XYZR.h>
13 #include <IMP/Particle.h>
14 #include <IMP/Model.h>
15 #include <IMP/em/DensityMap.h>
16 #include <IMP/em/rigid_fitting.h>
17 #include <IMP/multifit/multifit_config.h>
18 #include <IMP/atom/Mass.h>
19 #include <IMP/ScoreState.h>
22 #include <algorithm>
23 IMPMULTIFIT_BEGIN_NAMESPACE
24 
25 //! Compute fitting scores for a given set of rigid transformations
26 /**
27 \brief Fit a protein to its density by principal component matching
28 \param[in] rb The rigid body to be fitted
29 \param[in] rb_refiner The rigid body refiner
30 \param[in] em_map The density map to fit to
31 \param[in] threshold Use voxels above this threshold for PCA calculations
32 \param[in] wei_key The weight key of the particles in the rigid body
33 \param[in] dens_pca_input provide precalculated em_map PCA is available
34 \return fitting solutions
35 \note the function assumes the density map holds its density
36 */
37 IMPMULTIFITEXPORT em::FittingSolutions pca_based_rigid_fitting(
38  core::RigidBody rb, Refiner *rb_refiner, em::DensityMap *em_map,
39  Float threshold, FloatKey wei_key = atom::Mass::get_mass_key(),
40  algebra::PrincipalComponentAnalysis dens_pca_input =
41  algebra::PrincipalComponentAnalysis());
42 
43 //! Compute fitting scores for a given set of rigid transformations
44 /**
45 \brief Fit a protein to its density by principal component matching
46 \param[in] ps The particles to fit (treated as rigid)
47 \param[in] em_map The density map to fit to
48 \param[in] threshold Use voxels above this threshold for PCA calculations
49 \param[in] wei_key The weight key of the particles in the rigid body
50 \param[in] dens_pca_input precalculated em_map PCA
51 \return fitting solutions
52 \note the function assumes the density map holds its density
53 */
54 IMPMULTIFITEXPORT em::FittingSolutions pca_based_rigid_fitting(
55  ParticlesTemp ps, em::DensityMap *em_map, Float threshold,
56  FloatKey wei_key = atom::Mass::get_mass_key(),
57  algebra::PrincipalComponentAnalysis dens_pca_input =
58  algebra::PrincipalComponentAnalysis());
59 
60 IMPMULTIFITEXPORT
61 void write_markers(const algebra::PrincipalComponentAnalysisD<3> &pca,
62  std::ostream &out);
63 
64 IMPMULTIFIT_END_NAMESPACE
65 #endif /* IMPMULTIFIT_PCA_BASED_RIGID_FITTING_H */
A decorator for particles with mass.
Key< 0 > FloatKey
The type used to identify float attributes in the Particles.
Definition: base_types.h:32
em::FittingSolutions pca_based_rigid_fitting(ParticlesTemp ps, em::DensityMap *em_map, Float threshold, FloatKey wei_key=atom::Mass::get_mass_key(), algebra::PrincipalComponentAnalysis dens_pca_input=algebra::PrincipalComponentAnalysis())
Compute fitting scores for a given set of rigid transformations.
Store a list of ParticleIndexes.
Storage of a model, its restraints, constraints and particles.
Class for handling density maps.
Shared score state.
Simple 3D transformation class.
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
double Float
Basic floating-point value (could be float, double...)
Definition: types.h:20
Principal component analysis of a set of points.
Decorator for a sphere-like particle.
preforms rigid fitting between a set of particles and a density map