IMP  2.0.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/VersionInfo.h>
14 #include <IMP/Particle.h>
15 #include <IMP/Model.h>
16 #include <IMP/em/DensityMap.h>
17 #include <IMP/em/rigid_fitting.h>
18 #include <IMP/multifit/multifit_config.h>
19 #include <IMP/atom/Mass.h>
20 #include <IMP/ScoreState.h>
23 #include <algorithm>
24 IMPMULTIFIT_BEGIN_NAMESPACE
25 
26 
27 //! Compute fitting scores for a given set of rigid transformations
28 /**
29 \brief Fit a protein to its density by principle component matching
30 \param[in] rb The rigid body to be fitted
31 \param[in] rb_refiner The rigid body refiner
32 \param[in] em_map The density map to fit to
33 \param[in] threshold Use voxels above this threshold for PCA calculations
34 \param[in] wei_key The weight key of the particles in the rigid body
35 \param[in] dens_pca_input provide precalculated em_map PCA is available
36 \return fitting solutions
37 \note the function assumes the density map holds its density
38 */
39 IMPMULTIFITEXPORT em::FittingSolutions pca_based_rigid_fitting(
40  core::RigidBody rb, Refiner *rb_refiner,
41  em::DensityMap *em_map,Float threshold,
42  FloatKey wei_key=atom::Mass::get_mass_key(),
43  algebra::PrincipalComponentAnalysis dens_pca_input=
44  algebra::PrincipalComponentAnalysis());
45 
46 
47 
48 //! Compute fitting scores for a given set of rigid transformations
49 /**
50 \brief Fit a protein to its density by principle component matching
51 \param[in] ps The particles to fit (treated as rigid)
52 \param[in] em_map The density map to fit to
53 \param[in] threshold Use voxels above this threshold for PCA calculations
54 \param[in] wei_key The weight key of the particles in the rigid body
55 \param[in] dens_pca_input provide precalculated em_map PCA is available
56 \return fitting solutions
57 \note the function assumes the density map holds its density
58 */
59 IMPMULTIFITEXPORT em::FittingSolutions pca_based_rigid_fitting(
60  ParticlesTemp ps,
61  em::DensityMap *em_map,Float threshold,
62  FloatKey wei_key=atom::Mass::get_mass_key(),
63  algebra::PrincipalComponentAnalysis dens_pca_input=
64  algebra::PrincipalComponentAnalysis());
65 
66 IMPMULTIFITEXPORT
67 void write_markers(const algebra::PrincipalComponentAnalysisD<3> &pca,
68  std::ostream &out);
69 
70 IMPMULTIFIT_END_NAMESPACE
71 #endif /* IMPMULTIFIT_PCA_BASED_RIGID_FITTING_H */