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
scoring
disulfides
DisulfideMatchingEnergy.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 sw=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 core/scoring/disulfides/DisulfideMatchingEnergy.cc
11
/// @brief Centroid Disulfide Energy class implementation
12
/// @author rvernon@u.washington.edu
13
/// @date 02/09/10
14
15
16
// Unit headers
17
#include <
core/scoring/disulfides/DisulfideMatchingEnergy.hh
>
18
#include <
core/scoring/disulfides/DisulfideMatchingEnergyCreator.hh
>
19
20
// Package headers
21
#include <
core/scoring/disulfides/DisulfideMatchingPotential.hh
>
22
#include <
core/scoring/disulfides/DisulfideMatchingEnergyContainer.hh
>
23
24
// Project headers
25
#include <
core/chemical/VariantType.hh
>
26
#include <
core/conformation/Residue.hh
>
27
#include <
core/pose/Pose.hh
>
28
#include <
core/scoring/EnergyMap.hh
>
29
#include <
core/scoring/Energies.hh
>
30
#include <
core/scoring/ScoringManager.hh
>
31
#include <
core/scoring/methods/Methods.hh
>
32
#include <basic/Tracer.hh>
33
34
#include <utility/vector1.hh>
35
36
37
namespace
core {
38
namespace
scoring {
39
namespace
disulfides {
40
41
42
/// @details This must return a fresh instance of the DisulfideMatchingEnergy class,
43
/// never an instance already in use
44
methods::EnergyMethodOP
45
DisulfideMatchingEnergyCreator::create_energy_method
(
46
methods::EnergyMethodOptions
const
&
47
)
const
{
48
return
new
DisulfideMatchingEnergy
(
ScoringManager::get_instance
()->get_DisulfideMatchingPotential() );
49
}
50
51
ScoreTypes
52
DisulfideMatchingEnergyCreator::score_types_for_method
()
const
{
53
ScoreTypes
sts;
54
sts.push_back(
dslfc_rot
);
55
sts.push_back(
dslfc_trans
);
56
sts.push_back(
dslfc_RT
);
57
return
sts;
58
}
59
60
61
static
basic::Tracer
TR
(
"core.scoring.disulfides.DisulfideMatchingEnergy"
);
62
63
64
65
DisulfideMatchingEnergy::DisulfideMatchingEnergy
(
66
DisulfideMatchingPotential
const
& potential
67
) :
68
parent
( new
DisulfideMatchingEnergyCreator
),
69
potential_( potential )
70
{}
71
72
DisulfideMatchingEnergy::~DisulfideMatchingEnergy
() {}
73
74
// EnergyMethod Methods:
75
76
methods::EnergyMethodOP
DisulfideMatchingEnergy::clone
()
const
77
{
78
return
new
DisulfideMatchingEnergy
(
potential_
);
79
}
80
81
82
void
DisulfideMatchingEnergy::setup_for_scoring
(
83
pose::Pose
& pose,
84
ScoreFunction
const
& )
const
85
{
86
using namespace
methods;
87
88
if
( pose.
energies
().
long_range_container
(
disulfide_matching_energy
) == 0 ) {
89
DisulfideMatchingEnergyContainerOP
dec =
new
DisulfideMatchingEnergyContainer
( pose );
90
pose.
energies
().
set_long_range_container
(
disulfide_matching_energy
, dec );
91
}
else
{
92
DisulfideMatchingEnergyContainerOP
dec =
DisulfideMatchingEnergyContainerOP
(
93
static_cast< DisulfideMatchingEnergyContainer * > (
94
pose.
energies
().
nonconst_long_range_container
(
disulfide_matching_energy
).get() ));
95
dec->update( pose );
96
}
97
}
98
99
void
DisulfideMatchingEnergy::indicate_required_context_graphs
(
100
utility::vector1< bool >
& )
const
101
{}
102
103
104
// TwoBodyEnergy Methods:
105
106
void
DisulfideMatchingEnergy::residue_pair_energy
(
107
conformation::Residue
const
& rsd1,
108
conformation::Residue
const
& rsd2,
109
pose::Pose
const
& pose,
110
ScoreFunction
const
&,
111
EnergyMap
& emap
112
)
const
113
{
114
// ignore scoring residues which have been marked as "REPLONLY" residues (only the repulsive energy will be calculated)
115
if
( rsd1.
has_variant_type
(
core::chemical::REPLONLY
) || rsd2.
has_variant_type
(
core::chemical::REPLONLY
) ){
116
return
;
117
}
118
119
Energy
match_rot;
120
Energy
match_trans;
121
Energy
match_RT;
122
123
//Require cysteines
124
if
( rsd1.
aa
() !=
chemical::aa_cys
|| rsd2.
aa
() !=
chemical::aa_cys
)
return
;
125
//Require Centroid (NOT NO MORE!)
126
//if (rsd1.residue_type_set().name() != chemical::CENTROID ||
127
// rsd2.residue_type_set().name() != chemical::CENTROID )
128
// return;
129
130
DisulfideMatchingEnergyContainerCOP
dec =
DisulfideMatchingEnergyContainerCOP
(
131
static_cast< DisulfideMatchingEnergyContainer const * > (
132
pose.
energies
().
long_range_container
(
methods::disulfide_matching_energy
).get() ));
133
//Require they're bonded
134
if
( ! dec->residue_forms_disulfide( rsd1.
seqpos
() ) ||
135
dec->other_neighbor_id( rsd1.
seqpos
() ) != (
Size
) rsd2.
seqpos
() ){
136
return
;
137
}
138
139
potential_
.
score_disulfide
(
140
rsd1, rsd2,
141
match_rot,
142
match_trans,
143
match_RT
144
);
145
146
emap[
dslfc_rot
] += match_rot;
147
emap[
dslfc_trans
] += match_trans;
148
emap[
dslfc_RT
] += match_RT;
149
}
150
151
152
153
bool
DisulfideMatchingEnergy::defines_intrares_energy
(
EnergyMap
const
& )
const
154
{
155
return
false
;
156
}
157
158
159
void
DisulfideMatchingEnergy::eval_intrares_energy
(
160
conformation::Residue
const
&,
161
pose::Pose
const
&,
162
ScoreFunction
const
&,
163
EnergyMap
&
164
)
const
165
{}
166
167
// LongRangeTwoBodyEnergy methods
168
methods::LongRangeEnergyType
169
DisulfideMatchingEnergy::long_range_type
()
const
170
{
171
return
methods::disulfide_matching_energy
;
172
}
173
174
175
bool
DisulfideMatchingEnergy::defines_residue_pair_energy
(
176
pose::Pose
const
& pose,
177
Size
res1,
178
Size
res2
179
)
const
180
{
181
using namespace
methods;
182
if
( ! pose.
energies
().
long_range_container
(
disulfide_matching_energy
))
return
false
;
183
184
DisulfideMatchingEnergyContainerCOP
dec =
DisulfideMatchingEnergyContainerCOP
(
185
static_cast< DisulfideMatchingEnergyContainer const * > (
186
pose.
energies
().
long_range_container
(
disulfide_matching_energy
).get() ));
187
return
dec->disulfide_bonded( res1, res2 );
188
}
189
core::Size
190
DisulfideMatchingEnergy::version
()
const
191
{
192
return
1;
// Initial versioning
193
}
194
195
196
}
// namespace disulfides
197
}
// namespace scoring
198
}
// namespace core
199
Generated on Sat Jun 1 2013 11:36:04 for Rosetta 3.5 by
1.8.4