26#if !defined(LOOS_ANM_LIB_HPP)
27#define LOOS_ANM_LIB_HPP
42 std::cerr <<
"Building hessian...\n";
49 std::cerr <<
"Computing SVD of hessian...\n";
52 boost::tuple<loos::DoubleMatrix, loos::DoubleMatrix, loos::DoubleMatrix> result = svd(hessian_);
59 eigenvecs_ = boost::get<0>(result);
60 eigenvals_ = boost::get<1>(result);
61 rsv_ = boost::get<2>(result);
63 loos::Math::reverseRows(eigenvals_);
64 loos::Math::reverseColumns(eigenvecs_);
65 loos::Math::reverseRows(rsv_);
73 throw(std::logic_error(
"ANM::inverseHessian() called before ANM::solve()"));
75 uint n = eigenvals_.rows();
76 for (uint i=6; i<n; ++i) {
77 double s = 1.0 / eigenvals_[i];
78 for (uint j=0; j<n; ++j)
Anisotropic network model.
Definition anm-lib.hpp:35
loos::DoubleMatrix inverseHessian()
Return the inverted hessian matrix.
Definition anm-lib.hpp:70
void solve()
Computes the hessian and solves for the eigenpairs.
Definition anm-lib.hpp:39
Interface for all ENMs.
Definition enm-lib.hpp:67
ElasticNetworkModel(SuperBlock *blocker)
Base constructor for all ENMs.
Definition enm-lib.hpp:75
void buildHessian()
Construct the hessian using the contained SuperBlock.
Definition enm-lib.cpp:84
This class creates superblocks in a hessian.
Definition hessian.hpp:52
Simple matrix template class using policy classes to determine behavior.
Definition MatrixImpl.hpp:148
Class for tracking time.
Definition loos_timer.hpp:80
Namespace to encapsulate Elastic Network Model routines.
Definition anm-lib.hpp:32
RealMatrix MMMultiply(const RealMatrix &A, const RealMatrix &B, const bool transa, const bool transb)
Matrix-matrix multiply (using BLAS)
Definition MatrixOps.cpp:170
std::ostream & writeAsciiMatrix(std::ostream &os, const Math::Matrix< T, P, S > &M, const std::string &meta, const Math::Range &start, const Math::Range &end, const bool trans=false, F fmt=F())
Write a submatrix to a stream.
Definition MatrixWrite.hpp:140
std::string timeAsString(const double t, const uint precision)
Convert t (seconds) into a string, converting to hours and minutes as necessary.
Definition utils.cpp:203