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
P_AA_pp_Energy.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/P_AA_pp_Energy.hh
11
/// @brief Probability of observing an amino acid, given its phi/psi energy method declaration
12
/// @author Andrew Leaver-Fay
13
14
15
// Unit headers
16
#include <
core/scoring/methods/P_AA_pp_Energy.hh
>
17
#include <
core/scoring/methods/P_AA_pp_EnergyCreator.hh
>
18
19
// Package headers
20
#include <
core/scoring/methods/ContextIndependentOneBodyEnergy.hh
>
21
#include <
core/scoring/P_AA.hh
>
22
#include <
core/scoring/ScoringManager.hh
>
23
#include <
core/scoring/EnergyMap.hh
>
24
#include <
core/chemical/VariantType.hh
>
25
26
// Project headers
27
#include <
core/id/TorsionID.hh
>
28
#include <
core/pose/Pose.hh
>
29
// AUTO-REMOVED #include <core/conformation/Conformation.hh>
30
#include <
core/conformation/Residue.hh
>
31
32
// Numeric headers
33
#include <numeric/conversions.hh>
34
35
#include <
core/kinematics/Jump.hh
>
36
#include <utility/vector1.hh>
37
38
39
namespace
core {
40
namespace
scoring {
41
namespace
methods {
42
43
44
/// @details This must return a fresh instance of the P_AA_pp_Energy class,
45
/// never an instance already in use
46
methods::EnergyMethodOP
47
P_AA_pp_EnergyCreator::create_energy_method
(
48
methods::EnergyMethodOptions
const
&
49
)
const
{
50
return
new
P_AA_pp_Energy
;
51
}
52
53
ScoreTypes
54
P_AA_pp_EnergyCreator::score_types_for_method
()
const
{
55
ScoreTypes
sts;
56
sts.push_back(
p_aa_pp
);
57
return
sts;
58
}
59
60
61
62
/// ctor
63
P_AA_pp_Energy::P_AA_pp_Energy
() :
64
parent
( new
P_AA_pp_EnergyCreator
),
65
p_aa_(
ScoringManager
::get_instance()->get_P_AA() )
66
{}
67
68
/// clone
69
EnergyMethodOP
70
P_AA_pp_Energy::clone
()
const
71
{
72
return
new
P_AA_pp_Energy
;
73
}
74
75
/////////////////////////////////////////////////////////////////////////////
76
// methods for ContextIndependentOneBodyEnergies
77
/////////////////////////////////////////////////////////////////////////////
78
79
///
80
void
81
P_AA_pp_Energy::residue_energy
(
82
conformation::Residue
const
& rsd,
83
pose::Pose
const
&,
84
EnergyMap
& emap
85
)
const
86
{
87
// ignore scoring residues which have been marked as "REPLONLY" residues (only the repulsive energy will be calculated)
88
if
( rsd.
has_variant_type
(
core::chemical::REPLONLY
) ){
89
return
;
90
}
91
92
emap[
p_aa_pp
] +=
p_aa_
.
P_AA_pp_energy
( rsd );
93
}
94
95
96
bool
97
P_AA_pp_Energy::defines_dof_derivatives
(
pose::Pose
const
& )
const
98
{
99
return
true
;
100
}
101
102
103
Real
104
P_AA_pp_Energy::eval_residue_dof_derivative
(
105
conformation::Residue
const
& rsd,
106
ResSingleMinimizationData
const
&,
// min_data,
107
id::DOF_ID
const
&,
// dof_id,
108
id::TorsionID
const
& tor_id,
109
pose::Pose
const
&,
// pose,
110
ScoreFunction
const
&,
// sfxn,
111
EnergyMap
const
& weights
112
)
const
113
{
114
// ignore scoring residues which have been marked as "REPLONLY" residues (only the repulsive energy will be calculated)
115
if
( rsd.
has_variant_type
(
core::chemical::REPLONLY
) ){
116
return
0.0;
117
}
118
119
if
( ! tor_id.
valid
() )
return
0.0;
120
return
numeric::conversions::degrees( weights[
p_aa_pp
] *
p_aa_
.
get_Paa_pp_deriv
( rsd, tor_id ));
121
}
122
123
///
124
Real
125
P_AA_pp_Energy::eval_dof_derivative
(
126
id::DOF_ID
const
&,
// dof_id,
127
id::TorsionID
const
& tor_id,
128
pose::Pose
const
& pose,
129
ScoreFunction
const
&,
//sfxn,
130
EnergyMap
const
& weights
131
)
const
132
{
133
// ignore scoring residues which have been marked as "REPLONLY" residues (only the repulsive energy will be calculated)
134
if
( pose.
residue
( tor_id.
rsd
() ).has_variant_type(
core::chemical::REPLONLY
) ){
135
return
0.0;
136
}
137
138
if
( ! tor_id.
valid
() )
return
0.0;
139
return
numeric::conversions::degrees( weights[
p_aa_pp
] *
p_aa_
.
get_Paa_pp_deriv
( pose.
residue
( tor_id.
rsd
() ), tor_id ));
140
}
141
142
/// @brief P_AA_pp_Energy is context independent; indicates that no
143
/// context graphs are required
144
void
145
P_AA_pp_Energy::indicate_required_context_graphs
(
utility::vector1< bool >
& )
const
146
{}
147
core::Size
148
P_AA_pp_Energy::version
()
const
149
{
150
return
1;
// Initial versioning
151
}
152
153
154
}
// methods
155
}
// scoring
156
}
// core
157
Generated on Sat Jun 1 2013 11:38:35 for Rosetta 3.5 by
1.8.4