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
ReportFilter.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/simple_filters/ReportFilter.cc
11
/// @brief
12
/// @author Sarel Fleishman
13
14
15
//Unit Headers
16
#include <
protocols/simple_filters/ReportFilter.hh
>
17
#include <
protocols/simple_filters/ReportFilterCreator.hh
>
18
#include <
protocols/moves/DataMapObj.hh
>
19
#include <
protocols/moves/DataMap.hh
>
20
#include <utility/tag/Tag.hh>
21
//Project Headers
22
#include <basic/Tracer.hh>
23
#include <
protocols/jd2/JobDistributor.hh
>
24
#include <
protocols/jd2/JobOutputter.hh
>
25
#include <
protocols/jd2/Job.hh
>
26
#include <
protocols/rosetta_scripts/util.hh
>
27
namespace
protocols{
28
namespace
simple_filters {
29
30
using namespace
core;
31
using namespace
core::scoring;
32
33
static
basic::Tracer
TR
(
"protocols.simple_filters.ReportFilter"
);
34
35
protocols::filters::FilterOP
36
ReportFilterCreator::create_filter
()
const
{
return
new
ReportFilter
; }
37
38
std::string
39
ReportFilterCreator::keyname
()
const
{
return
"Report"
; }
40
41
//default ctor
42
ReportFilter::ReportFilter
() :
43
protocols::filters::
Filter
(
"Report"
),
44
report_string_( NULL ),
45
filter_( NULL ),
46
report_filter_name_(
""
)
47
{}
48
49
ReportFilter::~ReportFilter
() {}
50
51
void
52
ReportFilter::parse_my_tag
(
utility::tag::TagPtr
const
tag,
moves::DataMap
& data,
filters::Filters_map
const
&filters,
moves::Movers_map
const
&,
core::pose::Pose
const
& )
53
{
54
report_filter_name_
= tag->getOption<
std::string
>(
"name"
);
55
if
( tag->hasOption(
"report_string"
) )
56
report_string_
= data.
get
<
protocols::moves::DataMapObj< std::string >
* >(
"report_string"
, tag->getOption<
std::string
>(
"report_string"
) );
57
if
( tag->hasOption(
"filter"
) )
58
filter
(
protocols::rosetta_scripts::parse_filter
( tag->getOption<
std::string
>(
"filter"
), filters ) );
59
}
60
61
bool
62
ReportFilter::apply
(
core::pose::Pose
const
& pose )
const
{
63
return
compute
( pose );
64
}
65
66
void
67
ReportFilter::report
( std::ostream & out,
core::pose::Pose
const
&
/*pose*/
)
const
{
68
using namespace
protocols::jd2;
69
out<<
"filter: "
<<
report_filter_name_
;
70
protocols::jd2::JobOP
job2 =
jd2::JobDistributor::get_instance
()->
current_job
();
71
std::string
job_name (JobDistributor::get_instance()->job_outputter()->output_name( job2 ) );
72
if
(
report_string_
->obj.length() > 0 )
73
out<<
"job name: "
<<job_name<<
" report_string: "
<<
report_string_
->obj<<std::endl;
74
if
(
filter_
() != NULL )
75
out<<
"job name: "
<<job_name<<
" reporting filter value: "
;
76
}
77
78
core::Real
79
ReportFilter::report_sm
(
core::pose::Pose
const
&
/*pose*/
)
const
{
80
return
( 0.0 );
81
}
82
83
core::Real
84
ReportFilter::compute
(
85
core::pose::Pose
const
&
86
)
const
{
87
return
( 0.0 );
88
}
89
90
void
ReportFilter::report_string
(
std::string
const
f )
91
{
92
report_string_
->obj = f;
93
}
94
95
std::string
ReportFilter::report_string
()
const
96
{
97
return
report_string_
->obj;
98
}
99
100
}
101
}
Generated on Sat Jun 1 2013 12:14:00 for Rosetta 3.5 by
1.8.4