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
filters
HeavyAtomFilter.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/protein_interface_design/filters/HeavyAtomFilter.cc
11
/// @brief Find packing defects at an interface using packstat score terms
12
/// @author Jacob Corn (jecorn@u.washington.edu)
13
14
// Unit headers
15
#include <
protocols/filters/HeavyAtomFilter.hh
>
16
#include <protocols/filters/HeavyAtomFilterCreator.hh>
17
18
19
#include <
protocols/filters/Filter.hh
>
20
// Project Headers
21
#include <
core/types.hh
>
22
#include <
core/pose/Pose.hh
>
23
#include <
core/conformation/Conformation.hh
>
24
#include <utility/tag/Tag.hh>
25
#include <
protocols/moves/Mover.fwd.hh
>
//Movers_map
26
#include <
core/pose/PDBInfo.hh
>
27
#include <
core/pose/util.hh
>
28
#include <utility/excn/Exceptions.hh>
29
#include <utility/exit.hh>
30
31
//Auto Headers
32
33
34
namespace
protocols {
35
namespace
filters {
36
37
static
basic::Tracer
heavy_atom_tracer
(
"protocols.filters.HeavyAtomFilter"
);
38
39
bool
40
HeavyAtomFilter::apply
(
core::pose::Pose
const
& pose )
const
{
41
assert(
chain_
.size()==1 );
42
assert(
heavy_atom_limit_
>0 );
43
core::Size
const
chain_id=
core::pose::get_chain_id_from_chain
(
chain_
, pose);
44
core::Size
const
start
= pose.
conformation
().
chain_begin
(chain_id);
45
core::Size
const
end
= pose.
conformation
().
chain_end
(chain_id);
46
47
if
(
core::pose::num_heavy_atoms
(start,end,pose) >
heavy_atom_limit_
){
48
heavy_atom_tracer
<<
"Reached heavy atom limit"
<< std::endl;
49
return
false
;
50
}
51
return
true
;
52
}
53
54
void
55
HeavyAtomFilter::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
& )
56
{
57
58
if
( tag->getName() !=
"HeavyAtom"
) {
59
heavy_atom_tracer
<<
" received incompatible Tag "
<< tag << std::endl;
60
assert(
false
);
61
return
;
62
}
63
if
( ! (tag->hasOption(
"chain"
) && tag->hasOption(
"heavy_atom_limit"
) ) ){
64
throw
utility::excn::EXCN_RosettaScriptsOption(
"HeavyAtom filter needs a 'chain' and a 'heavy_atom_limit' option"
);
65
}
66
chain_
= tag->getOption<
std::string
>(
"chain"
);
67
68
}
69
70
FilterOP
71
HeavyAtomFilterCreator::create_filter()
const
{
return
new
HeavyAtomFilter
; }
72
73
std::string
74
HeavyAtomFilterCreator::keyname()
const
{
return
"HeavyAtom"
; }
75
76
77
78
}
// filters
79
}
// protocols
Generated on Sat Jun 1 2013 11:49:49 for Rosetta 3.5 by
1.8.4