LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
ensembles.hpp
1/*
2 This file is part of LOOS.
3
4 LOOS (Lightweight Object-Oriented Structure library)
5 Copyright (c) 2008, Tod D. Romo, Alan Grossfield
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#if !defined(LOOS_ENSEMBLES_HPP)
25#define LOOS_ENSEMBLES_HPP
26
27#include <vector>
28#include <boost/tuple/tuple.hpp>
29
30#include <loos_defs.hpp>
31#include <MatrixImpl.hpp>
32#include <MatrixOps.hpp>
33
34#include <ProgressCounters.hpp>
35#include <ProgressTriggers.hpp>
36
37#include <AtomicGroup.hpp>
38#include <Trajectory.hpp>
39
40namespace loos {
41 class XForm;
42
44 AtomicGroup averageStructure(const std::vector<AtomicGroup>& ensemble);
45
47
50 AtomicGroup averageStructure(const std::vector<AtomicGroup>& ensemble, const std::vector<XForm>& xforms);
51
53
58 AtomicGroup averageStructure(const AtomicGroup&, const std::vector<XForm>&, pTraj& traj, const std::vector<uint>& indices);
59
61
65 AtomicGroup averageStructure(const AtomicGroup&, const std::vector<XForm>&, pTraj& traj);
66
67
68 void applyTransforms(std::vector<AtomicGroup>& ensemble, std::vector<XForm>& xforms);
69
70 void readTrajectory(std::vector<AtomicGroup>& ensemble, const AtomicGroup& model, pTraj trajectory);
71 void readTrajectory(std::vector<AtomicGroup>& ensemble, const AtomicGroup& model, pTraj trajectory, std::vector<uint>& frames);
72
73
74
75
76
77#if !defined(SWIG)
78 RealMatrix extractCoords(const std::vector<AtomicGroup>& ensemble);
79 RealMatrix extractCoords(const std::vector<AtomicGroup>& ensemble, const std::vector<XForm>& xforms);
80
81 void subtractAverage(RealMatrix& M);
82
84
88 boost::tuple<RealMatrix, RealMatrix, RealMatrix> svd(std::vector<AtomicGroup>& ensemble, const bool align = true);
89
90
91
92#endif // !defined(SWIG)
93
94
95 void appendCoords(std::vector< std::vector<double> >& ensemble,
96 AtomicGroup& model,
97 pTraj& traj,
98 const std::vector<uint>& indices,
99 const bool updates);
100
101
102 std::vector< std::vector<double> > readCoords(AtomicGroup& model,
103 pTraj& traj,
104 const std::vector<uint>& indices,
105 const bool updates);
106};
107
108
109
110#endif
extractCoords(traj)
Returns the coordinates for an entire trajectory as an MxN numpy matrix where M is 3*natoms and N is ...
Definition ensembles.py:35
Namespace for most things not already encapsulated within a class.
Definition version.cpp:3
boost::tuple< RealMatrix, RealMatrix, RealMatrix > svd(std::vector< AtomicGroup > &ensemble, bool align)
Compute the SVD of an ensemble with optional alignment (note RSVs returned are transposed)
Definition ensembles.cpp:239
AtomicGroup averageStructure(const std::vector< AtomicGroup > &ensemble)
Compute the average structure of a set of AtomicGroup objects.
Definition ensembles.cpp:36