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
ReferenceEnergy.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/ReferenceEnergy.hh
11
/// @brief Reference energy method implementation
12
/// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
13
14
// Unit headers
15
#include <
core/scoring/methods/ReferenceEnergy.hh
>
16
#include <
core/scoring/methods/ReferenceEnergyCreator.hh
>
17
18
// Package headers
19
#include <
core/scoring/EnergyMap.hh
>
20
#include <
core/scoring/methods/EnergyMethodOptions.hh
>
21
22
// Project headers
23
#include <
core/chemical/AA.hh
>
24
#include <
core/chemical/VariantType.hh
>
25
#include <
core/conformation/Residue.hh
>
26
27
#include <utility/vector1.hh>
28
29
30
namespace
core {
31
namespace
scoring {
32
namespace
methods {
33
34
35
/// @details This must return a fresh instance of the ReferenceEnergy class,
36
/// never an instance already in use
37
methods::EnergyMethodOP
38
ReferenceEnergyCreator::create_energy_method
(
39
methods::EnergyMethodOptions
const
& options
40
)
const
{
41
if
( options.
has_method_weights
(
ref
) ) {
42
return
new
ReferenceEnergy
( options.
method_weights
(
ref
) );
43
}
else
{
44
return
new
ReferenceEnergy
;
45
}
46
}
47
48
ScoreTypes
49
ReferenceEnergyCreator::score_types_for_method
()
const
{
50
ScoreTypes
sts;
51
sts.push_back(
ref
);
52
return
sts;
53
}
54
55
56
57
ReferenceEnergy::ReferenceEnergy
() :
58
parent
( new
ReferenceEnergyCreator
)
59
{}
60
61
ReferenceEnergy::ReferenceEnergy
(
utility::vector1< Real >
const
& aa_weights_in ):
62
parent
( new
ReferenceEnergyCreator
),
63
aa_weights_( aa_weights_in )
64
{}
65
66
ReferenceEnergy::~ReferenceEnergy
() {}
67
68
EnergyMethodOP
69
ReferenceEnergy::clone
()
const
70
{
71
return
new
ReferenceEnergy
(
aa_weights_
);
72
}
73
74
/// This is a terrible terrible terrible hack that will do for now.
75
void
76
ReferenceEnergy::residue_energy
(
77
conformation::Residue
const
& rsd,
78
pose::Pose
const
&,
79
EnergyMap
& emap
80
)
const
81
{
82
// ignore scoring residues which have been marked as "REPLONLY" residues (only the repulsive energy will be calculated)
83
if
( rsd.
has_variant_type
(
core::chemical::REPLONLY
) ){
84
return
;
85
}
86
87
using namespace
chemical;
88
if
( !
aa_weights_
.empty() ) {
89
///
90
AA
const
& aa( rsd.
aa
() );
91
if
(
Size
(aa) >
aa_weights_
.size() )
return
;
92
emap[
ref
] +=
aa_weights_
[ aa ];
93
// if ( rsd.is_DNA() ) {
94
// std::cout << "using dna refE " << aa_weights_[aa] << std::endl;
95
// }
96
return
;
97
}
98
99
/// else -- use the default reference weights from r++
100
if
( rsd.
type
().
aa
() >
num_canonical_aas
)
return
;
101
102
/* Stolen from rosetta++; negated so that Wref is a positive number
103
Waa( aa_ala ) = -0.16; //ALA,1
104
Waa( aa_cys ) = -1.70; //CYS,2
105
Waa( aa_asp ) = 0.67; //ASP,3
106
Waa( aa_glu ) = 0.81; //GLU,4
107
Waa( aa_phe ) = -0.63; //PHE,5
108
Waa( aa_gly ) = 0.17; //GLY,6
109
Waa( aa_his ) = -0.56; //HIS,7
110
Waa( aa_ile ) = -0.24; //ILE,8
111
Waa( aa_lys ) = 0.65; //LYS,9
112
Waa( aa_leu ) = 0.10; //LEU,10
113
Waa( aa_met ) = 0.34; //MET,11
114
Waa( aa_asn ) = 0.89; //ASN,12
115
Waa( aa_pro ) = -0.02; //PRO,13
116
Waa( aa_gln ) = 0.97; //GLN,14
117
Waa( aa_arg ) = 0.98; //ARG,15
118
Waa( aa_ser ) = 0.37; //SER,16
119
Waa( aa_thr ) = 0.27; //THR,17
120
Waa( aa_val ) = -0.29; //VAL,18
121
Waa( aa_trp ) = -0.91; //TRP,19
122
Waa( aa_tyr ) = -0.51; //TYR,20
123
*/
124
125
switch
( rsd.
type
().
aa
() ) {
126
case
aa_ala
: emap[
ref
] += 0.16;
break
;
127
case
aa_cys
: emap[
ref
] += 1.70;
break
;
128
case
aa_asp
: emap[
ref
] += -0.67;
break
;
129
case
aa_glu
: emap[
ref
] += -0.81;
break
;
130
case
aa_phe
: emap[
ref
] += 0.63;
break
;
131
case
aa_gly
: emap[
ref
] += -0.17;
break
;
132
case
aa_his
: emap[
ref
] += 0.56;
break
;
133
case
aa_ile
: emap[
ref
] += 0.24;
break
;
134
case
aa_lys
: emap[
ref
] += -0.65;
break
;
135
case
aa_leu
: emap[
ref
] += -0.10;
break
;
136
case
aa_met
: emap[
ref
] += -0.34;
break
;
137
case
aa_asn
: emap[
ref
] += -0.89;
break
;
138
case
aa_pro
: emap[
ref
] += 0.02;
break
;
139
case
aa_gln
: emap[
ref
] += -0.97;
break
;
140
case
aa_arg
: emap[
ref
] += -0.98;
break
;
141
case
aa_ser
: emap[
ref
] += -0.37;
break
;
142
case
aa_thr
: emap[
ref
] += -0.27;
break
;
143
case
aa_val
: emap[
ref
] += 0.29;
break
;
144
case
aa_trp
: emap[
ref
] += 0.91;
break
;
145
case
aa_tyr
: emap[
ref
] += 0.51;
break
;
146
default
:
147
utility_exit();
148
break
;
149
}
150
151
}
152
153
154
Real
155
ReferenceEnergy::eval_dof_derivative
(
156
id::DOF_ID
const
&,
157
id::TorsionID
const
&,
158
pose::Pose
const
&,
159
ScoreFunction
const
&,
160
EnergyMap
const
&
161
)
const
162
{
163
return
0.0;
164
}
165
166
/// @brief ReferenceEnergy is context independent; indicates that no
167
/// context graphs are required
168
void
169
ReferenceEnergy::indicate_required_context_graphs
(
utility::vector1< bool >
& )
const
170
{}
171
core::Size
172
ReferenceEnergy::version
()
const
173
{
174
return
1;
// Initial versioning
175
}
176
177
178
}
// methods
179
}
// scoring
180
}
// core
181
Generated on Sat Jun 1 2013 11:38:48 for Rosetta 3.5 by
1.8.4