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
MembraneEnvEnergy.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
// AUTO-REMOVED #include <core/scoring/methods/util.hh>
18
#include <
core/scoring/methods/MembraneEnvEnergy.hh
>
19
#include <
core/scoring/methods/MembraneEnvEnergyCreator.hh
>
20
// AUTO-REMOVED #include <basic/MetricValue.hh>
21
// Package headers
22
#include <
core/scoring/MembranePotential.hh
>
23
#include <
core/scoring/MembraneTopology.hh
>
24
#include <
core/scoring/ScoringManager.hh
>
25
// AUTO-REMOVED #include <core/scoring/EnergyGraph.hh>
26
27
// Project headers
28
#include <
core/pose/Pose.hh
>
29
#include <
core/pose/datacache/CacheableDataType.hh
>
30
#include <basic/datacache/BasicDataCache.hh>
31
#include <
core/conformation/Residue.hh
>
32
33
#include <
core/scoring/EnergyMap.hh
>
34
#include <utility/vector1.hh>
35
36
37
// Utility headers
38
39
// C++
40
41
namespace
core {
42
namespace
scoring {
43
namespace
methods {
44
45
46
/// @details This must return a fresh instance of the MembraneEnvEnergy class,
47
/// never an instance already in use
48
methods::EnergyMethodOP
49
MembraneEnvEnergyCreator::create_energy_method
(
50
methods::EnergyMethodOptions
const
&
51
)
const
{
52
return
new
MembraneEnvEnergy
;
53
}
54
55
ScoreTypes
56
MembraneEnvEnergyCreator::score_types_for_method
()
const
{
57
ScoreTypes
sts;
58
sts.push_back(
Menv
);
59
return
sts;
60
}
61
62
63
/// c-tor
64
MembraneEnvEnergy::MembraneEnvEnergy
() :
65
parent
( new
MembraneEnvEnergyCreator
),
66
potential_(
ScoringManager
::get_instance()->get_MembranePotential() )
67
{}
68
69
70
/// clone
71
EnergyMethodOP
72
MembraneEnvEnergy::clone
()
const
73
{
74
return
new
MembraneEnvEnergy
;
75
}
76
77
78
/////////////////////////////////////////////////////////////////////////////
79
// scoring
80
/////////////////////////////////////////////////////////////////////////////
81
82
83
///
84
void
85
MembraneEnvEnergy::setup_for_scoring
(
pose::Pose
& pose,
ScoreFunction
const
& )
const
86
{
87
// compute interpolated number of neighbors at various distance cutoffs
88
pose.
update_residue_neighbors
();
89
potential_
.
compute_centroid_environment
( pose );
90
potential_
.
compute_membrane_embedding
( pose );
91
92
}
93
94
void
95
MembraneEnvEnergy::setup_for_derivatives
(
pose::Pose
& pose,
ScoreFunction
const
& sf)
const
96
{
97
setup_for_scoring
(pose,sf);
98
}
99
100
101
///////////////////////////////////////
102
//
103
// ENV SCORE
104
void
105
MembraneEnvEnergy::residue_energy
(
106
conformation::Residue
const
& rsd,
107
pose::Pose
const
& pose,
108
EnergyMap
& emap
109
)
const
110
{
111
Real
env_score( 0.0 );
// cb_score( 0.0 ); //, cb_score12( 0.0 ), cb_score( 0.0 );
112
// basic::MetricValue<core::Vector> depth_vector;
113
// pose.metric("MCN","depth",depth_vector);
114
// Size pos=rsd.seqpos();
115
// Real depth=depth_vector[ rsd.seqpos() ];
116
// Real depth=30;
117
// std::cout << rsd.seqpos() << "\n "; << depth << "\n";
118
//std::cout << pos << "\n";
119
if
( rsd.
aa
() ==
core::chemical::aa_vrt
)
return
;
120
if
(
MembraneTopology_from_pose
( pose ).
allow_scoring
(rsd.
seqpos
()))
121
{
122
potential_
.
evaluate_env
( pose, rsd, env_score);
123
//potential_.evaluate_cbeta( pose, rsd,cb_score);
124
}
125
// env_score *= 0.5;2.019;
126
//cb_score = 2.667 * ( cb_score ) * 0.3;
127
//bw is this something we like?
128
//core::Real rsd_wt = get_residue_weight_by_ss( pose.conformation().secstruct( rsd.seqpos() ) );
129
130
emap[
Menv
] += env_score;
// * rsd_wt;
131
//emap[ Mcbeta ] = cb_score;// * rsd_wt;
132
133
}
// residue_energy
134
135
void
136
MembraneEnvEnergy::finalize_total_energy
(
137
pose::Pose
& pose,
138
ScoreFunction
const
&,
139
EnergyMap
&
140
)
const
141
{
142
/*
143
std::cout << "BEFORE emap[ Menv ] " << emap[ Menv ] << std::endl;
144
if(potential_.Menv_penalties()) //bw quick hack before putting them as individual scoring terms....
145
{
146
Real tm_projection(0);
147
Real hbond_pen(0);
148
Real termini_pen(0);
149
potential_.tm_projection_penalty(pose,tm_projection);
150
potential_.hbond_penalty(pose,hbond_pen);
151
potential_.termini_penalty(pose,termini_pen);
152
emap[ Menv ]+=(tm_projection+hbond_pen+termini_pen+10);
153
154
std::cout << "Menv_penalties (tm_projection+hbond_pen+termini_pen+10) " << tm_projection << " " << hbond_pen << " " << termini_pen << std::endl;
155
}
156
std::cout << "AFTER emap[ Menv ] " << emap[ Menv ] << std::endl;
157
*/
158
potential_
.
finalize
( pose );
159
//std::cout << "AFTER2 emap[ Menv ] " << emap[ Menv ] << std::endl;
160
}
161
MembraneTopology
const
&
162
MembraneEnvEnergy::MembraneTopology_from_pose
(
pose::Pose
const
& pose )
const
163
{
164
//using core::pose::datacache::CacheableDataType::MEMBRANE_TOPOLOGY;
165
return
*(
static_cast<
MembraneTopology
const
*
>
( pose.
data
().get_const_ptr(
core::pose::datacache::CacheableDataType::MEMBRANE_TOPOLOGY
)() ));
166
}
167
core::Size
168
MembraneEnvEnergy::version
()
const
169
{
170
return
1;
// Initial versioning
171
}
172
173
}
174
}
175
}
Generated on Sat Jun 1 2013 11:38:17 for Rosetta 3.5 by
1.8.4