LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
alignment.hpp
1/*
2 This file is part of LOOS.
3
4 LOOS (Lightweight Object-Oriented Structure library)
5 Copyright (c) 2015, 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(ALIGNMENT_HPP)
25#define ALIGNMENT_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 <XForm.hpp>
35
36
37namespace loos {
38
39 // Lower-level routines for optimizing alignment performance.
40 namespace alignment {
41
42 typedef std::vector<double> vecDouble;
43 typedef std::vector<vecDouble> vecMatrix;
44 typedef boost::tuple<vecDouble, vecDouble, vecDouble> SVDTupleVec;
45
46
47 SVDTupleVec kabschCore(const vecDouble& u, const vecDouble& v);
48 GCoord centerAtOrigin(vecDouble& v);
49 double alignedRMSD(const vecDouble& U, const vecDouble& V);
50 double centeredRMSD(const vecDouble& U, const vecDouble& V);
51 GMatrix kabsch(const vecDouble& U, const vecDouble& V);
52 void applyTransform(const GMatrix& M, vecDouble& v);
53 vecDouble averageCoords(const vecMatrix& ensemble);
54 double rmsd(const vecDouble& u, const vecDouble& v);
55
56
57 }
58
59#if !defined(SWIG)
60 boost::tuple<std::vector<XForm>,greal,int> iterativeAlignment(alignment::vecMatrix& ensemble,
61 greal threshold=1e-6,
62 int maxiter=1000);
63
64 boost::tuple<std::vector<XForm>,greal,int> iterativeAlignment(std::vector<AtomicGroup>& ensemble,
65 greal threshold=1e-6,
66 int maxiter=1000);
67
69
78 boost::tuple<std::vector<XForm>,greal,int> iterativeAlignment(const AtomicGroup& model,
79 pTraj& traj,
80 const std::vector<uint>& frame_indices,
81 greal threshold=1e-6,
82 int maxiter=1000);
83
84
85 boost::tuple<std::vector<XForm>,greal,int> iterativeAlignment(const AtomicGroup& model,
86 pTraj& traj,
87 greal threshold=1e-6,
88 int maxiter=1000);
89
90
91#endif // !defined(SWIG)
92}
93
94
95
96#endif
97
98
99
iterativeAlignment(ensemble, threshold=1e-8, maxiter=1000)
Iteratively align a loos.pyloos.Trajectory object (or a list of AtomicGroups)
Definition alignment.py:12
Namespace for most things not already encapsulated within a class.
Definition version.cpp:3