Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SetChiMover.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/simple_moves/sidechain_moves/SetChiMover.cc
11 /// @brief A mover to change one chi angle
12 /// @author Noah Ollikanen
13 
14 // Unit headers
17 
18 // Project Headers
19 #include <core/types.hh>
20 #include <core/pose/Pose.hh>
21 
23 #include <core/chemical/AA.hh>
24 //parsing
25 #include <utility/tag/Tag.hh>
26 #include <protocols/moves/Mover.fwd.hh> //Movers_map
27 #include <protocols/filters/Filter.fwd.hh> //Filters_map
29 #include <core/pose/selection.hh>
30 #include <basic/Tracer.hh>
31 
32 namespace protocols {
33 namespace simple_moves {
34 namespace sidechain_moves {
35 
36 using namespace core;
37 using namespace core::chemical;
38 using namespace std;
39 
40 using core::pose::Pose;
42 
43 static basic::Tracer TR( "protocols.simple_moves.sidechain_moves.SetChiMover" );
44 
47 {
49 }
50 
53  return new SetChiMover;
54 }
55 
58 {
59  return "SetChiMover";
60 }
61 
63 
64 ///@brief default ctor
66  parent(),
67  angle_( 0 ),
68  resnum_( 0 ),
69  chinum_( 0 )
70 {}
71 
72 void SetChiMover::apply( Pose & pose ) {
73  runtime_assert( resnum() > 0 );
74  runtime_assert( resnum() <= pose.total_residue() );
75 
76  if ( chinum() <= pose.residue(resnum()).nchi() ) {
77  pose.set_chi(chinum(), resnum(), angle());
78  TR<<"Set chi"<<chinum()<<" of residue "<<resnum()<<" to "<<angle()<<std::endl;
79  }
80 
82 }
83 
87 }
88 
93  Pose const & pose)
94 {
95  angle( tag->getOption< core::Real >( "angle" ) );
96  resnum( core::pose::parse_resnum( tag->getOption< std::string >( "resnum" ), pose ) );
97  chinum( tag->getOption< core::Size >( "chinum" ) );
98 
99 }
100 
101 
102 } // sidechain_moves
103 } // simple_moves
104 } // protocols