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
protocols
scoring
methods
EnsembleEnergy.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 protocols/scoring/methods/EnsembleEnergy.cc
11
/// @brief Function to subtract out individual reference energies during ensemble docking
12
/// @author Monica Berrondo
13
14
15
// Unit headers
16
#include <
protocols/scoring/methods/EnsembleEnergy.hh
>
17
#include <
protocols/scoring/methods/EnsembleEnergyCreator.hh
>
18
19
// Package headers
20
#include <basic/datacache/BasicDataCache.hh>
21
#include <basic/datacache/CacheableStringFloatMap.hh>
22
23
// AUTO-REMOVED #include <core/scoring/ScoringManager.hh>
24
#include <
core/pose/datacache/CacheableDataType.hh
>
25
// AUTO-REMOVED #include <core/scoring/EnergyGraph.hh>
26
27
// Project headers
28
#include <
core/pose/Pose.hh
>
29
// AUTO-REMOVED #include <core/conformation/Residue.hh>
30
31
32
// Utility headers
33
34
#include <basic/Tracer.hh>
35
36
#include <
core/scoring/EnergyMap.hh
>
37
#include <utility/vector1.hh>
38
39
using
basic::T
;
40
using
basic::Error;
41
using
basic::Warning;
42
43
static
basic::Tracer
TR
(
"protocols.scoring.methods.EnsembleEnergy"
);
44
45
46
// C++
47
48
namespace
protocols {
49
namespace
scoring {
50
namespace
methods {
51
52
53
/// @details This must return a fresh instance of the EnsembleEnergy class,
54
/// never an instance already in use
55
core::scoring::methods::EnergyMethodOP
56
EnsembleEnergyCreator::create_energy_method
(
57
core::scoring::methods::EnergyMethodOptions
const
&
58
)
const
{
59
return
new
EnsembleEnergy
;
60
}
61
62
core::scoring::ScoreTypes
63
EnsembleEnergyCreator::score_types_for_method
()
const
{
64
using namespace
core::scoring;
65
ScoreTypes
sts;
66
sts.push_back(
dock_ens_conf
);
67
return
sts;
68
}
69
70
71
/// c-tor
72
EnsembleEnergy::EnsembleEnergy
() :
73
parent
( new
EnsembleEnergyCreator
)
74
{}
75
76
77
/// clone
78
core::scoring::methods::EnergyMethodOP
79
EnsembleEnergy::clone
()
const
80
{
81
return
new
EnsembleEnergy
();
82
}
83
84
/////////////////////////////////////////////////////////////////////////////
85
// scoring
86
/////////////////////////////////////////////////////////////////////////////
87
88
// calculate the score of the residues to constrain to the interface
89
void
90
EnsembleEnergy::finalize_total_energy
(
91
core::pose::Pose
& pose,
92
core::scoring::ScoreFunction
const
&,
93
core::scoring::EnergyMap
& emap
94
)
const
95
{
96
using namespace
core;
97
using namespace
core::scoring;
98
Real
unbound_score ( 0.0 );
99
if
( pose.
data
().has(
core::pose::datacache::CacheableDataType::ARBITRARY_FLOAT_DATA
) ) {
100
basic::datacache::CacheableStringFloatMapOP data
101
=
dynamic_cast<
basic::datacache::CacheableStringFloatMap *
>
102
( pose.
data
().get_raw_ptr(
core::pose::datacache::CacheableDataType::ARBITRARY_FLOAT_DATA
) );
103
for
( std::map< std::string, float >::const_iterator iter = data->map().begin(),
104
end
= data->map().end(); iter !=
end
; iter++
105
) {
106
// skip score entry, as it gets confusing
107
if
( iter->first ==
"dock_ens_conf1"
|| iter->first ==
"dock_ens_conf2"
) {
108
// TR << iter->first << ' ' << iter->second << std::endl;
109
unbound_score += iter->second;
110
}
111
}
112
113
}
114
115
// TR << "unbound score: " << unbound_score << std::endl;
116
117
emap[
dock_ens_conf
] = -unbound_score;
118
}
119
120
core::Size
121
EnsembleEnergy::version
()
const
122
{
123
return
1;
// Initial versioning
124
}
125
126
}
127
}
128
}
Generated on Sat Jun 1 2013 12:10:30 for Rosetta 3.5 by
1.8.4