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
jd2
parser
MonteCarloLoader.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/jd2/parser/DataLoader.cc
11
/// @brief Implementation of the XML parser's DataLoader base class (ctor & dstor)
12
/// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
13
14
// Unit Headers
15
#include <
protocols/jd2/parser/MonteCarloLoader.hh
>
16
#include <
protocols/jd2/parser/StandardLoaderCreators.hh
>
17
18
// Project Headers
19
#include <
core/scoring/ScoreFunction.hh
>
20
#include <
protocols/moves/MonteCarlo.hh
>
21
#include <basic/Tracer.hh>
22
23
// Utility headers
24
#include <utility/tag/Tag.hh>
25
26
// Boost Headers
27
#include <boost/foreach.hpp>
28
29
#include <
protocols/moves/DataMap.hh
>
30
#include <utility/vector0.hh>
31
#include <utility/vector1.hh>
32
33
#define foreach BOOST_FOREACH
34
35
namespace
protocols {
36
namespace
jd2 {
37
namespace
parser {
38
39
static
basic::Tracer
TR
(
"protocols.jd2.parser.MonteCarloLoader"
);
40
41
MonteCarloLoader::MonteCarloLoader
() {}
42
MonteCarloLoader::~MonteCarloLoader
() {}
43
44
void
MonteCarloLoader::load_data
(
45
core::pose::Pose
const
&,
46
utility::tag::TagPtr
const
tag,
47
moves::DataMap
& data
48
)
const
49
{
50
using namespace
utility::tag;
51
typedef
utility::vector0< TagPtr >
TagPtrs
;
52
53
TagPtrs
const
montecarlo_tags( tag->getTags() );
54
55
foreach
(
TagPtr
montecarlo_tag, montecarlo_tags){
56
std::string
const
mc_name( montecarlo_tag->getName() );
57
core::Real
const
mctemp( montecarlo_tag->getOption<
core::Real
>(
"temperature"
, 2.0 ));
58
std::string
const
sfxn_name( montecarlo_tag->getOption<
std::string
> (
"scorefunction"
,
"score12"
));
59
core::scoring::ScoreFunctionOP
scorefxn =
new
core::scoring::ScoreFunction
(
60
*data.
get
<
core::scoring::ScoreFunction
* >(
"scorefxns"
, sfxn_name ));
61
62
protocols::moves::MonteCarloOP
mc =
new
protocols::moves::MonteCarlo
( *scorefxn, mctemp );
63
// add more options for the MonteCarlo object here, e.g.
64
// 1. autotemp / quenchtemp
65
// 2. heat after cycles
66
data.
add
(
"montecarlos"
, mc_name, mc );
67
}
68
TR.flush();
69
}
70
71
DataLoaderOP
72
MonteCarloLoaderCreator::create_loader
()
const
{
return
new
MonteCarloLoader
; }
73
74
std::string
75
MonteCarloLoaderCreator::keyname
()
const
{
return
"MONTECARLOS"
; }
76
77
78
}
//namespace parser
79
}
//namespace jd2
80
}
//namespace protocols
Generated on Sat Jun 1 2013 11:55:11 for Rosetta 3.5 by
1.8.4