Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
17 
18 // Project Headers
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 
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 
43 
45  core::pose::Pose const &,
46  utility::tag::TagPtr const tag,
47  moves::DataMap & data
48 ) const
49 {
50  using namespace utility::tag;
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" ));
60  *data.get< core::scoring::ScoreFunction * >( "scorefxns", sfxn_name ));
61 
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 
73 
75 MonteCarloLoaderCreator::keyname() const { return "MONTECARLOS"; }
76 
77 
78 } //namespace parser
79 } //namespace jd2
80 } //namespace protocols