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
protein_interface_design
filters
StubScoreFilter.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 sw=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
/// @author Sarel Fleishman (sarelf@uw.edu)
11
#include <
protocols/protein_interface_design/filters/StubScoreFilter.hh
>
12
#include <
protocols/protein_interface_design/filters/StubScoreFilterCreator.hh
>
13
#define foreach BOOST_FOREACH
14
#include <
core/pose/Pose.hh
>
15
#include <
protocols/hotspot_hashing/HotspotStub.hh
>
16
#include <
protocols/hotspot_hashing/HotspotStubSet.hh
>
17
#include <utility/tag/Tag.hh>
18
#include <
protocols/filters/Filter.hh
>
19
#include <
protocols/moves/Mover.hh
>
20
#include <
protocols/moves/DataMap.hh
>
21
#include <basic/Tracer.hh>
22
#include <
core/types.hh
>
23
#include <
core/chemical/AA.hh
>
24
#include <numeric/xyzVector.hh>
25
26
27
28
#include <
core/scoring/ScoreFunction.hh
>
29
#include <
core/scoring/ScoreType.hh
>
30
#include <
protocols/protein_interface_design/movers/PlacementMinimizationMover.hh
>
31
#include <
protocols/protein_interface_design/movers/PlaceUtils.hh
>
32
33
#include <
core/kinematics/Jump.hh
>
34
#include <
core/scoring/constraints/Constraint.hh
>
35
#include <utility/vector0.hh>
36
#include <utility/vector1.hh>
37
38
//Auto Headers
39
#include <
protocols/simple_filters/ScoreTypeFilter.hh
>
40
41
42
43
namespace
protocols {
44
namespace
protein_interface_design{
45
namespace
filters {
46
47
static
basic::Tracer
TR
(
"protocols.protein_interface_design.filters.StubScoreFilter"
);
48
49
///@brief default ctor
50
StubScoreFilter::StubScoreFilter
() :
51
parent
(
"StubScore"
),
52
host_chain_( 2 ),
53
cb_force_( 0.5 )
54
{}
55
56
bool
57
StubScoreFilter::apply
(
core::pose::Pose
const
& pose )
const
58
{
59
core::Real
const
stub_score(
compute
( pose ) );
60
if
( stub_score >= -0.0001 ){
61
TR<<
"bb_cst evalutes to 0. Failing"
<<std::endl;
62
return
false
;
63
}
64
return
true
;
65
}
66
67
core::Real
68
StubScoreFilter::compute
(
core::pose::Pose
const
& in_pose )
const
{
69
if
( !
stub_sets_
.size() ){
70
TR.Error<<
"Stubsets not set in StubScoreFilter. Have I been parsed correctly?"
<<std::endl;
71
runtime_assert(
stub_sets_
.size() );
72
}
73
core::scoring::ScoreFunctionCOP
stub_scorefxn(
protocols::protein_interface_design::movers::make_stub_scorefxn
() );
74
core::pose::Pose
pose( in_pose );
75
(*stub_scorefxn)(pose);
//for constraints to be active
76
protocols::hotspot_hashing::remove_hotspot_constraints_from_pose
( pose );
77
protocols::protein_interface_design::movers::PlacementMinimizationMover
dummy_min;
78
dummy_min.
stub_sets
(
stub_sets_
);
79
dummy_min.
host_chain
(
host_chain_
);
80
dummy_min.
cb_force
(
cb_force_
);
81
dummy_min.
refresh_bbstub_constraints
( pose );
82
83
protocols::simple_filters::ScoreTypeFilter
const
stf( stub_scorefxn,
core::scoring::backbone_stub_constraint
, 1.0 );
84
core::Real
const
stub_score( stf.
compute
( pose ) );
85
return
( stub_score );
86
}
87
88
core::Real
89
StubScoreFilter::report_sm
(
core::pose::Pose
const
& pose )
const
90
{
91
return
(
compute
( pose ) );
92
}
93
94
void
95
StubScoreFilter::report
( std::ostream & out,
core::pose::Pose
const
& pose )
const
96
{
97
out<<
"StubScoreFilter returns "
<<
compute
( pose )<<std::endl;
98
}
99
100
void
101
StubScoreFilter::stub_sets
(
utility::vector1
<
std::pair
<
protocols::hotspot_hashing::HotspotStubSetOP
, std::pair< protocols::hotspot_hashing::HotspotStubOP, core::Size > > >
const
& stubsets ){
102
stub_sets_
= stubsets;
103
}
104
105
void
106
StubScoreFilter::parse_my_tag
(
utility::tag::TagPtr
const
tag,
107
protocols::moves::DataMap
&data,
108
protocols::filters::Filters_map
const
&,
109
protocols::moves::Movers_map
const
&,
110
core::pose::Pose
const
& pose )
111
{
112
TR.Info <<
"StubScoreFilter"
<<std::endl;
113
host_chain_
= tag->getOption<
core::Size
>(
"chain_to_design"
, 2 );
114
cb_force_
= tag->getOption<
core::Real
>(
"cb_force"
, 0.5 );
115
runtime_assert( cb_force_ > -0.00001 );
116
stub_sets_
=
protocols::protein_interface_design::movers::parse_stub_sets
( tag, pose,
host_chain_
, data );
117
runtime_assert(
stub_sets_
.size() );
118
}
119
120
protocols::filters::FilterOP
121
StubScoreFilter::fresh_instance
()
const
{
122
return
new
StubScoreFilter
();
123
}
124
125
StubScoreFilter::~StubScoreFilter
(){}
126
127
128
protocols::filters::FilterOP
129
StubScoreFilter::clone
()
const
{
130
return
new
StubScoreFilter
( *
this
);
131
}
132
133
protocols::filters::FilterOP
134
StubScoreFilterCreator::create_filter
()
const
{
return
new
StubScoreFilter
; }
135
136
std::string
137
StubScoreFilterCreator::keyname
()
const
{
return
"StubScore"
; }
138
139
140
}
// filters
141
}
// protein_interface_design
142
}
// protocols
Generated on Sat Jun 1 2013 12:04:01 for Rosetta 3.5 by
1.8.4