IMP  2.0.0
The Integrative Modeling Platform
MolCnSymmAxisDetector.h
Go to the documentation of this file.
1 /**
2  * \file 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 class IMPCNMULTIFITEXPORT MolCnSymmAxisDetector {
24 public:
25  MolCnSymmAxisDetector(int symm_deg, const atom::Hierarchies &mhs);
26  algebra::PrincipalComponentAnalysis get_pca() const { return pca_;}
27  algebra::Vector3D get_symmetry_axis() const;
28  int get_symmetry_axis_index() const;
29  void show(std::ostream& out=std::cout) const {
30  out<<"symm degree:"<<symm_deg_<<std::endl;
31  out<<"symm axis:"<<get_symmetry_axis_index()<<std::endl;
32  pca_.show(out);
33  }
34  //! calculate the symmetry score around an axis
35  float calc_symm_score(int symm_axis_ind) const;
36 protected:
37 
39  algebra::PrincipalComponentAnalysis pca_;
40  int symm_deg_;
41  algebra::Transformation3D to_native_,from_native_;
42  Floats values_;
43  atom::Hierarchies mhs_;
44 };
45 IMP_VALUES(MolCnSymmAxisDetector, MolCnSymmAxisDetectors);
46 
47 IMPCNMULTIFIT_END_NAMESPACE
48 
49 #endif /* IMPCNMULTIFIT_MOL_CN_SYMM_AXIS_DETECTOR_H */