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
topology_broker
ConstraintEvaluatorWrapper.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 TopologyBroker
11
/// @brief top-class (Organizer) of the TopologyBroker mechanism
12
/// @detailed responsibilities:
13
/// @author Oliver Lange
14
15
// Unit Headers
16
#include <
protocols/topology_broker/ConstraintEvaluatorWrapper.hh
>
17
18
// Package Headers
19
20
// Project Headers
21
#include <
core/pose/Pose.hh
>
22
#include <
core/scoring/ScoreFunction.hh
>
23
// ObjexxFCL Headers
24
25
// Utility headers
26
#include <utility/excn/Exceptions.hh>
27
28
#include <basic/Tracer.hh>
29
//// C++ headers
30
31
#include <
core/id/SequenceMapping.hh
>
32
#include <utility/vector1.hh>
33
34
35
// option key includes
36
37
static
basic::Tracer
tr
(
"protocols.evaluator"
,basic::t_info);
38
//static numeric::random::RandomGenerator RG(18828234);
39
40
namespace
protocols {
41
namespace
topology_broker {
42
43
//static numeric::random::RandomGenerator RG(812739); // <- Magic number, do not change it!
44
45
using namespace
core;
46
using namespace
scoring::constraints;
47
using namespace
scoring;
48
ConstraintEvaluatorWrapper::ConstraintEvaluatorWrapper
(
std::string
const
& name,
ConstraintClaimerCOP
claimer ) :
49
name_( name ),
50
claimer_( claimer )
51
{}
52
53
Real
ConstraintEvaluatorWrapper::apply
(
core::pose::Pose
& pose_in )
const
{
54
pose::Pose
pose( pose_in );
55
claimer_
->add_constraints( pose );
56
57
ScoreFunction
scfxn;
58
scfxn.
set_weight
(
scoring::atom_pair_constraint
, 1.0 );
59
core::Real
score( scfxn( pose ) );
60
return
score;
61
}
62
63
void
ConstraintEvaluatorWrapper::apply
(
core::pose::Pose
& pose_in,
std::string
,
core::io::silent::SilentStruct
&pss )
const
{
64
pose::Pose
pose( pose_in );
65
claimer_
->add_constraints( pose );
66
67
ScoreFunction
scfxn;
68
scfxn.
set_weight
(
scoring::atom_pair_constraint
, 1.0 );
69
core::Real
score( scfxn( pose ) );
70
71
pss.
add_energy
(
name
( 1 ), score );
72
}
73
74
std::string
ConstraintEvaluatorWrapper::name
(
core::Size
i )
const
{
75
if
( i == 1 ) {
return
name_
; }
76
runtime_assert( i <= 1 && i > 0 );
77
return
""
;
//make compiler happy
78
}
79
80
}
//topology_broker
81
}
//protocols
Generated on Sat Jun 1 2013 12:24:28 for Rosetta 3.5 by
1.8.4