Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RepeatMover.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/moves/RepeatMover.cc
11 /// @brief
12 /// @author
13 
14 // Unit Headers
16 
17 #include <utility/vector1.hh>
18 #include <basic/Tracer.hh>
19 
20 
21 // Package headers
22 
23 // Project headers
24 
25 // tracer
26 
27 // C++ Headers
28 
29 // ObjexxFCL Headers
30 
31 namespace protocols {
32 namespace moves {
33 
34 using namespace core;
35 
36 /// RepeatMover
37 RepeatMover::RepeatMover() : Mover(), nmoves_(1) {}
38 
40  MoverOP mover_in,
41  int nmoves_in
42 ) : Mover("RepeatMover"),
43  mover_(mover_in),
44  nmoves_(nmoves_in)
45 {}
46 
48 
49 void
51  for ( int i=1; i<=nmoves_; ++i ) {
52 // T("protocols.moves.RepeatMover") << "Move: " << i << "/" << nmoves_ << std::endl;
53  mover_->apply( pose );
54  }
55 }
56 
59  return "RepeatMover";
60 }
61 
64  if ( mover_ != 0 ) {
65  return nmoves_;
66  }
67  else { return 0; }
68 }
69 
72  if ( mover_ != 0 ) {
73  return mover_->get_name();
74  }
75  else { return "none";}
76 }
77 
78 std::ostream &operator<< (std::ostream &os, RepeatMover const &mover)
79 {
80 
81  os << "Mover name: " << mover.get_name() << ", Mover type: " << mover.get_type() << ", Mover current tag: " << mover.get_current_tag() << "\n" <<
82  "Mover being repeated: " << mover.get_mover() << ", nmoves: " << mover.get_nmoves() << "\n";
83  return os;
84 }
85 
86 } // moves
87 } // protocols
88