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
simple_filters
ConstraintScoreCutoffFilter.cc
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 protocols/filters/ConstraintScoreCutoffFilter.cc
11
/// @brief
12
/// @detailed
13
/// Contains currently:
14
///
15
///
16
/// @author Oliver Lange
17
18
// Unit Headers
19
#include <
protocols/simple_filters/ConstraintScoreCutoffFilter.hh
>
20
#include <
protocols/simple_filters/ConstraintScoreCutoffFilterCreator.hh
>
21
22
// Package Headers
23
#include <
core/scoring/constraints/ConstraintSet.hh
>
24
25
26
// Project Headers
27
#include <
core/chemical/ResidueType.hh
>
28
#include <
core/pose/Pose.hh
>
29
#include <
core/types.hh
>
30
// AUTO-REMOVED #include <core/scoring/ScoreFunction.hh>
31
#include <
core/scoring/Energies.hh
>
32
#include <
core/scoring/EnergyMap.hh
>
33
#include <
core/scoring/LREnergyContainer.hh
>
34
#include <
core/scoring/ScoreType.hh
>
35
#include <
core/scoring/ScoreFunction.hh
>
36
#include <basic/Tracer.hh>
37
38
#include <
protocols/jd2/util.hh
>
39
#include <
protocols/jd2/Job.hh
>
40
41
// AUTO-REMOVED #include <protocols/moves/DataMap.hh>
42
// ObjexxFCL Headers
43
#include <ObjexxFCL/format.hh>
44
45
// Utility headers
46
#include <utility/tag/Tag.hh>
47
48
#include <utility/vector0.hh>
49
#include <utility/vector1.hh>
50
51
//Auto Headers
52
#include <
core/scoring/EnergyGraph.hh
>
53
54
55
56
//// C++ headers
57
static
basic::Tracer
tr
(
"protocols.filters.ConstraintScoreCutoffFilter"
);
58
59
namespace
protocols {
60
namespace
simple_filters {
61
62
63
ConstraintScoreCutoffFilter::ConstraintScoreCutoffFilter
() :
64
parent
(
"ConstraintScoreCutoffFilter"
),
65
cutoff_( 0.0 )
66
{}
67
68
ConstraintScoreCutoffFilter::ConstraintScoreCutoffFilter
(
core::Real
cutoff_in ) :
69
parent
(
"ConstraintScoreCutoffFilter"
),
70
cutoff_(cutoff_in)
71
{}
72
73
void
74
ConstraintScoreCutoffFilter::set_score_type
(
core::scoring::ScoreType
setting ) {
75
score_type_
= setting;
76
}
77
78
void
79
ConstraintScoreCutoffFilter::set_constraints
(
core::scoring::constraints::ConstraintCOPs
cst_in ) {
80
constraints_
= cst_in;
81
}
82
83
84
bool
85
ConstraintScoreCutoffFilter::apply
(
core::pose::Pose
const
& pose )
const
{
86
core::Real
cur_score =
get_score
( pose );
87
jd2::JobOP
job(
jd2::get_current_job
() );
88
if
( job ) job->add_string_real_pair(
get_user_defined_name
(), cur_score );
89
if
( cur_score <=
cutoff
() )
return
true
;
90
return
false
;
91
}
// apply_filter
92
93
94
core::Real
95
ConstraintScoreCutoffFilter::get_score
(
core::pose::Pose
const
& pose_in )
const
{
96
using namespace
core::scoring;
97
core::pose::Pose
pose( pose_in );
98
pose.
constraint_set
( NULL );
99
pose.
add_constraints
(
constraints_
);
100
ScoreFunction
scorefxn;
101
scorefxn.
set_weight
(
score_type_
, 1.0 );
102
return
scorefxn( pose );
103
}
104
105
void
106
ConstraintScoreCutoffFilter::parse_my_tag
(
utility::tag::TagPtr
const
tag,
protocols::moves::DataMap
& ,
protocols::filters::Filters_map
const
&,
protocols::moves::Movers_map
const
&,
core::pose::Pose
const
& ) {
107
if
(tag->hasOption(
"cutoff"
)) {
108
cutoff_
= tag->getOption<
core::Real
>(
"cutoff"
, 10000.0 );
109
}
110
if
(tag->hasOption(
"report_name"
) ) {
111
set_user_defined_name
( tag->getOption<
std::string
>(
"report_name"
) );
112
}
else
{
113
set_user_defined_name
(
"cst_cutoff_filter"
);
114
}
115
}
116
117
void
118
ConstraintScoreCutoffFilter::report
( std::ostream &
/*ostr*/
,
core::pose::Pose
const
&
/*pose*/
)
const
119
{ }
120
121
122
filters::FilterOP
123
ConstraintScoreCutoffFilterCreator::create_filter
()
const
{
return
new
ConstraintScoreCutoffFilter
; }
124
125
std::string
126
ConstraintScoreCutoffFilterCreator::keyname
()
const
{
return
"ConstraintScoreCutoffFilter"
; }
127
128
129
130
}
// filters
131
}
// protocols
Generated on Sat Jun 1 2013 12:13:10 for Rosetta 3.5 by
1.8.4