OpenStructure
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
stage
include
ost
qa
all_atom_potential.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_ALL_ATOM_POTENTIAL_HH
20
#define OST_QA_ALL_ATOM_POTENTIAL_HH
21
/*
22
Author: Marco Biasini
23
*/
24
25
#include <boost/shared_ptr.hpp>
26
#include <
ost/qa/module_config.hh
>
27
#include <
ost/qa/interaction_statistics.hh
>
28
29
30
namespace
ost {
namespace
qa {
31
32
class
AllAtomPotential
;
33
typedef
boost::shared_ptr<AllAtomPotential>
AllAtomPotentialPtr
;
34
36
struct
DLLEXPORT_OST_QA
AllAtomPotentialOpts
{
37
38
AllAtomPotentialOpts
();
39
40
AllAtomPotentialOpts(
float
lower_cutoff,
float
upper_cutoff,
41
float
distance_bucket_size,
int
sequence_sep,
42
float
sigma=0.02);
43
44
public
:
46
float
sigma
;
48
float
lower_cutoff
;
50
float
upper_cutoff
;
51
53
float
distance_bucket_size
;
55
int
sequence_sep
;
56
57
template
<
typename
DS>
58
void
Serialize
(DS& ds);
59
};
60
61
62
63
class
DLLEXPORT_OST_QA
AllAtomPotential
{
64
public
:
67
static
AllAtomPotentialPtr
Create(
const
InteractionStatisticsPtr
& s,
68
const
AllAtomPotentialOpts
& o);
69
71
static
AllAtomPotentialPtr
LoadFromFile(
const
String
& filename);
72
74
void
SaveToFile(
const
String
& filename);
75
77
float
GetTotalEnergy(
mol::EntityView
view);
78
81
float
GetEnergy(
atom::ChemType
type_a,
atom::ChemType
type_b,
82
float
distance)
83
{
84
return
energies_.Get(type_a, type_b, distance);
85
}
90
float
GetTotalEnergy(
mol::EntityView
view,
mol::EntityView
target_view);
91
93
int
GetEnergyCounts
()
const
{
return
interaction_counts_; }
94
96
void
SetSequenceSeparation(
int
seq_sep);
97
98
const
AllAtomPotentialOpts
&
GetOptions
()
const
{
return
options_; }
99
template
<
typename
DS>
100
void
Serialize
(DS& ds);
101
public
:
102
void
Fill(
const
InteractionStatisticsPtr
& stats);
103
105
typedef
MultiClassifier<float, int, int, float>
AllAtomEnergies
;
106
private
:
107
AllAtomPotentialOpts
options_;
108
AllAtomEnergies
energies_;
109
mol::EntityView
target_view_;
110
int
interaction_counts_;
111
};
112
113
}}
114
115
#endif
Generated on Thu Jun 14 2012 18:58:02 for OpenStructure by
1.8.1.1