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
simple_filters
JScoreEvaluator.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/simple_filters/JScoreEvaluator.cc
11
/// @brief
12
/// @author James Thompson
13
14
#include <
core/types.hh
>
15
#include <
core/pose/Pose.hh
>
16
17
#include <
core/util/SwitchResidueTypeSet.hh
>
18
#include <
core/scoring/ScoreFunction.hh
>
19
#include <
core/scoring/ScoreFunctionFactory.hh
>
20
#include <
protocols/simple_filters/JScoreEvaluator.hh
>
21
22
#include <string>
23
24
#include <utility/vector1.hh>
25
26
27
namespace
protocols {
28
namespace
simple_filters {
29
30
JScoreEvaluator::JScoreEvaluator
(
31
std::string
const
& weights,
32
std::string
const
& type_set_name
33
) :
34
evaluation::SingleValuePoseEvaluator< core::
Real
>( weights +
"_"
+ type_set_name ),
35
scorefxn_(core::scoring::
ScoreFunctionFactory
::create_score_function(weights)),
36
type_set_name_(type_set_name),
37
col_name_(weights)
38
{}
39
40
JScoreEvaluator::~JScoreEvaluator
() {}
41
42
void
JScoreEvaluator::apply
(
43
core::pose::Pose
& pose_in,
44
std::string
/*tag*/
,
45
core::io::silent::SilentStruct
& ss
46
)
const
{
47
// make a copy of the Pose to prevent nuking side-chains when switching
48
// ResidueTypes
49
core::pose::Pose
pose(pose_in);
50
51
// switch residue types
52
core::util::switch_to_residue_type_set
( pose,
type_set_name_
);
53
54
// score with ScoreFunction
55
core::Real
const
score( (*
scorefxn_
)(pose) );
56
57
// put score into SilentStruct
58
ss.
add_energy
(
col_name_
, score );
59
}
60
61
}
// simple_filter
62
}
// protocols
Generated on Sat Jun 1 2013 12:13:34 for Rosetta 3.5 by
1.8.4