Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
protocols
noesy_assign
PeakCalibrator.hh
Go to the documentation of this file.
1
// (c) This file is part of the Rosetta software suite and is made available under license.
2
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
3
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
4
// (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
5
6
/// @file PeakCalibratorList.hh
7
/// @author Oliver Lange
8
9
#ifndef INCLUDED_protocols_noesy_assign_PeakCalibrator_hh
10
#define INCLUDED_protocols_noesy_assign_PeakCalibrator_hh
11
12
13
// Unit Header
14
//#include <devel/NoesyAssign/PeakCalibrator.fwd.hh>
15
16
// Package Headers
17
// #include <devel/NoesyAssign/PeakCalibratorInfo.hh>
18
// #include <devel/NoesyAssign/PeakAssignment.hh>
19
// #include <devel/NoesyAssign/ResonanceList.fwd.hh>
20
21
// Project Headers
22
#include <
core/types.hh
>
23
#include <
core/id/NamedAtomID.fwd.hh
>
24
//#include <core/chemical/AA.hh>
25
#include <
protocols/noesy_assign/CrossPeak.hh
>
26
#include <
protocols/noesy_assign/CrossPeakList.fwd.hh
>
27
28
// Utility headers
29
//#include <utility/exit.hh>
30
// #include <utility/excn/Exceptions.hh>
31
//#include <utility/vector1.hh>
32
#include <utility/pointer/ReferenceCount.hh>
33
// #include <numeric/numeric.functions.hh>
34
// #include <basic/prof.hh>
35
//#include <basic/Tracer.hh>
36
// #include <basic/options/option.hh>
37
// #include <basic/options/keys/abinitio.OptionKeys.gen.hh>
38
// #include <basic/options/keys/run.OptionKeys.gen.hh>
39
//#include <basic/options/keys/templates.OptionKeys.gen.hh>
40
41
//// C++ headers
42
//#include <cstdlib>
43
// #include <string>
44
// #include <list>
45
#include <map>
46
#include <bitset>
47
48
#include <
protocols/noesy_assign/PeakCalibrator.fwd.hh
>
49
#include <utility/vector1.hh>
50
#include <list>
51
52
namespace
protocols {
53
namespace
noesy_assign {
54
55
class
PeakCalibrator
:
public
utility::pointer::ReferenceCount
{
56
public
:
57
///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
58
virtual
~PeakCalibrator
();
59
60
typedef
std::bitset< MAX_TYPE >
TypeCumulator
;
61
PeakCalibrator
(
int
target_sign );
62
63
virtual
PeakCalibratorOP
fresh_instance
() = 0;
64
65
void
reset_statistics
();
66
void
collect_target_statistics
(
core::Real
,
TypeCumulator
const
& );
67
bool
interpolate_on_statistics
();
68
69
virtual
void
collect_upperbound_statistics
(
core::Size
/*peak*/
,
TypeCumulator
const
&
/*types*/
) = 0;
70
// virtual void show_statistics( std::ostream& );
71
virtual
void
init_calibrator
() {};
//to create constraints for example
72
73
core::Real
operator()
(
CALIBRATION_ATOM_TYPE
atom )
const
{
return
calibration_constant
( atom ); }
74
core::Real
calibration_constant
(
CALIBRATION_ATOM_TYPE
type )
const
{
return
calibration_constant_
[ type ]; };
75
// void interpolate( PeakCalibrator const& cal1, PeakCalibrator const& cal2 );
76
77
void
interpolate_too_small
(
core::Size
type );
78
void
interpolate_too_big
(
core::Size
type );
79
80
void
reset_calibration_constants
();
81
82
void
add_peak
(
CrossPeakOP
peak );
83
void
set_new_upper_bounds
();
84
85
void
do_calibration
();
86
87
void
set_target_and_tolerance
(
core::Real
target,
core::Real
tolerance );
88
89
static
CALIBRATION_ATOM_TYPE
atom_type
(
core::id::NamedAtomID
const
& atom,
core::chemical::AA
aa );
90
91
virtual
void
eliminate_violated_constraints
() {};
92
93
protected
:
94
utility::vector1< CrossPeakOP >
const
&
peaks
() {
return
peaks_
; }
95
96
private
:
97
core::Size
max_type_direct_
;
98
core::Real
accumulated_target_
[
MAX_TYPE
];
99
typedef
std::list< core::Real >
TargetValues
;
100
TargetValues
target_values_
[
MAX_TYPE
];
101
core::Size
accumulated_count_
[
MAX_TYPE
];
102
103
core::Real
calibration_constant_
[
MAX_TYPE
];
104
core::Real
calibration_constant_lows_
[
MAX_TYPE
];
105
core::Real
calibration_constant_highs_
[
MAX_TYPE
];
106
core::Size
max_type_
;
107
// core::Real Q_backbone_;
108
//core::Real Q_methyl_;
109
//core::Real Q_nonmethyl_sidechain_;
110
//core::Real Q_nonmethyl_beta_;
111
utility::vector1< CrossPeakOP >
peaks_
;
112
113
core::Real
tolerance_
;
114
core::Real
target_
;
115
int
target_sign_
;
//false --> >tolerance constants too big / true --> >tolerance if constants too small
116
};
117
118
119
class
PeakCalibratorMap
:
public
utility::pointer::ReferenceCount
{
120
typedef
std::map < std::string, PeakCalibratorOP >
CalibratorMap
;
121
public
:
122
///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
123
virtual
~PeakCalibratorMap
();
124
PeakCalibratorMap
(
CrossPeakList
&,
PeakCalibratorOP
);
125
void
set_new_upper_bounds
();
126
void
do_calibration
();
127
void
set_target_and_tolerance
(
core::Real
target,
core::Real
tolerance );
128
void
eliminate_violated_constraints
();
129
private
:
130
CalibratorMap
calibrators_
;
131
};
132
133
134
135
}
136
}
137
138
#endif
Generated on Sat Jun 1 2013 12:01:28 for Rosetta 3.5 by
1.8.4