Pteros  2.0
Molecular modeling library for human beings!
All Classes Functions Variables Friends Pages
gnm.h
1 /*
2  * This file is a part of
3  *
4  * ============================================
5  * ### Pteros molecular modeling library ###
6  * ============================================
7  *
8  * https://github.com/yesint/pteros
9  *
10  * (C) 2009-2021, Semen Yesylevskyy
11  *
12  * All works, which use Pteros, should cite the following papers:
13  *
14  * 1. Semen O. Yesylevskyy, "Pteros 2.0: Evolution of the fast parallel
15  * molecular analysis library for C++ and python",
16  * Journal of Computational Chemistry, 2015, 36(19), 1480–1488.
17  * doi: 10.1002/jcc.23943.
18  *
19  * 2. Semen O. Yesylevskyy, "Pteros: Fast and easy to use open-source C++
20  * library for molecular analysis",
21  * Journal of Computational Chemistry, 2012, 33(19), 1632–1636.
22  * doi: 10.1002/jcc.22989.
23  *
24  * This is free software distributed under Artistic License:
25  * http://www.opensource.org/licenses/artistic-license-2.0.php
26  *
27 */
28 
29 
30 #pragma once
31 
32 #include "pteros/core/selection.h"
33 #include <Eigen/Core>
34 
35 namespace pteros {
36 
39 class GNM {
40 public:
41  GNM(const Selection& sel, float cutoff=0.7);
42 
43  Eigen::VectorXf get_eigenvector(int i) const;
44  Eigen::VectorXf get_B_factor() const;
45 
46  void write_eigenvectors(std::string fname, int v1, int v2);
47  void compute_c_matrix();
48  void compute_p_matrix();
49  void write_c_matrix(std::string fname);
50  void write_p_matrix(std::string fname);
51 
52  Eigen::MatrixXf get_subset_c_matrix(ArrayXi_const_ref subset) const;
53  Eigen::MatrixXf get_c_matrix() const;
54 private:
55  int N;
56  Selection* sel;
57  Eigen::MatrixXf eigenvectors;
58  Eigen::VectorXf eigenvalues;
59  Eigen::MatrixXf c,p;
60  Eigen::VectorXf b; // B-factor
61 };
62 
63 }
64 
65 
66 
67 
pteros::Selection
Selection class.
Definition: selection.h:65
pteros::GNM
Implementation of the Gaussian Network Model (GNM) protein model.
Definition: gnm.h:39