Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SetTemperatureFactor.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/SetTemperatureFactor.cc
11 /// @brief
12 /// @author Sarel Fleishman (sarelf@u.washington.edu), Jacob Corn (jecorn@u.washington.edu)
13 
14 // Unit headers
17 
18 // Package headers
19 #include <core/pose/Pose.hh>
20 // AUTO-REMOVED #include <core/conformation/Conformation.hh>
21 #include <basic/Tracer.hh>
22 #include <utility/tag/Tag.hh>
24 #include <protocols/moves/Mover.hh>
25 #include <protocols/moves/ResId.hh>
26 #include <core/pose/PDBInfo.hh>
29 
30 #include <utility/vector0.hh>
31 #include <utility/vector1.hh>
32 
33 //Auto Headers
34 #include <core/kinematics/Jump.hh>
35 
36 namespace protocols {
37 namespace protein_interface_design {
38 namespace movers {
39 
40 using namespace std;
41 using namespace core::scoring;
43 
44 static basic::Tracer TR( "protocols.protein_interface_design.movers.SetTemperatureFactor" );
45 
48 {
50 }
51 
54  return new SetTemperatureFactor;
55 }
56 
59 {
60  return "SetTemperatureFactor";
61 }
62 
64  Mover( SetTemperatureFactorCreator::mover_name() ),
65  filter_( NULL ),
66  scaling_( 1.0 )
67 {
68 }
69 
70 
72 
73 void
75 {
76  ResId * resid = dynamic_cast< ResId *>( filter_() );
77  runtime_assert( resid );
78 
79  for( core::Size resi = 1; resi <= pose.total_residue(); ++resi ){
80  resid->set_resid( resi );
81  core::Real const filter_value( filter_->report_sm( pose ) );
82  for( core::Size j = 1; j <= pose.residue( resi ).natoms(); ++j )
83  pose.pdb_info()->temperature( resi, j, filter_value * scaling() );
84  }
85 }
86 
90 }
91 
92 void
94 {
95  std::string const filter_name( tag->getOption<std::string>( "filter" ) );
96  protocols::filters::Filters_map::const_iterator find_ap_filter( filters.find( filter_name));
97  bool const ap_filter_found( find_ap_filter != filters.end() );
98  runtime_assert( ap_filter_found );
99  filter( find_ap_filter->second->clone() );
100  scaling( tag->getOption< core::Real >( "scaling", 1.0 ) );
101 }
102 
105  return( protocols::moves::MoverOP( new SetTemperatureFactor( *this ) ));
106 }
107 
108 void
110 {
111  ResId * resid = dynamic_cast< ResId *>( filter() );
112  if( !resid )
113  utility_exit_with_message( "filter must be derived from ResId class for this to work." );
114  filter_ = filter;
115 }
116 
117 void
119  scaling_ = scaling;
120 }
121 
124  return scaling_;
125 }
126 
127 } //movers
128 } //protein_interface_design
129 } //protocols