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
unfolded_state_energy_calculator
UnfoldedStateEnergyCalculatorJobDistributor.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 protocolsoped 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/UnfoldedStateEnergyCalculator/UnfoldedStateEnergyCalculatorJobDistributor.cc
11
/// @brief Job distributor for UnfoldedStateEnergyCalculator
12
/// @author P. douglas Renfrew (renfrew@unc.edu)
13
14
// Unit headers
15
16
#include <
protocols/unfolded_state_energy_calculator/UnfoldedStateEnergyCalculatorJobDistributor.hh
>
17
#include <
protocols/unfolded_state_energy_calculator/UnfoldedStateEnergyCalculatorUtil.hh
>
18
19
// Package headers
20
#include <
protocols/moves/Mover.hh
>
21
22
// Project headers
23
#include <
core/scoring/ScoreType.hh
>
24
25
// Utility headers
26
#include <basic/Tracer.hh>
27
// AUTO-REMOVED #include <basic/options/option.hh>
28
// AUTO-REMOVED #include <utility/exit.hh>
29
// AUTO-REMOVED #include <utility/assert.hh>
30
#include <utility/vector1.hh>
31
32
// C++ headers
33
#include <algorithm>
34
// AUTO-REMOVED #include <cmath>
35
36
#include <basic/options/keys/OptionKeys.hh>
37
38
39
static
basic::Tracer
TR
(
"protocols.UnfoldedStateEnergyCalculator.UnfoldedStateEnergyCalculatorJobDistributor"
);
40
41
namespace
protocols {
42
namespace
unfolded_state_energy_calculator {
43
44
using namespace
basic::options;
45
using namespace
basic::options::OptionKeys;
46
47
///@brief ctor
48
UnfoldedStateEnergyCalculatorJobDistributor::UnfoldedStateEnergyCalculatorJobDistributor
() :
49
FileSystemJobDistributor()
50
{}
51
52
///@brief dtor (don't put anything in here)
53
UnfoldedStateEnergyCalculatorJobDistributor::~UnfoldedStateEnergyCalculatorJobDistributor
()
54
{}
55
56
///@brief
57
void
58
UnfoldedStateEnergyCalculatorJobDistributor::go
(
protocols::moves::MoverOP
mover )
59
{
60
using namespace
core;
61
using namespace
core::scoring;
62
using namespace
utility;
63
64
// call main jd function
65
go_main
( mover );
66
67
// calc average unweighted energies for all amino acids in the map
68
for
(
uem_iter
i(
unweighted_energies_map_
.begin() ), e(
unweighted_energies_map_
.end() ); i != e; ++i ) {
69
TR
<<
"Calculating averages for "
<< i->first << std::endl;
70
calc_all_averages
( i->second,
energy_terms_
);
71
}
72
}
73
74
void
75
UnfoldedStateEnergyCalculatorJobDistributor::add_unfolded_energy_data
(
std::string
tlc,
core::scoring::EMapVector
const
& scores )
76
{
77
unweighted_energies_map_
[tlc].push_back( scores );
78
}
79
80
///@details Set the the internal EMapVector that contains the terms in the energy function used to score the
81
/// fragments. Also if a term has a non-zero weight, set the weight to 1. This allows us to use the EMapVector
82
/// output weighted functions.
83
void
84
UnfoldedStateEnergyCalculatorJobDistributor::set_energy_terms
(
core::scoring::EMapVector
const
& weights )
85
{
86
using namespace
core;
87
using namespace
core::scoring;
88
89
// get weights
90
energy_terms_
= weights;
91
92
// for each energy term in the EMapVector
93
for
(
Size
i( 1 ); i <=
n_score_types
; ++i ) {
94
95
// if the energy term has a non-zero weight set it to one
96
if
(
energy_terms_
[
ScoreType
( i ) ] > 0 ) {
97
energy_terms_
[
ScoreType
( i ) ] = 1;
98
}
else
if
(
energy_terms_
[
ScoreType
( i ) ] < 0 ) {
99
energy_terms_
[
ScoreType
( i ) ] = -1;
100
}
101
}
102
}
103
104
}
// UnfoldedStateEnergyCalculator
105
}
// protocols
Generated on Sat Jun 1 2013 12:25:07 for Rosetta 3.5 by
1.8.4