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
EnvEnergy.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/EnvPairEnergy.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/EnvEnergy.hh
>
19
#include <
core/scoring/methods/EnvEnergyCreator.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
// Utility headers
37
38
// C++
39
40
namespace
core {
41
namespace
scoring {
42
namespace
methods {
43
44
45
/// @details This must return a fresh instance of the EnvEnergy class,
46
/// never an instance already in use
47
methods::EnergyMethodOP
48
EnvEnergyCreator::create_energy_method
(
49
methods::EnergyMethodOptions
const
&
50
)
const
{
51
return
new
EnvEnergy
;
52
}
53
54
ScoreTypes
55
EnvEnergyCreator::score_types_for_method
()
const
{
56
ScoreTypes
sts;
57
sts.push_back(
env
);
58
sts.push_back(
cbeta
);
59
return
sts;
60
}
61
62
63
64
/// c-tor
65
EnvEnergy::EnvEnergy
() :
66
parent
( new
EnvEnergyCreator
),
67
potential_(
ScoringManager
::get_instance()->get_EnvPairPotential() )
68
{}
69
70
71
/// clone
72
EnergyMethodOP
73
EnvEnergy::clone
()
const
74
{
75
return
new
EnvEnergy
;
76
}
77
78
79
/////////////////////////////////////////////////////////////////////////////
80
// scoring
81
/////////////////////////////////////////////////////////////////////////////
82
83
84
///
85
void
86
EnvEnergy::setup_for_scoring
(
pose::Pose
& pose,
ScoreFunction
const
& )
const
87
{
88
// compute interpolated number of neighbors at various distance cutoffs
89
pose.
update_residue_neighbors
();
90
potential_
.
compute_centroid_environment
( pose );
91
}
92
93
94
///////////////////////////////////////
95
//
96
// ENV SCORE AND CBETA SCORE
97
void
98
EnvEnergy::residue_energy
(
99
conformation::Residue
const
& rsd,
100
pose::Pose
const
& pose,
101
EnergyMap
& emap
102
)
const
103
{
104
// ignore scoring residues which have been marked as "REPLONLY" residues (only the repulsive energy will be calculated)
105
if
( rsd.
has_variant_type
(
core::chemical::REPLONLY
) ){
106
return
;
107
}
108
if
(rsd.
aa
()==
core::chemical::aa_unk
)
return
;
109
110
Real
env_score( 0.0 ), cb_score6( 0.0 ), cb_score12( 0.0 ), cb_score( 0.0 );
111
112
potential_
.
evaluate_env_and_cbeta_scores
( pose, rsd,
113
env_score, cb_score6, cb_score12 );
114
115
env_score *= 2.019;
116
cb_score = 2.667 * ( cb_score6 + cb_score12 ) * 0.3;
117
118
core::Real
rsd_wt =
get_residue_weight_by_ss
( pose.
conformation
().
secstruct
( rsd.
seqpos
() ) );
119
120
emap[
env
] += env_score * rsd_wt;
121
emap[
cbeta
] += cb_score * rsd_wt;
122
}
// residue_energy
123
124
void
125
EnvEnergy::finalize_total_energy
(
126
pose::Pose
& pose,
127
ScoreFunction
const
&,
128
EnergyMap
&
129
)
const
130
{
131
potential_
.
finalize
( pose );
132
}
133
core::Size
134
EnvEnergy::version
()
const
135
{
136
return
1;
// Initial versioning
137
}
138
139
}
140
}
141
}
Generated on Sat Jun 1 2013 11:37:56 for Rosetta 3.5 by
1.8.4