IMP  2.1.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-2013 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/kernel/Particle.h>
14 #include <IMP/kernel/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 
26 //! Compute fitting scores for a given set of rigid transformations
27 /**
28 \brief Fit a protein to its density by principal component matching
29 \param[in] rb The rigid body to be fitted
30 \param[in] rb_refiner The rigid body refiner
31 \param[in] em_map The density map to fit to
32 \param[in] threshold Use voxels above this threshold for PCA calculations
33 \param[in] wei_key The weight key of the particles in the rigid body
34 \param[in] dens_pca_input provide precalculated em_map PCA is available
35 \return fitting solutions
36 \note the function assumes the density map holds its density
37 */
38 IMPMULTIFITEXPORT em::FittingSolutions pca_based_rigid_fitting(
39  core::RigidBody rb, Refiner *rb_refiner,
40  em::DensityMap *em_map,Float threshold,
41  FloatKey wei_key=atom::Mass::get_mass_key(),
42  algebra::PrincipalComponentAnalysis dens_pca_input=
43  algebra::PrincipalComponentAnalysis());
44 
45 
46 
47 //! Compute fitting scores for a given set of rigid transformations
48 /**
49 \brief Fit a protein to its density by principal component matching
50 \param[in] ps The particles to fit (treated as rigid)
51 \param[in] em_map The density map to fit to
52 \param[in] threshold Use voxels above this threshold for PCA calculations
53 \param[in] wei_key The weight key of the particles in the rigid body
54 \param[in] dens_pca_input precalculated em_map PCA
55 \return fitting solutions
56 \note the function assumes the density map holds its density
57 */
58 IMPMULTIFITEXPORT em::FittingSolutions pca_based_rigid_fitting(
59  kernel::ParticlesTemp ps,
60  em::DensityMap *em_map,Float threshold,
61  FloatKey wei_key=atom::Mass::get_mass_key(),
62  algebra::PrincipalComponentAnalysis dens_pca_input=
63  algebra::PrincipalComponentAnalysis());
64 
65 IMPMULTIFITEXPORT
66 void write_markers(const algebra::PrincipalComponentAnalysisD<3> &pca,
67  std::ostream &out);
68 
69 IMPMULTIFIT_END_NAMESPACE
70 #endif /* IMPMULTIFIT_PCA_BASED_RIGID_FITTING_H */
A decorator for particles with mass.
Store a list of ParticlesTemp.
em::FittingSolutions pca_based_rigid_fitting(core::RigidBody rb, Refiner *rb_refiner, 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.
Class for handling density maps.
IMP::kernel::Refiner Refiner
Import IMP/kernel/ScoreState.h in the namespace.
Storage of a model, its restraints, constraints and particles.
Classes to handle individual model particles.
Simple 3D transformation class.
double Float
Basic floating-point value (could be float, double...)
Definition: base/types.h:20
Principal component analysis of a set of points.
Decorator for a sphere-like particle.
Key< 0, true > FloatKey
The type used to identify float attributes in the Particles.
preforms rigid fitting between a set of particles and a density map