Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CartesianSampler.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
11 /// @brief
12 /// @author Yifan Song
13 /// @author Frank DiMaio
14 
15 
16 #ifndef INCLUDED_protocols_hybridization_CartesianSampler_hh
17 #define INCLUDED_protocols_hybridization_CartesianSampler_hh
18 
21 
22 #include <core/id/AtomID.hh>
23 #include <core/id/AtomID_Map.hh>
26 #include <core/fragment/FragSet.hh>
27 
29 
30 #include <protocols/loops/Loop.hh>
31 #include <protocols/loops/Loops.hh>
32 
33 #include <protocols/moves/Mover.hh>
34 
35 #include <ObjexxFCL/format.hh>
36 #include <numeric/random/random.hh>
37 #include <numeric/xyz.functions.hh>
38 #include <numeric/model_quality/rms.hh>
39 #include <numeric/model_quality/maxsub.hh>
40 #include <numeric/random/WeightedSampler.hh>
41 
42 #include <basic/options/option.hh>
43 #include <basic/options/keys/OptionKeys.hh>
44 #include <basic/options/keys/in.OptionKeys.gen.hh>
45 #include <basic/Tracer.hh>
46 
47 #include <boost/unordered/unordered_map.hpp>
48 
49 namespace protocols {
50 //namespace comparative_modeling {
51 namespace hybridization {
52 
53 using namespace core;
54 using namespace protocols::moves;
55 using namespace protocols::loops;
56 
58 public:
61 
62  // initialize options to defaults
63  void init();
64 
65  // run the protocol
66  void apply(core::pose::Pose & pose);
67 
68  // set the centroid scorefunction
69  void set_scorefunction(core::scoring::ScoreFunctionOP scorefxn_in) { scorefxn_=scorefxn_in; }
70 
71  // set options
72  void set_ncycles(core::Size ncycles_in) { ncycles_=ncycles_in; }
73  void set_overlap(core::Size overlap_in) { overlap_=overlap_in; }
74 
75  std::string get_name() const { return "CartesianSampler"; }
76 
77  void parse_my_tag(
78  utility::tag::TagPtr const tag,
79  moves::DataMap & data,
80  filters::Filters_map const & ,
81  moves::Movers_map const & ,
82  core::pose::Pose const & pose );
83 
84  virtual protocols::moves::MoverOP clone() const;
85  virtual protocols::moves::MoverOP fresh_instance() const;
86 
87 protected:
88  // apply a sequence fragment
89  void apply_frame( core::pose::Pose & pose, core::fragment::Frame &frame );
90 
91  //
92  void compute_fragment_bias( core::pose::Pose & pose );
93 
94  void update_fragment_library_pointers( );
95 
96 private:
97  // parameters
98  core::Size ncycles_, overlap_;
99 
100  // fragments
103 
104  // fragment bias
107  std::set<core::Size> user_pos_;
108 
109  // scorefunctions
111 }; //class CartesianSampler
112 
113 } // hybridize
114 //} // comparative_modeling
115 } // protocols
116 
117 #endif