LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
fid-lib.hpp
1/*
2 Fiducial library
3*/
4
5
6/*
7
8 This file is part of LOOS.
9
10 LOOS (Lightweight Object-Oriented Structure library)
11 Copyright (c) 2010, Tod D. Romo
12 Department of Biochemistry and Biophysics
13 School of Medicine & Dentistry, University of Rochester
14
15 This package (LOOS) is free software: you can redistribute it and/or modify
16 it under the terms of the GNU General Public License as published by
17 the Free Software Foundation under version 3 of the License.
18
19 This package is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with this program. If not, see <http://www.gnu.org/licenses/>.
26*/
27
28// @cond PACKAGES_INTERNAL
29
30#if !defined(LOOS_FIDLIB_HPP)
31#define LOOS_FIDLIB_HPP
32
33
34
35#include <loos.hpp>
36
37
38typedef std::vector<int> vecInt;
39typedef std::vector<uint> vecUint;
40typedef std::vector<loos::AtomicGroup> vecGroup;
41typedef std::vector<double> vecDouble;
42
43
44
45
46// Return indices of non-zero entries in the vector (i.e. frames that are not assigned)
47vecUint findFreeFrames(const vecInt& map);
48
49// Given a set of reference structures and a trajectory, classify the trajectory
50// based on which reference structure is closest to each trajectory frame
51vecUint assignStructures(loos::AtomicGroup& model, loos::pTraj& traj, const vecUint& frames, const vecGroup& refs);
52
53// Given a vector that contains indices into a trajectory, will trim off the
54// end so the # of frames is an even multiple of the requested bin size (via frac)
55vecUint trimFrames(const vecUint& frames, const double frac);
56
57// Randomly partition trajectory space
58// f = the fractional bin size (i.e. probability)
59boost::tuple<vecGroup, vecUint> pickFiducials(loos::AtomicGroup& model, loos::pTraj& traj, const vecUint& frames, const double f);
60
61// Find the max value in the vector
62int findMaxBin(const vecInt& assignments);
63
64// Simple histogram of bin assignments
65vecUint histogramBins(const vecInt& assignments);
66
67#endif
68
69
70// @endcond TOOLS_INTERNAL
Class for handling groups of Atoms (pAtoms, actually)
Definition AtomicGroup.hpp:108