OpenStructure
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
stage
include
ost
qa
packing_statistics.hh
Go to the documentation of this file.
1
//------------------------------------------------------------------------------
2
// This file is part of the OpenStructure project <www.openstructure.org>
3
//
4
// Copyright (C) 2008-2011 by the OpenStructure authors
5
//
6
// This library is free software; you can redistribute it and/or modify it under
7
// the terms of the GNU Lesser General Public License as published by the Free
8
// Software Foundation; either version 3.0 of the License, or (at your option)
9
// any later version.
10
// This library is distributed in the hope that it will be useful, but WITHOUT
11
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13
// details.
14
//
15
// You should have received a copy of the GNU Lesser General Public License
16
// along with this library; if not, write to the Free Software Foundation, Inc.,
17
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
//------------------------------------------------------------------------------
19
#ifndef OST_QA_PACKING_STATISTICS_HH
20
#define OST_QA_PACKING_STATISTICS_HH
21
22
#include <
ost/mol/entity_visitor.hh
>
23
#include <
ost/qa/histogram.hh
>
24
#include <
ost/qa/amino_acids.hh
>
25
#include <
ost/mol/entity_view.hh
>
26
27
namespace
ost {
namespace
qa {
28
32
typedef
Histogram<int, int>
PackingHistogram
;
33
class
PackingStatistics
;
34
typedef
boost::shared_ptr<PackingStatistics>
PackingStatisticsPtr
;
35
class
DLLEXPORT_OST_QA
PackingStatistics
:
public
mol::EntityVisitor
{
36
public
:
37
PackingStatistics
(
Real
cutoff,
int
max_counts,
int
bucket_size);
38
PackingStatistics
();
39
42
int
GetBucketSize()
const
;
43
46
int
GetMaxCounts()
const
;
47
49
Real
GetCutoffDistance()
const
;
50
55
void
Extract
(
mol::EntityView
view,
const
mol::EntityViewList
& views);
56
57
static
PackingStatisticsPtr
LoadFromFile(
const
String
& filename);
58
59
void
SaveToFile(
const
String
& filename);
60
61
virtual
bool
VisitAtom(
const
mol::AtomHandle
& atom);
62
63
uint64_t
GetCount(
AminoAcid
aa)
const
;
64
uint64_t
GetCount(
AminoAcid
aa,
int
count)
const
;
65
66
uint64_t
GetTotalCount()
const
;
67
uint64_t
GetCount(
int
count)
const
;
68
69
template
<
typename
DS>
70
void
Serialize
(DS& ds)
71
{
72
ds & cutoff_;
73
ds & max_counts_;
74
ds & bucket_size_;
75
ds & histogram_;
76
}
77
78
Real
cutoff_
;
79
int
max_counts_
;
80
int
bucket_size_
;
81
82
private
:
83
mol::EntityView
view_;
84
mol::EntityViewList
views_;
85
PackingHistogram
histogram_;
86
};
87
88
}}
89
90
#endif
Generated on Thu Jun 14 2012 18:58:02 for OpenStructure by
1.8.1.1