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
pack
interaction_graph
HPatchEnergy.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/HPatchEnergy.cc
11
/// @author Ron Jacak
12
13
// Unit headers
14
#include <
core/pack/interaction_graph/HPatchEnergy.hh
>
15
#include <
core/pack/interaction_graph/HPatchEnergyCreator.hh
>
16
17
// Package headers
18
#include <
core/pack/interaction_graph/SurfacePotential.hh
>
19
20
// Project headers
21
#include <
core/pose/Pose.hh
>
22
#include <
core/scoring/Energies.hh
>
23
24
// Utility headers
25
#include <basic/Tracer.hh>
26
27
#include <
core/id/AtomID.hh
>
28
#include <utility/vector1.hh>
29
30
31
static
basic::Tracer
TR
(
"core.pack.interaction_graph.HPatchEnergy"
);
32
33
// C++ headers
34
35
36
namespace
core {
37
namespace
pack {
38
namespace
interaction_graph {
39
40
/// @details This must return a fresh instance of the HPatchEnergy class, never an instance already in use
41
scoring::methods::EnergyMethodOP
42
HPatchEnergyCreator::create_energy_method
(
scoring::methods::EnergyMethodOptions
const
& )
const
{
43
return
new
HPatchEnergy
;
44
}
45
46
scoring::ScoreTypes
47
HPatchEnergyCreator::score_types_for_method
()
const
{
48
scoring::ScoreTypes
sts;
49
sts.push_back(
scoring::hpatch
);
50
return
sts;
51
}
52
53
54
HPatchEnergy::HPatchEnergy
() :
55
parent
( new
HPatchEnergyCreator
)
56
{}
57
58
59
scoring::methods::EnergyMethodOP
60
HPatchEnergy::clone
()
const
{
61
return
new
HPatchEnergy
();
62
}
63
64
65
void
66
HPatchEnergy::setup_for_scoring
(
pose::Pose
&
/*pose*/
,
scoring::ScoreFunction
const
&
/*sf*/
)
const
{
67
// since this is a fake EnergyMethod, don't do anything here
68
// is it even necessary to implement this method as empty?
69
}
70
71
72
void
73
HPatchEnergy::residue_energy
(
conformation::Residue
const
&
/*rsd*/
,
pose::Pose
const
&
/*pose*/
,
scoring::EnergyMap
&
/*emap*/
)
const
{
74
75
// if this were a real term, the code here might look like the following
76
//Real hpatch_score( 0.0 );
77
//hpatch_score = evaluate_score( pose, rsd )
78
//emap [ hpatch ] += hpatch_score
79
80
}
81
82
// HPatchEnergy is non-pairwise decomposable, so it can only be calculated all at once, not on a residue by residue
83
// basis. For packing, it uses a specialized InteractionGraph that updates the score efficiently for substitutions.
84
void
85
HPatchEnergy::finalize_total_energy
(
pose::Pose
& pose,
scoring::ScoreFunction
const
&,
scoring::EnergyMap
& totals )
const
{
86
87
// don't run if minimizing, non-differentiable
88
if
( ! pose.
energies
().
use_nblist
() ) {
89
core::Real
hpatch_score = 0.0;
90
std::map< Size, std::pair< Real, Real > > patch_scores;
91
std::map< Size, utility::vector1< id::AtomID > > atoms_in_patches;
92
SurfacePotential::get_instance
()->
compute_pose_hpatch_score
( pose, hpatch_score, patch_scores, atoms_in_patches );
93
//TR << "hpatch score: " << hpatch_score << std::endl;
94
totals[
scoring::hpatch
] = hpatch_score;
95
}
96
97
}
98
core::Size
99
HPatchEnergy::version
()
const
100
{
101
return
1;
// Initial versioning
102
}
103
104
105
}
// namespace interaction_graph
106
}
// namespace pack
107
}
// namespace core
Generated on Sat Jun 1 2013 11:33:32 for Rosetta 3.5 by
1.8.4