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
ligand_docking
MolecularMassFilter.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/ligand_docking/MolecularMassFilter.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/ligand_docking/MolecularMassFilter.hh
>
16
#include <
protocols/ligand_docking/MolecularMassFilterCreator.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/pose/util.hh
>
24
#include <
core/conformation/Conformation.hh
>
25
#include <utility/tag/Tag.hh>
26
#include <
protocols/moves/Mover.fwd.hh
>
//Movers_map
27
// AUTO-REMOVED #include <core/pose/PDBInfo.hh>
28
#include <utility/exit.hh>
29
30
#include <basic/Tracer.hh>
31
#include <utility/vector0.hh>
32
#include <utility/excn/Exceptions.hh>
33
#include <utility/vector1.hh>
34
35
36
namespace
protocols {
37
namespace
ligand_docking {
38
39
static
basic::Tracer
molecular_mass_tracer
(
"protocols.ligand_docking.MolecularMassFilter"
);
40
41
bool
42
MolecularMassFilter::apply
(
core::pose::Pose
const
& pose )
const
{
43
assert(
chain_
.size()==1 );
44
assert(
mass_limit_
>0 );
45
core::Size
const
chain_id=
core::pose::get_chain_id_from_chain
(
chain_
, pose);
46
core::Size
const
start
= pose.
conformation
().
chain_begin
(chain_id);
47
core::Size
const
end
= pose.
conformation
().
chain_end
(chain_id);
48
49
//core::Real mass=0;
50
51
52
if
(
core::pose::molecular_mass
(start,end,pose) >
mass_limit_
){
53
molecular_mass_tracer
<<
"Reached atom limit"
<< std::endl;
54
return
false
;
55
}
56
return
true
;
57
}
58
59
void
60
MolecularMassFilter::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
& )
61
{
62
63
if
( tag->getName() !=
"MolecularMass"
) {
64
molecular_mass_tracer
<<
" received incompatible Tag "
<< tag << std::endl;
65
assert(
false
);
66
return
;
67
}
68
if
( ! (tag->hasOption(
"chain"
) && tag->hasOption(
"mass_limit"
) ) ){
69
throw
utility::excn::EXCN_RosettaScriptsOption(
"MolecularMass filter needs a 'chain' and an 'mass_limit' option"
);
70
}
71
chain_
= tag->getOption<
std::string
>(
"chain"
);
72
mass_limit_
= tag->getOption<
core::Size
>(
"mass_limit"
);
73
74
75
}
76
77
protocols::filters::FilterOP
78
MolecularMassFilterCreator::create_filter
()
const
{
return
new
MolecularMassFilter
; }
79
80
std::string
81
MolecularMassFilterCreator::keyname
()
const
{
return
"MolecularMass"
; }
82
83
84
85
}
// ligand_docking
86
}
// protocols
Generated on Sat Jun 1 2013 11:56:09 for Rosetta 3.5 by
1.8.4