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
MinScoreScoreFunction.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
// This file is part of the Rosetta software suite and is made available under license.
5
// The Rosetta software is developed by the contributing members of the Rosetta Commons consortium.
6
// (C) 199x-2009 Rosetta Commons participating institutions and developers.
7
// For more information, see http://www.rosettacommons.org/.
8
9
/// @file core/scoring/ScoreFunction.cc
10
/// @brief ScoreFunction class definition. A easy way to deal with the low-res score function problem in replica docking
11
/// @author Zhe Zhang
12
13
14
// Unit headers
15
#include <
core/scoring/MinScoreScoreFunction.hh
>
16
17
// Package headers
18
19
// // Project headers
20
#include <
core/pose/Pose.hh
>
21
#include <
core/pose/util.hh
>
22
#include <
core/kinematics/Jump.hh
>
23
#include <
core/conformation/Conformation.hh
>
24
#include <
core/scoring/Energies.hh
>
25
#include <basic/Tracer.hh>
26
27
static
basic::Tracer
tr
(
"core.scoring.MinScoreScoreFunction"
);
28
29
namespace
core {
30
namespace
scoring {
31
32
///////////////////////////////////////////////////////////////////////////////
33
MinScoreScoreFunction::MinScoreScoreFunction
():
34
ScoreFunction
()
35
{}
36
37
///////////////////////////////////////////////////////////////////////////////
38
ScoreFunctionOP
39
MinScoreScoreFunction::clone
()
const
40
{
41
return
new
MinScoreScoreFunction
( *
this
);
42
}
43
44
///////////////////////////////////////////////////////////////////////////////
45
MinScoreScoreFunction
&
46
MinScoreScoreFunction::operator=
(
MinScoreScoreFunction
const
& src )
47
{
48
ScoreFunction::operator=
( src );
49
return
*
this
;
50
}
51
52
///////////////////////////////////////////////////////////////////////////////
53
MinScoreScoreFunction::MinScoreScoreFunction
(
MinScoreScoreFunction
const
& src ):
54
ScoreFunction
( src ),
55
min_score_( src.min_score_ )
56
{}
57
58
MinScoreScoreFunction::MinScoreScoreFunction
(
ScoreFunction
const
& src,
core::Real
min_score ):
59
ScoreFunction
( src )
60
{
61
min_score_
= min_score;
62
}
63
64
MinScoreScoreFunction::MinScoreScoreFunction
(
ScoreFunctionOP
src,
core::Real
const
min_score ):
65
ScoreFunction
( *src )
66
{
67
min_score_
= min_score;
68
}
69
70
MinScoreScoreFunction::MinScoreScoreFunction
(
ScoreFunctionCOP
src,
core::Real
const
min_score ):
71
ScoreFunction
( *src )
72
{
73
min_score_
= min_score;
74
}
75
76
///////////////////////////////////////////////////////////////////////////////
77
78
// to start out, just thinking fullatom energies
79
//
80
// NOTE: no freakin rotamer trials inside scoring!
81
Real
82
MinScoreScoreFunction::operator()
(
pose::Pose
& pose )
const
83
{
84
ScoreFunction::operator()
( pose );
//score -- but without atom_pair_constraints..
85
// is probably cheaper to not apply a completely new scorefunction...
86
EnergyMap
cst_free_weights(
weights
() );
87
Real
cst_weight = cst_free_weights.
get
(
atom_pair_constraint
);
88
cst_free_weights[
atom_pair_constraint
] = 0;
89
Real
uncst_energy = pose.
energies
().
total_energies
().
dot
( cst_free_weights );
90
Real
min_energy = uncst_energy <
min_score_
?
min_score_
: uncst_energy;
91
tr
.Debug <<
"uncst_energy: "
<< uncst_energy <<
" min_energy: "
<< min_energy << std::endl;
92
pose.
energies
().
total_energies
()[
total_score
] = min_energy + pose.
energies
().
total_energies
()[
atom_pair_constraint
]*cst_weight;
93
pose::setPoseExtraScores
( pose,
"min_score"
, uncst_energy );
94
return
pose.
energies
().
total_energies
()[
total_score
];
95
}
96
97
98
///////////////////////////////////////////////////////////////////////////////
99
}
// namespace scoring
100
}
// namespace core
Generated on Sat Jun 1 2013 11:39:20 for Rosetta 3.5 by
1.8.4