LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
vsa-lib.hpp
1/*
2 This file is part of LOOS.
3
4 LOOS (Lightweight Object-Oriented Structure library)
5 Copyright (c) 2010 Tod D. Romo
6 Department of Biochemistry and Biophysics
7 School of Medicine & Dentistry, University of Rochester
8
9 This package (LOOS) is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation under version 3 of the License.
12
13 This package is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21*/
22
23
24
30#if !defined(LOOS_VSA_LIB_HPP)
31#define LOOS_VSA_LIB_HPP
32
33#include <loos.hpp>
34#include "enm-lib.hpp"
35
36#if defined(__linux__) || defined(__CYGWIN__) || defined(__FreeBSD__)
37extern "C" {
38 void dsygvx_(int*, char*, char*, char*, int*, double*, int*, double*, int*, double*, double*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*, int*, int*);
39 void dpotrf_(char*, int*, double*, int*, int*);
40 void dtrmm_(char*, char*, char*, char*, int*, int*, double*, double*, int*, double*, int*);
41}
42#endif
43
44
45namespace ENM {
46
47
49
59 class VSA : public ElasticNetworkModel {
60 public:
61
63
68 VSA(SuperBlock* blocker, const uint subn) :
69 ElasticNetworkModel(blocker),
70 subset_size_(subn)
71 { prefix_ = "vsa"; }
72
74
80 VSA(SuperBlock* blocker, const uint subn, const loos::DoubleMatrix& M) :
81 ElasticNetworkModel(blocker),
82 subset_size_(subn),
83 masses_(M)
84 { prefix_ = "vsa"; }
85
86
87
88 void solve();
89
91
101 masses_ = M;
102 };
103
104
106 void free() {
107 masses_.reset();
108 Msp_.reset();
109 Hssp_.reset();
110 }
111
112
113 private:
114 boost::tuple<loos::DoubleMatrix, loos::DoubleMatrix> eigenDecomp(loos::DoubleMatrix& A, loos::DoubleMatrix& B);
116
117
118 private:
119 uint subset_size_;
120 loos::DoubleMatrix masses_;
121
123 loos::DoubleMatrix Hssp_;
124 };
125
126
127};
128
129
130#endif
131
132
133
Interface for all ENMs.
Definition enm-lib.hpp:67
This class creates superblocks in a hessian.
Definition hessian.hpp:52
Vibrational subsystem analysis ENM.
Definition vsa-lib.hpp:59
void free()
Free up internal storage...
Definition vsa-lib.hpp:106
void solve()
Computes the hessian and solves for the eigenpairs.
Definition vsa-lib.cpp:144
VSA(SuperBlock *blocker, const uint subn)
Constructor for VSA without masses.
Definition vsa-lib.hpp:68
void setMasses(const loos::DoubleMatrix &M)
Sets the mass matrix and determines what kind of VSA calc to use.
Definition vsa-lib.hpp:100
VSA(SuperBlock *blocker, const uint subn, const loos::DoubleMatrix &M)
Constructor for VSA with masses.
Definition vsa-lib.hpp:80
Simple matrix template class using policy classes to determine behavior.
Definition MatrixImpl.hpp:148
void reset(void)
Deallocate data...
Definition MatrixImpl.hpp:195
Namespace to encapsulate Elastic Network Model routines.
Definition anm-lib.hpp:32