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
movers
TaskAwareCsts.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/movers/TaskAwareCsts.cc
11
/// @brief
12
/// @author Sarel Fleishman (sarelf@u.washington.edu)
13
14
// Unit headers
15
#include <
protocols/protein_interface_design/movers/TaskAwareCsts.hh
>
16
#include <
protocols/protein_interface_design/movers/TaskAwareCstsCreator.hh
>
17
#include <boost/foreach.hpp>
18
#define foreach BOOST_FOREACH
19
// Package headers
20
#include <
core/pose/Pose.hh
>
21
#include <
core/conformation/util.hh
>
22
#include <
core/conformation/Conformation.hh
>
23
#include <
core/pack/task/TaskFactory.hh
>
24
#include <basic/Tracer.hh>
25
#include <
core/pack/task/operation/TaskOperations.hh
>
26
#include <utility/tag/Tag.hh>
27
#include <utility/vector1.hh>
28
#include <
protocols/moves/DataMap.hh
>
29
#include <
protocols/moves/Mover.hh
>
30
#include <
protocols/rosetta_scripts/util.hh
>
31
//Auto Headers
32
#include <
core/conformation/Residue.hh
>
33
#include <numeric/xyzVector.hh>
34
#include <
core/pack/task/operation/TaskOperations.hh
>
35
#include <
core/scoring/constraints/CoordinateConstraint.hh
>
36
#include <
core/scoring/constraints/HarmonicFunc.hh
>
37
#include <
core/id/AtomID.hh
>
38
39
namespace
protocols {
40
namespace
protein_interface_design {
41
namespace
movers {
42
43
static
basic::Tracer
TR
(
"protocols.protein_interface_design.movers.TaskAwareCsts"
);
44
std::string
45
TaskAwareCstsCreator::keyname
()
const
46
{
47
return
TaskAwareCstsCreator::mover_name
();
48
}
49
50
protocols::moves::MoverOP
51
TaskAwareCstsCreator::create_mover
()
const
{
52
return
new
TaskAwareCsts
;
53
}
54
55
std::string
56
TaskAwareCstsCreator::mover_name
()
57
{
58
return
"TaskAwareCsts"
;
59
}
60
61
TaskAwareCsts::TaskAwareCsts
() :
62
Mover
(
TaskAwareCstsCreator
::mover_name() ),
63
task_factory_( NULL ),
64
cst_type_(
"coordinate"
)
65
{
66
}
67
68
69
TaskAwareCsts::~TaskAwareCsts
() {}
70
71
void
72
TaskAwareCsts::apply
(
core::pose::Pose
& pose )
73
{
74
using namespace
protocols::rosetta_scripts;
75
using namespace
core::scoring::constraints;
76
using
core::id::AtomID
;
77
78
ConstraintCOPs
cst;
79
utility::vector1< core::Size >
const
designable(
residue_packer_states
( pose,
task_factory
(),
true
/*designable*/
,
false
/*packable*/
) );
80
runtime_assert( designable.size() );
81
AtomID
const
anchor_atom(
AtomID
( pose.
residue
( designable[ 1 ] ).
atom_index
(
"CA"
), designable[ 1 ] ) );
// anchor to first designable CA
82
HarmonicFuncOP
coord_cst_func(
new
HarmonicFunc
( 0.0, 1.0
/*sd*/
) );
// hardwired for now
83
TR<<
"Adding constraints to pose at positions: "
;
84
foreach
(
core::Size
const
resid, designable ){
85
core::conformation::Residue
const
rsd_i( pose.
residue
( resid ) );
86
if
(
cst_type_
==
"coordinate"
){
87
cst.push_back(
new
CoordinateConstraint
(
AtomID
( rsd_i.atom_index(
"CA"
), resid ), anchor_atom, rsd_i.xyz(
"CA"
), coord_cst_func ) );
88
TR<<resid<<
','
;
89
}
90
}
91
TR<<std::endl;
92
pose.
add_constraints
( cst );
93
}
94
95
std::string
96
TaskAwareCsts::get_name
()
const
{
97
return
TaskAwareCstsCreator::mover_name
();
98
}
99
100
void
101
TaskAwareCsts::parse_my_tag
(
TagPtr
const
tag,
protocols::moves::DataMap
&data,
protocols::filters::Filters_map
const
&,
protocols::moves::Movers_map
const
&,
core::pose::Pose
const
& )
102
{
103
using namespace
protocols::rosetta_scripts;
104
task_factory
(
parse_task_operations
( tag, data ) );
105
cst_type
( tag->getOption<
std::string
>(
"cst_type"
,
"coordinate"
) );
106
}
107
108
protocols::moves::MoverOP
109
TaskAwareCsts::clone
()
const
{
110
return
(
protocols::moves::MoverOP
(
new
TaskAwareCsts
( *
this
) ));
111
}
112
113
core::pack::task::TaskFactoryOP
114
TaskAwareCsts::task_factory
()
const
{
return
task_factory_
; }
115
116
void
117
TaskAwareCsts::task_factory
(
core::pack::task::TaskFactoryOP
tf ){
task_factory_
= tf; }
118
119
}
//movers
120
}
//protein_interface_design
121
}
//protocols
Generated on Sat Jun 1 2013 12:07:38 for Rosetta 3.5 by
1.8.4