Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RepulsiveOnlyMover.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 src/protocols/simple_moves/RepulsiveOnlyMover.cc
11 /// @brief calculate repulsive energy only for certain residues
12 /// @author Will Sheffler
13 /// @author Ray Wang (wangyr@uw.edu)
14 
15 // Unit Headers
17 
18 // Package headers
19 
20 // Project headers
21 // AUTO-REMOVED #include <core/chemical/ChemicalManager.hh>
26 #include <core/pose/util.hh>
27 #include <core/pose/Pose.hh>
28 
29 // option key includes
30 #include <basic/options/option.hh>
31 #include <basic/options/keys/in.OptionKeys.gen.hh>
32 
33 // tracer
34 #include <basic/Tracer.hh>
35 
36 // Utility Headers
37 
38 // C++ Headers
39 #include <iostream>
40 
41 #include <utility/vector1.hh>
42 
43 
44 // ObjexxFCL Headers
45 
46 namespace protocols {
47 namespace simple_moves {
48 
49 static basic::Tracer TR( "protocol.mover.RepulsiveOnlyMover" );
50 
51 
52 /// RepulsiveOnlyMover; based on the protocols::moves::Mover basis class
53 RepulsiveOnlyMover::RepulsiveOnlyMover() : protocols::moves::Mover(), mutate_to_glycine_( true ) {}
55 
56 
57 // @brief apply function here
58 void
60  if ( basic::options::option[basic::options::OptionKeys::in::replonly_loops]() ){
61  for ( core::Size i=1; i<=pose.n_residue(); i++ ){
62  if ( pose.secstruct(i)=='L' ){
66  core::pose::add_variant_type_to_pose_residue( pose, "REPLONLY", i );
67  }
68  }else {
71  }
72  }
73  }
74  }
75  if ( basic::options::option[ basic::options::OptionKeys::in::replonly_residues ].user() ){
76  utility::vector1<Size> replonly_rsd = basic::options::option[ basic::options::OptionKeys::in::replonly_residues ]();
77  //TR << "RepulsiveOnly protocols::moves::Mover has been called" << std::endl;
78  for ( core::Size i=1; i<=replonly_rsd.size(); i++ ){
79  if ( mutate_to_glycine_ ) {
80  core::chemical::ResidueType const & gly( pose.residue(replonly_rsd[i]).residue_type_set().name_map("GLY") );
82  TR << replonly_rsd[i] << " has been changed as GLY" << std::endl;
83  }
84  if ( ! pose.residue( replonly_rsd[i] ).has_variant_type( core::chemical::REPLONLY ) ){
87  core::pose::add_variant_type_to_pose_residue( pose, "REPLONLY", replonly_rsd[i] );
88  }
89  }
90  }
91 }
92 
95  return "RepulsiveOnlyMover";
96 }
97 
98 
99 } // moves
100 } // protocols
101