Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FavorNativeResiduePreCycle.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/protein_interface_design/movers/FavorNativeResiduePreCycle.cc
11 /// @brief
12 /// @author Sarel Fleishman (sarelf@u.washington.edu), Jacob Corn (jecorn@u.washington.edu)
15 #include <utility/tag/Tag.hh>
16 #include <basic/Tracer.hh>
18 // AUTO-REMOVED #include <boost/foreach.hpp>
19 
20 #include <utility/vector0.hh>
21 #include <utility/vector1.hh>
22 
23 #define foreach BOOST_FOREACH
24 
25 
26 namespace protocols {
27 namespace protein_interface_design {
28 namespace movers {
29 
30 using namespace core;
31 using namespace std;
32 using namespace core::scoring;
33 using namespace protocols::moves;
34 
35 static basic::Tracer TR( "protocols.protein_interface_design.movers.FavorNativeResiduePreCycle" );
36 
38 {
40 }
41 
44  return new FavorNativeResiduePreCycle;
45 }
46 
49  return "FavorNativeResidue";
50 }
51 
52 
55  return "FavorNativeResidue";
56 }
57 
59 
60 void
62 {
63  using namespace utility::pointer;
64 
65  bonus_ = tag->getOption<core::Real>( "bonus", 1.5 );
66  for( std::map< std::string, ReferenceCountOP >::const_iterator it = (data)[ "scorefxns" ].begin(); it!=(data)[ "scorefxns" ].end(); ++it ){
67  ScoreFunctionOP scorefxn( *data.get< ScoreFunction * >( "scorefxns", it->first ) );
68  if( scorefxn->get_weight( res_type_constraint ) == 0.0 ){
69  scorefxn->set_weight( res_type_constraint, bonus_ );
70  TR<<"Setting res_type_constraint weight in scorefxn "<<it->first<<" to "<<bonus_<<'\n';
71  }
72  }
73 /*
74 for( std::map< std::string, ReferenceCountOP >::const_iterator it=(data)[ "scorefxns_hshash" ].begin(); it!=(data)[ "scorefxns" ].end(); ++it ){ // scorefxns where the user defined hs_hash but not fnr
75  ScoreFunctionOP scorefxn( *data.get< ScoreFunction * >( "scorefxns", it->first ) );
76  scorefxn->set_weight( res_type_constraint, bonus_ );
77  TR<<"Setting res_type_constraint weight in scorefxn "<<it->first<<" to "<<bonus_<<'\n';
78  }
79 */
80  TR<<"applying favor native residue to pose with weight: "<<bonus_<<std::endl;
81 }
82 
83 } //movers
84 } //protein_interface_design
85 } //protocols
86