Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TorsionBinPool.hh
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/frag_picker/quota/TorsionBinPool.hh
11 /// @brief a quota pool based on torsion bin prediction
12 /// @author Dominik Gront (dgront@chem.uw.edu.pl)
13 
14 #ifndef INCLUDED_protocols_frag_picker_quota_TorsionBinPool_hh
15 #define INCLUDED_protocols_frag_picker_quota_TorsionBinPool_hh
16 
17 #include <protocols/frag_picker/QuotaPool.hh>
18 
19 // package headers
22 
24 
25 // utility headers
26 #include <core/types.hh>
27 #include <utility/vector1.hh>
28 
29 // C++ headers
30 #include <string>
31 
32 namespace protocols {
33 namespace frag_picker {
34 namespace quota {
35 
36 /// @brief represents a single pool used by quota selector
37 class TorsionBinPool : public QuotaPool {
38 public:
39  /// @brief Creates a pool of a given size and name
40  /// @param size - how many fragments may fit into this pool
41  /// @param name - name assigned to this pool. This in general may be any string that
42  /// later allows one control pool's behavior from a flag file
44  Size size,
45  std::string pool_name,
47  ) :
48  QuotaPool(size,pool_name)
49  {
50  prediction_ = prediction;
51  }
52 
53  virtual ~TorsionBinPool();
54 
55  void show_availability(std::ostream &) const;
56 
57  /// @brief try to insert a given fragment candidate into this pool
58  bool try_fragment(ScoredCandidate & candidate);
59 
60  void restart(Size,Size);
61 
62 private:
67 
68  inline Size round(Real x) { return Size(x > 0.0 ? x + 0.5 : x - 0.5); }
69 };
70 
71 } // quota
72 } // frag_picker
73 } // protocols
74 
75 
76 #endif /* INCLUDED_protocols_frag_picker_quota_TorsionBinPool_HH */