IMP  2.1.0
The Integrative Modeling Platform
MolCnSymmAxisDetector.h
Go to the documentation of this file.
1 /**
2  * \file cnmultifit/MolCnSymmAxisDetector.h
3  * \brief molecule symmetry detector
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPCNMULTIFIT_MOL_CN_SYMM_AXIS_DETECTOR_H
10 #define IMPCNMULTIFIT_MOL_CN_SYMM_AXIS_DETECTOR_H
11 
13 #include <IMP/algebra/Vector3D.h>
14 #include <IMP/em/DensityMap.h>
15 #include <IMP/core/XYZ.h>
16 #include <IMP/atom/Hierarchy.h>
17 #include <IMP/constants.h>
18 #include <vector>
19 #include <IMP/cnmultifit/cnmultifit_config.h>
20 
21 IMPCNMULTIFIT_BEGIN_NAMESPACE
22 
23 //! molecule symmetry detector
24 class IMPCNMULTIFITEXPORT MolCnSymmAxisDetector {
25 public:
26  MolCnSymmAxisDetector(int symm_deg, const atom::Hierarchies &mhs);
27  algebra::PrincipalComponentAnalysis get_pca() const { return pca_;}
28  algebra::Vector3D get_symmetry_axis() const;
29  int get_symmetry_axis_index() const;
30  void show(std::ostream& out=std::cout) const {
31  out<<"symm degree:"<<symm_deg_<<std::endl;
32  out<<"symm axis:"<<get_symmetry_axis_index()<<std::endl;
33  pca_.show(out);
34  }
35  //! calculate the symmetry score around an axis
36  float calc_symm_score(int symm_axis_ind) const;
37 protected:
38 
40  algebra::PrincipalComponentAnalysis pca_;
41  int symm_deg_;
42  algebra::Transformation3D to_native_,from_native_;
43  Floats values_;
44  atom::Hierarchies mhs_;
45 };
47 
48 IMPCNMULTIFIT_END_NAMESPACE
49 
50 #endif /* IMPCNMULTIFIT_MOL_CN_SYMM_AXIS_DETECTOR_H */
Simple 3D transformation class.
Import IMP/kernel/constants.h in the namespace.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
Simple xyz decorator.
Class for handling density maps.
Decorator for helping deal with a hierarchy of molecules.
void show(Hierarchy h, std::ostream &out=std::cout)
Print out a molecular hierarchy.
Simple 3D vector class.
Principal component analysis of a set of points.