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
canonical_sampling
mc_convergence_checks
Pool_ConvergenceCheck.hh
Go to the documentation of this file.
1
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2
// vi: set ts=2 noet:
3
//
4
// (c) Copyright Rosetta Commons Member Institutions.
5
// (c) This file is part of the Rosetta software suite and is made available under license.
6
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8
// (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9
10
/// @file
11
/// @brief
12
/// @author
13
14
15
#ifndef INCLUDED_protocols_canonical_sampling_mc_convergence_checks_Pool_ConvergenceCheck_hh
16
#define INCLUDED_protocols_canonical_sampling_mc_convergence_checks_Pool_ConvergenceCheck_hh
17
18
19
// type headers
20
#include <
core/types.hh
>
21
22
// unit headers
23
#include <
protocols/moves/MonteCarloExceptionConverge.hh
>
24
#include <
protocols/moves/MonteCarlo.fwd.hh
>
25
#include <
protocols/toolbox/DecoySetEvaluation.hh
>
26
#include <
protocols/evaluation/PoseEvaluator.hh
>
27
28
// package headers
29
#include <
core/pose/Pose.fwd.hh
>
30
#include <
core/scoring/ScoreFunction.fwd.hh
>
31
32
// utility headers
33
34
#include <utility/pointer/ReferenceCount.hh>
35
// #include "utility/basic_sys_util.h"
36
37
// C++ headers
38
#include <map>
39
#include <string>
40
41
#include <utility/vector1.hh>
42
43
44
// Forward declarations
45
46
namespace
protocols {
47
namespace
canonical_sampling {
48
namespace
mc_convergence_checks {
49
50
51
class
EXCN_Pool_Converged
:
public
moves::EXCN_Converged
52
{};
53
54
class
Pool_RMSD
;
55
56
typedef
utility::pointer::owning_ptr< Pool_RMSD >
Pool_RMSD_OP
;
57
58
59
class
Pool_RMSD
:
public
utility::pointer::ReferenceCount
{
60
typedef
utility::vector1< std::string >
Tags
;
61
public
:
62
//c'stor supply file with structures and threshold (Angstroem RMSD)
63
Pool_RMSD
(
std::string
silent_file )
64
{
fill_pool
( silent_file); };
65
66
Pool_RMSD
() {};
67
68
virtual
~Pool_RMSD
();
69
70
///@brief return position in pool for the best_decoy
71
core::Size
evaluate
(
core::pose::Pose
const
&,
std::string
& best_decoy,
core::Real
& best_rmsd )
const
;
72
73
core::Size
evaluate
(
core::io::silent::SilentStruct
const
&,
std::string
& best_decoy,
core::Real
& best_rmsd )
const
;
74
virtual
core::Size
evaluate_and_add
(
core::pose::Pose
const
& pose,
std::string
& cluster_center,
core::Real
& best_rmsd,
core::Real
transition_threshold );
75
76
core::Size
size
()
const
{
return
pool_
.
n_decoys
(); };
77
78
79
void
add
(
core::io::silent::SilentStruct
const
&,
std::string
new_tag =
"keep_silent_tag"
);
80
void
add
(
core::pose::Pose
const
&,
std::string
new_tag );
81
82
virtual
void
finalize
() {
return
; };
83
84
void
get
(
core::Size
index,
ObjexxFCL::FArray2D_double
& result);
85
std::string
&
get_tag
(
core::Size
index);
86
87
void
pop_back
();
88
void
clear
();
89
90
void
set_reserve_size
(
int
max_size );
//ek
91
92
93
core::Size
evaluate_and_add
(
ObjexxFCL::FArray2D_double
&
coords
,
std::string
& best_decoy,
core::Real
& best_rmsd,
core::Real
transition_threshold );
94
core::Size
evaluate
(
ObjexxFCL::FArray2D_double
&,
std::string
& best_decoy,
core::Real
& best_rmsd )
const
;
//ek sorry had to move it from private to protected
95
core::Size
evaluate
(
ObjexxFCL::FArray2D_double
&,
std::string
& best_decoy,
core::Real
& best_rmsd,
core::Size
index)
const
;
96
void
add
(
ObjexxFCL::FArray2D_double
const
&,
core::Size
nres,
std::string
new_tag);
97
98
//void add( ObjexxFCL::FArray2D_double const&, core::Size nres, core::Size num_added, utility::vector1<std::string> const& new_tag);
99
void
set_excluded_residues
(
utility::vector1< core::Size >
const
& excluded_residues );
100
protected
:
101
102
core::Size
natom
()
const
{
return
pool_
.
n_atoms
();}
//yuan
103
ObjexxFCL::FArray3D_double
const
&
coords
()
const
{
return
pool_
.
coords
();}
//yuan
104
std::string
const
&
tag
(
core::Size
index)
const
{
return
tags_
[index];}
105
106
107
private
:
108
void
fill_pool
(
std::string
const
& silentfile );
109
110
toolbox::DecoySetEvaluation
pool_
;
111
ObjexxFCL::FArray1D_double
weights_
;
112
Tags
tags_
;
113
core::Size
reserve_size_
;
114
115
//residues excluded from RMSD calculation
116
utility::vector1< core::Size >
excluded_residues_
;
117
};
118
119
class
Pool_ConvergenceCheck
:
public
moves::MonteCarloExceptionConverge
{
120
public
:
121
Pool_ConvergenceCheck
(
Pool_RMSD_OP
rmsd_pool_in,
core::Real
threshold )
122
:
threshold_
( threshold ),
123
rmsd_pool_
( rmsd_pool_in ) {};
124
125
virtual
~Pool_ConvergenceCheck
();
126
//throws EXCN_Pool_Converged if lowest_score pose is < threshold away from any pool structure
127
virtual
bool
operator()
(
const
core::pose::Pose
&,
moves::MonteCarlo
const
& mc,
bool
/*reject*/
);
128
129
private
:
130
core::Real
threshold_
;
131
Pool_RMSD_OP
rmsd_pool_
;
132
};
133
134
class
Pool_Evaluator
:
public
evaluation::PoseEvaluator
{
135
public
:
136
virtual
~Pool_Evaluator
();
137
Pool_Evaluator
(
Pool_RMSD_OP
rmsd_pool_in ) :
rmsd_pool_
( rmsd_pool_in ) {};
138
/// from PoseEvaluator interface:
139
140
///@brief evaluate pose and store values in Silent_Struct
141
virtual
void
apply
(
core::pose::Pose
&,
std::string
tag,
core::io::silent::SilentStruct
&pss)
const
;
142
virtual
void
apply
(
core::io::silent::SilentStruct
&pss)
const
;
143
144
// void apply( core::pose::Pose&, std::string tag, core::io::silent::SilentStruct &pss) const;
145
virtual
core::Size
size
()
const
{
return
2; };
146
virtual
std::string
name
(
core::Size
i )
const
{
147
if
( i == 1 )
return
"pool_converged_tag"
;
148
if
( i == 2 )
return
"pool_converged_rmsd"
;
149
return
"NO_TAG"
;
150
}
151
private
:
152
Pool_RMSD_OP
rmsd_pool_
;
153
};
154
155
}
// mc_convergence_check
156
}
// moves
157
}
// rosetta
158
159
#endif
Generated on Sat Jun 1 2013 11:44:25 for Rosetta 3.5 by
1.8.4