Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PCA.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file relax_initialization_protocols
11 /// @brief initialization protocols for relax
12 /// @detailed
13 /// Contains currently: Classic Abinitio
14 ///
15 ///
16 /// @author Oliver Lange
17 
18 
19 #ifndef INCLUDED_protocols_evaluation_PCA_hh
20 #define INCLUDED_protocols_evaluation_PCA_hh
21 
22 
23 // Unit Headers
25 
26 // Package Headers
27 
28 // Project Headers
29 #include <core/pose/Pose.fwd.hh>
30 #include <core/types.hh>
31 #include <core/id/AtomID.fwd.hh>
32 
33 
34 
35 // ObjexxFCL Headers
36 #include <ObjexxFCL/FArray2D.hh>
37 #include <ObjexxFCL/FArray3D.hh>
38 
39 // Utility headers
40 // AUTO-REMOVED #include <utility/vector1.hh>
41 #include <utility/pointer/ReferenceCount.hh>
42 
43 #include <utility/vector1.hh>
44 
45 
46 // C++ headers
47 
48 namespace protocols {
49 namespace evaluation {
50 
52  typedef ObjexxFCL::FArray2D< core::Real > CoordVector;
54 // this code is stolen from GROMACS. Hence some unfamiliar definitions
55  typedef core::Real matrix[3][3];
56  typedef core::Real rvec[3];
57 public:
58  ///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
59  virtual ~PCA();
61 
62  void read_eigvec_file( std::string fn, core::pose::Pose const& pose, int nvec = -1 );
63  void eval( core::pose::Pose const& pose, ProjectionVector& proj );
64  void show( std::ostream& );
65 private:
66  void read_structure ( std::istream& data, core::pose::Pose const& pose, IndexVector& ind, CoordVector& x, std::string endtag );
67  void fill_coordinates( core::pose::Pose const& pose, IndexVector const& ind, CoordVector & x );
68  void reset_x( Size n, CoordVector& x, rvec trans );
69  void jacobi(double a[6][6],double d[],double v[6][6],int *nrot);
70  void calc_fit_R(int natoms,rvec *xp,rvec const* x,matrix R);
71  void rotate_vec(int natoms,rvec *x,matrix R);
72  void add_vec( int natoms, rvec *x, rvec transvec );
73  void oprod(const rvec a,const rvec b,rvec c);
78  ObjexxFCL::FArray3D< core::Real > eigvec_;
80 };
81 
82 }
83 }
84 
85 #endif