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