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
methods
CenPairEnergy.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 core/scoring/methods/CenPairEnergy.cc
11
/// @brief Statistically derived rotamer pair potential class implementation
12
/// @author Phil Bradley
13
/// @author Andrew Leaver-Fay
14
15
16
// Unit headers
17
#include <
core/scoring/methods/util.hh
>
18
#include <
core/scoring/methods/CenPairEnergy.hh
>
19
#include <
core/scoring/methods/CenPairEnergyCreator.hh
>
20
21
// Package headers
22
#include <
core/scoring/EnvPairPotential.hh
>
23
#include <
core/scoring/ScoringManager.hh
>
24
#include <
core/chemical/VariantType.hh
>
25
// AUTO-REMOVED #include <core/scoring/EnergyGraph.hh>
26
27
// Project headers
28
#include <
core/pose/Pose.hh
>
29
#include <
core/conformation/Conformation.hh
>
30
#include <
core/conformation/Residue.hh
>
31
32
#include <
core/scoring/EnergyMap.hh
>
33
#include <utility/vector1.hh>
34
35
36
37
// Utility headers
38
39
40
41
// C++
42
43
44
namespace
core {
45
namespace
scoring {
46
namespace
methods {
47
48
methods::EnergyMethodOP
49
CenPairEnergyCreator::create_energy_method
(
50
methods::EnergyMethodOptions
const
&
51
)
const
{
52
return
new
methods::CenPairEnergy
;
53
}
54
55
/// @brief Return the set of score types claimed by the EnergyMethod
56
/// this EnergyMethodCreator creates in its create_energy_method() function
57
ScoreTypes
58
CenPairEnergyCreator::score_types_for_method
()
const
{
59
ScoreTypes
sts;
60
sts.push_back(
pair
);
61
sts.push_back(
cenpack
);
62
return
sts;
63
}
64
65
66
/// c-tor
67
CenPairEnergy::CenPairEnergy
() :
68
parent
( new
CenPairEnergyCreator
),
69
potential_(
ScoringManager
::get_instance()->get_EnvPairPotential() )
70
{}
71
72
73
/// clone
74
EnergyMethodOP
75
CenPairEnergy::clone
()
const
76
{
77
return
new
CenPairEnergy
();
78
}
79
80
81
/////////////////////////////////////////////////////////////////////////////
82
// scoring
83
/////////////////////////////////////////////////////////////////////////////
84
85
86
///
87
void
88
CenPairEnergy::setup_for_scoring
(
pose::Pose
& pose,
ScoreFunction
const
& )
const
89
{
90
// compute interpolated number of neighbors at various distance cutoffs
91
potential_
.
compute_centroid_environment
( pose );
92
pose.
update_residue_neighbors
();
93
}
94
95
96
//////////////////////////////////////////////////////////////
97
//
98
// CENTROID PAIR SCORE
99
// and
100
// "CENTROID PACK" SCORE (helps reproduce pairwise correlations
101
// between centroids, observed in PDB)
102
//
103
void
104
CenPairEnergy::residue_pair_energy
(
105
conformation::Residue
const
& rsd1,
106
conformation::Residue
const
& rsd2,
107
pose::Pose
const
& pose,
108
ScoreFunction
const
&,
109
EnergyMap
& emap
110
)
const
111
{
112
// ignore scoring residues which have been marked as "REPLONLY" residues (only the repulsive energy will be calculated)
113
if
( rsd1.
has_variant_type
(
core::chemical::REPLONLY
) || rsd2.
has_variant_type
(
core::chemical::REPLONLY
) ){
114
return
;
115
}
116
if
(rsd1.
aa
()==
core::chemical::aa_unk
)
return
;
117
if
(rsd2.
aa
()==
core::chemical::aa_unk
)
return
;
118
119
/// assumes centroids are being used
120
conformation::Atom
const
& cen1 ( rsd1.
atom
( rsd1.
nbr_atom
() ) ), cen2 (rsd2.
atom
( rsd2.
nbr_atom
() ) );
121
Real
const
cendist = cen1.xyz().distance_squared( cen2.
xyz
() );
122
123
//fpd ignore cen-cen distances above 12.05A
124
if
(cendist > 12.05*12.05)
return
;
125
126
/// accumulate total energies
127
Real
pair_score( 0.0 ), cenpack_score( 0.0 );
128
potential_
.
evaluate_pair_and_cenpack_score
( rsd1, rsd2, cendist,
129
pair_score, cenpack_score );
130
131
//if ( rsd1.aa() == chemical::aa_his && rsd2.aa() == chemical::aa_his && true /*replace with option[ no_his_his_pairE ]*/ ) {
132
// pair_score = 0;
133
//}
134
135
pair_score *= 2.019f;
136
cenpack_score *= 2.0f;
137
138
//core::Real rsd_wt = 0.5 *
139
// ( get_residue_weight_by_ss( pose.conformation().secstruct( rsd1.seqpos() ) ) +
140
// get_residue_weight_by_ss( pose.conformation().secstruct( rsd2.seqpos() ) )
141
// );
142
143
//Rosetta++ used the first residue's weight for both sides of the pair. I hate that. The above
144
//comment is an example of an alternative we should probably test in the distant future.
145
core::Real
rsd_wt =
get_residue_weight_by_ss
( pose.
conformation
().
secstruct
( rsd1.
seqpos
() )) ;
146
147
emap[
pair
] += pair_score * rsd_wt;
148
emap[
cenpack
] += cenpack_score;
149
}
150
151
void
152
CenPairEnergy::finalize_total_energy
(
153
pose::Pose
& pose,
154
ScoreFunction
const
&,
155
EnergyMap
&
156
)
const
157
{
158
potential_
.
finalize
( pose );
159
}
160
161
/// @brief CenPairEnergy distance cutoff
162
Distance
163
CenPairEnergy::atomic_interaction_cutoff
()
const
164
{
165
return
6.0;
/// now subtracted off 6.0 from cutoffs in centroid params files
166
// return 0.0; /// since all the cutoffs for centroid mode are rolled into the cendist check
167
}
168
core::Size
169
CenPairEnergy::version
()
const
170
{
171
return
1;
// Initial versioning
172
}
173
174
}
175
}
176
}
Generated on Sat Jun 1 2013 11:37:33 for Rosetta 3.5 by
1.8.4