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
PoseInfoFilter.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
/// @file protocols/filters/PoseInfoFilter.cc
11
/// @brief Filter for looking at specific atom distances
12
/// @author Rocco Moretti (rmoretti@uw.edu)
13
14
#include <
protocols/simple_filters/PoseInfoFilter.hh
>
15
#include <
protocols/simple_filters/PoseInfoFilterCreator.hh
>
16
17
// Project Headers
18
#include <
core/types.hh
>
19
#include <
core/pose/Pose.hh
>
20
#include <
core/pose/PDBInfo.hh
>
21
#include <
core/kinematics/FoldTree.hh
>
22
#include <
core/pose/datacache/CacheableDataType.hh
>
23
24
#include <basic/datacache/BasicDataCache.hh>
25
#include <utility/tag/Tag.hh>
26
#include <basic/Tracer.hh>
27
28
29
namespace
protocols {
30
namespace
simple_filters {
31
32
static
basic::Tracer
TR
(
"protocols.filters.PoseInfoFilter"
);
33
34
///@brief default ctor
35
PoseInfoFilter::PoseInfoFilter
() :
36
parent
(
"PoseInfo"
)
37
{}
38
39
/// @return Print pose information and return true
40
bool
PoseInfoFilter::apply
(
core::pose::Pose
const
& pose )
const
41
{
42
compute
( pose );
43
return
true
;
44
}
45
46
core::Real
47
PoseInfoFilter::compute
(
core::pose::Pose
const
& pose )
const
48
{
49
report
(
TR
, pose);
50
return
1.0;
51
}
52
53
/// @return Print pose information and return true
54
core::Real
55
PoseInfoFilter::report_sm
(
core::pose::Pose
const
& pose )
const
56
{
57
compute
( pose );
58
return
( 1 );
59
}
60
61
void
PoseInfoFilter::report
( std::ostream & out,
core::pose::Pose
const
& pose )
const
62
{
63
out <<
"Pose Information: "
<< pose.
total_residue
() <<
" residues "
<< std::endl;
64
pose.
pdb_info
()->show( out );
65
66
out << pose.
fold_tree
();
// Has implicit internal std::endl;
67
pose.
fold_tree
().
show
( out );
68
69
{
70
using
core::pose::datacache::CacheableDataType
;
71
out <<
"Cached Data: "
;
72
core::pose::Pose::BasicDataCache
const
& datacache( pose.
data
() );
73
for
(
core::Size
ii(1); ii <=
CacheableDataType::num_cacheable_data_types
; ++ii ) {
74
if
( datacache.has( ii ) ) {
75
// Just output name here, as each datatype needs to be treated differently
76
// (Do it below, if necessary.)
77
out << CacheableDataType::get_name( static_cast<CacheableDataType::Enum>( ii ) ) <<
" "
;
78
}
79
}
80
out << std::endl;
// To flush the Cached data list.
81
}
82
83
// Feel free to add additional pose-related information.
84
// The main reason I stopped where I did was I didn't necessarily know how to access relevant others.
85
}
86
87
void
PoseInfoFilter::parse_my_tag
(
utility::tag::TagPtr
const
,
88
protocols::moves::DataMap
&,
89
protocols::filters::Filters_map
const
&,
90
protocols::moves::Movers_map
const
&,
91
core::pose::Pose
const
&
/*pose*/
)
92
{
93
// Right now we don't have any options to control, so don't bother doing anything.
94
}
95
96
protocols::filters::FilterOP
97
PoseInfoFilterCreator::create_filter
()
const
{
return
new
PoseInfoFilter
; }
98
99
std::string
100
PoseInfoFilterCreator::keyname
()
const
{
return
"PoseInfo"
; }
101
102
103
104
}
// filters
105
}
// protocols
Generated on Sat Jun 1 2013 12:13:49 for Rosetta 3.5 by
1.8.4