Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CyclicMover.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/moves/CyclicMover.cc
11 /// @author Christopher Miles (cmiles@uw.edu)
12 
13 // Unit headers
15 
16 // C/C++ headers
17 #include <string>
18 #include <vector>
19 
20 // Project headers
21 // AUTO-REMOVED #include <core/pose/Pose.hh>
22 
23 // Package headers
24 #include <protocols/moves/Mover.hh>
25 
26 #include <utility/vector1.hh>
27 
28 
29 namespace protocols {
30 namespace moves {
31 
32 CyclicMover::CyclicMover() : iterations_(0) {}
33 
35  assert(mover());
36  movers_.push_back(mover);
37 }
38 
40  if (movers_.size() == 0) return;
41  MoverOP mover = movers_[iterations_++ % movers_.size()];
42  mover->apply(pose);
43 }
44 
46  return new CyclicMover(*this);
47 }
48 
50  return new CyclicMover();
51 }
52 
54  return "CyclicMover";
55 }
56 
57 } // namespace moves
58 } // namespace protocols