Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
protocols
nonlocal
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
14
#include <
protocols/nonlocal/UniformPolicy.hh
>
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
36
UniformPolicy::UniformPolicy
(
core::fragment::FragSetCOP
fragments)
37
:
Policy
(fragments) {}
38
39
core::Size
UniformPolicy::choose
(
const
core::fragment::Frame
& frame,
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
Generated on Sat Jun 1 2013 12:01:47 for Rosetta 3.5 by
1.8.4