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
core
pack
task
operation
ReplicateTask.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 src/core/pack/task/operation/ReplicateTask.cc
11
/// @details Replicates logic from one pose onto another. Poses must be the same size!
12
/// Only copies logic for being_packed and being_designed.
13
/// Use this to retain task information from round to round and keep
14
/// sequence information from being corrupted in the task.
15
/// @author stranges
16
17
#include <
core/pack/task/operation/ReplicateTask.hh
>
18
#include <
core/pack/task/operation/ReplicateTaskCreator.hh
>
19
20
#include <
core/pack/task/PackerTask.hh
>
21
#include <
core/pack/task/TaskFactory.hh
>
22
#include <
core/pose/Pose.hh
>
23
24
#include <utility/exit.hh>
25
26
#include <utility/tag/Tag.hh>
27
28
#include <utility/vector0.hh>
29
#include <utility/vector1.hh>
30
31
32
namespace
core {
33
namespace
pack {
34
namespace
task {
35
namespace
operation {
36
37
///@details empty constructor need to call set_native_task to make it work
38
ReplicateTask::ReplicateTask
() :
parent
(){}
39
40
///@details constructor using an established PackerTask
41
ReplicateTask::ReplicateTask
(
core::pack::task::PackerTaskOP
native_task ) :
42
parent
(), native_task_( native_task->
clone
() ){}
43
44
///@details contstructor that uses an TaskFactory and applies it to the native to get the task
45
ReplicateTask::ReplicateTask
(
core::pose::Pose
& native_pose,
core::pack::task::TaskFactoryOP
task_factory ) :
46
parent
(){
47
//convert task factory into task for general use
48
native_task_
= task_factory->create_task_and_apply_taskoperations( native_pose ) ;
49
}
50
51
ReplicateTask::~ReplicateTask
(){}
52
53
task::operation::TaskOperationOP
ReplicateTask::clone
()
const
54
{
55
return
new
ReplicateTask
( *
this
);
56
}
57
58
task::operation::TaskOperationOP
ReplicateTaskCreator::create_task_operation
()
const
59
{
60
return
new
ReplicateTask
;
61
}
62
63
void
64
ReplicateTask::apply
(
65
pose::Pose
const
& pose,
66
task::PackerTask
& task)
const
67
{
68
// note: poses must be the same size as this copies the task logic
69
// on a per residue basis
70
runtime_assert( pose.
total_residue
() ==
native_task_
->total_residue() );
71
//for all the residues in the pose copy the basic task logic
72
for
(
Size
ii = 1; ii <= pose.
total_residue
(); ii++){
73
//if not being designed then restrict to repacking
74
if
(!
native_task_
->nonconst_residue_task( ii ).being_designed())
75
task.
nonconst_residue_task
( ii ).
restrict_to_repacking
();
76
//task.nonconst_residue_task( ii ).add_behavior( "NATAA" );
77
78
//if not being packed at all then prevent from repacking
79
if
(!
native_task_
->nonconst_residue_task( ii ).being_packed())
80
task.
nonconst_residue_task
( ii ).
prevent_repacking
();
81
//task.nonconst_residue_task( ii ).add_behavior( "NATRO" );
82
83
}
//end loop over all residues
84
}
//end apply
85
86
void
87
ReplicateTask::set_native_task
(
core::pack::task::PackerTaskOP
native_task){
88
native_task_
= native_task;
89
}
90
91
///@brief does not work within parser framework so exit if try to use.
92
void
93
ReplicateTask::parse_tag
(
TagPtr
)
94
{
95
utility_exit_with_message_status(
"No parse_tag for ReplicateTask. Exiting...\n"
, 1 );
96
}
97
98
//private:
99
100
}
//operation
101
}
//pack
102
}
//task
103
}
//core
Generated on Sat Jun 1 2013 11:33:51 for Rosetta 3.5 by
1.8.4