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
forge
constraints
NtoC_RCG.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/forge/constraints/NtoC_RCG.cc
11
///
12
/// @brief
13
/// @author Nobuyasu Koga( nobuyasu@uw.edu ) , October 2009
14
/// @modified Tom Linsky (tlinsky@uw.edu), Nov 2012
15
16
// Unit header
17
#include <
protocols/forge/constraints/NtoC_RCG.hh
>
18
#include <
protocols/forge/constraints/NtoCCstGeneratorCreator.hh
>
19
20
// Package headers
21
#include <
core/pose/Pose.hh
>
22
// AUTO-REMOVED #include <core/conformation/Residue.hh>
23
#include <
core/scoring/constraints/AtomPairConstraint.hh
>
24
#include <
core/scoring/constraints/BoundConstraint.hh
>
25
#include <
core/scoring/constraints/ScalarWeightedFunc.hh
>
26
#include <
core/scoring/constraints/Constraint.hh
>
27
#include <
core/id/SequenceMapping.hh
>
28
#include <
protocols/toolbox/match_enzdes_util/util_functions.hh
>
29
30
// Project headers
31
#include <
core/chemical/ResidueType.hh
>
32
33
// utility headers
34
#include <basic/Tracer.hh>
35
#include <utility/tag/Tag.hh>
36
#include <utility/vector1.hh>
37
38
39
static
basic::Tracer
TR
(
"protocols.forge.constraints.NtoC_RCG"
);
40
41
namespace
protocols{
42
namespace
forge{
43
namespace
constraints{
44
45
std::string
46
NtoCCstGeneratorCreator::keyname
()
const
47
{
48
return
NtoCCstGeneratorCreator::mover_name
();
49
}
50
51
protocols::moves::MoverOP
52
NtoCCstGeneratorCreator::create_mover
()
const
{
53
return
new
NtoC_RCG
();
54
}
55
56
std::string
57
NtoCCstGeneratorCreator::mover_name
()
58
{
59
return
"NtoCCstGenerator"
;
60
}
61
62
/// @brief
63
NtoC_RCG::NtoC_RCG
():
64
RemodelConstraintGenerator(),
65
dist_( 11.0 ),
66
coef_( 1.0 )
67
{}
68
69
NtoC_RCG::NtoC_RCG
(
NtoC_RCG
const
& rval )
70
: RemodelConstraintGenerator( rval ),
71
dist_( rval.dist_ ),
72
coef_( rval.coef_ )
73
{}
74
75
/// @brief
76
NtoC_RCG::NtoC_RCG
(
Real
const
dist,
Real
const
coef ):
77
RemodelConstraintGenerator(),
78
dist_( dist ),
79
coef_( coef )
80
{}
81
82
/// @brief
83
NtoC_RCG::~NtoC_RCG
() {}
84
85
void
86
NtoC_RCG::parse_my_tag
(
TagPtr
const
tag,
87
protocols::moves::DataMap
& data,
88
protocols::filters::Filters_map
const
& filters,
89
protocols::moves::Movers_map
const
& movers,
90
core::pose::Pose
const
& pose )
91
{
92
RemodelConstraintGenerator::parse_my_tag( tag, data, filters, movers, pose );
93
set_weight
( tag->getOption<
core::Real
>(
"weight"
,
coef_
) );
94
set_distance
( tag->getOption<
core::Real
>(
"dist"
,
dist_
) );
95
}
96
97
std::string
98
NtoC_RCG::get_name
()
const
99
{
100
return
NtoCCstGeneratorCreator::mover_name
();
101
}
102
103
protocols::moves::MoverOP
104
NtoC_RCG::fresh_instance
()
const
105
{
106
return
new
NtoC_RCG
();
107
}
108
109
protocols::moves::MoverOP
110
NtoC_RCG::clone
()
const
111
{
112
return
new
NtoC_RCG
( *
this
);
113
}
114
115
/// @brief set weight
116
void
117
NtoC_RCG::set_weight
(
Real
const
coef )
118
{
119
coef_
= coef;
120
}
121
122
/// @brief set distance of constraint
123
void
124
NtoC_RCG::set_distance
(
Real
const
dist )
125
{
126
dist_
= dist;
127
}
128
129
130
/// @brief
131
void
132
NtoC_RCG::generate_remodel_constraints
(
Pose
const
& pose )
133
{
134
using namespace
core::scoring::constraints;
135
136
std::string
tag(
"constraint_between_N_&_C_terminal_Calpha"
);
137
Real
lb( 0.0 );
138
Real
ub(
dist_
);
139
Real
sd( 1.0 );
140
ScalarWeightedFuncOP
cstfunc =
new
ScalarWeightedFunc
(
coef_
,
new
BoundFunc
( lb, ub, sd, tag ) );
141
142
Size
last_residue =
protocols::toolbox::match_enzdes_util::get_last_protein_residue
( pose );
143
Size
first_residue =
protocols::toolbox::match_enzdes_util::get_first_protein_residue
( pose );
144
TR
<<
"first residue in NtoC generation is:"
<< first_residue <<
" and last is:"
<< last_residue <<
" out of total="
<< pose.
total_residue
() << std::endl;
145
core::id::AtomID
atom1( pose.
residue_type
( first_residue ).
atom_index
(
"CA"
), first_residue );
146
core::id::AtomID
atom2( pose.
residue_type
( last_residue ).
atom_index
(
"CA"
), last_residue );
147
ConstraintOP
const
cst =
new
AtomPairConstraint
( atom1, atom2, cstfunc );
148
149
TR
<<
"Constraints between N- and C- terminal: "
<< first_residue <<
"-"
<< last_residue <<
", dist="
<<
dist_
<< std::endl;
150
151
this->
add_constraint
( cst );
152
}
//generate constraints
153
154
155
}
//namespace constraints
156
}
//namespace forge
157
}
//namespace protocols
Generated on Sat Jun 1 2013 11:51:57 for Rosetta 3.5 by
1.8.4