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
RelativeSegmentFilter.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
/// @author Sarel Fleishman
11
#include <
protocols/protein_interface_design/filters/RelativeSegmentFilter.hh
>
12
#include <
protocols/protein_interface_design/filters/RelativeSegmentFilterCreator.hh
>
13
14
15
// Project Headers
16
#include <
core/types.hh
>
17
#include <
core/pose/Pose.hh
>
18
#include <basic/Tracer.hh>
19
#include <utility/tag/Tag.hh>
20
#include <
protocols/moves/DataMap.fwd.hh
>
21
#include <
protocols/rosetta_scripts/util.hh
>
22
#include <
core/import_pose/import_pose.hh
>
23
24
namespace
protocols {
25
namespace
protein_interface_design {
26
namespace
filters {
27
28
static
basic::Tracer
TR
(
"protocols.protein_interface_design.filters.RelativeSegmentFilter"
);
29
30
using
core::pose::Pose
;
31
32
protocols::filters::FilterOP
33
RelativeSegmentFilterCreator::create_filter
()
const
{
return
new
RelativeSegmentFilter
; }
34
35
std::string
36
RelativeSegmentFilterCreator::keyname
()
const
{
return
"RelativeSegment"
; }
37
38
bool
39
RelativeSegmentFilter::apply
(
Pose
const
& pose )
const
{
40
core::pose::Pose
source_pose
;
41
core::import_pose::pose_from_pdb
( source_pose,
source_pose_
);
42
43
core::Size
const
nearest_to_from(
protocols::rosetta_scripts::find_nearest_res
( pose, source_pose,
start_res
() ) );
44
core::Size
const
nearest_to_to(
protocols::rosetta_scripts::find_nearest_res
( pose, source_pose,
stop_res
() ) );
45
46
if
( nearest_to_from == 0 || nearest_to_to == 0 ){
47
TR
<<
"nearest_to_from: "
<<nearest_to_from<<
" nearest_to_to: "
<<nearest_to_to<<
". Failing"
<<std::endl;
48
return
false
;
49
}
50
runtime_assert( nearest_to_to > nearest_to_from );
51
TR
<<
"Residues on source pose: "
;
52
for
(
core::Size
i = nearest_to_from; i <= nearest_to_to; ++i )
53
TR
<<i<<
","
;
54
TR
<<std::endl;
55
return
true
;
56
}
57
58
void
59
RelativeSegmentFilter::parse_my_tag
(
utility::tag::TagPtr
const
tag,
moves::DataMap
&,
filters::Filters_map
const
&,
moves::Movers_map
const
&,
core::pose::Pose
const
& pose )
60
{
61
source_pose
( tag->getOption<
std::string
>(
"source_pose"
) );
62
start_res
( tag->getOption<
core::Size
>(
"start_res"
) );
63
stop_res
( tag->getOption<
core::Size
>(
"stop_res"
));
64
runtime_assert(
stop_res
() >
start_res
() );
65
runtime_assert(
start_res
() > 0 );
66
runtime_assert(
stop_res
() <= pose.
total_residue
() );
67
TR
<<
"source_pose: "
<<
source_pose
()<<
" start_res: "
<<
start_res
()<<
" stop res: "
<<
stop_res
()<<std::endl;
68
}
69
70
void
71
RelativeSegmentFilter::report
( std::ostream &,
core::pose::Pose
const
& )
const
{
72
}
73
74
core::Real
75
RelativeSegmentFilter::report_sm
(
core::pose::Pose
const
& )
const
{
76
return
( 0.0 );
77
}
78
79
RelativeSegmentFilter::~RelativeSegmentFilter
() {}
80
81
}
82
}
// protein_interface_design
83
}
// devel
Generated on Sat Jun 1 2013 12:03:45 for Rosetta 3.5 by
1.8.4