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