Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UniformPolicy.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/nonlocal/UniformPolicy.cc
11 /// @author Christopher Miles (cmiles@uw.edu)
12 
13 // Unit header
15 
16 // C/C++ headers
17 #include <cassert>
18 
19 // Utility headers
20 #include <numeric/random/random.hh>
21 
22 // Project headers
23 #include <core/types.hh>
24 #include <core/fragment/FragSet.hh>
25 #include <core/fragment/Frame.hh>
26 #include <core/pose/Pose.fwd.hh>
27 
28 #include <utility/vector1.hh>
29 
30 
31 namespace protocols {
32 namespace nonlocal {
33 
34 static numeric::random::RandomGenerator RG(330);
35 
37  : Policy(fragments) {}
38 
40  const core::pose::Pose&) {
41  assert(frame.nr_frags() > 0);
42  return RG.random_range(1, frame.nr_frags());
43 }
44 
45 } // namespace nonlocal
46 } // namespace protocols