Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PlaceSimultaneouslyMover.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/protein_interface_design/movers/PlaceStubMover.hh
11 /// @brief definition of classes for grafting hotspots into a pose
12 /// @author Sarel Fleishman (sarelf@u.washington.edu)
13 
14 #ifndef INCLUDED_protocols_protein_interface_design_movers_PlaceSimultaneouslyMover_hh
15 #define INCLUDED_protocols_protein_interface_design_movers_PlaceSimultaneouslyMover_hh
16 
17 // Project Headers
18 #include <core/pose/Pose.hh>
19 #include <core/types.hh>
20 #include <utility/tag/Tag.fwd.hh>
23 // AUTO-REMOVED #include <core/scoring/constraints/Constraint.hh>
25 
26 // C++ headers
27 
28 // Unit headers
35 
36 #include <utility/vector1.hh>
37 
38 //Auto Headers
40 
41 
42 
43 namespace protocols {
44 namespace protein_interface_design {
45 namespace movers {
46 
47 /// @brief choose a stub based on mc sampling, and place it on the pose.
48 /// Iterates over stubs until one matches criteria.
50 {
51 public:
52  typedef std::pair< protocols::hotspot_hashing::HotspotStubSetOP, std::pair< protocols::hotspot_hashing::HotspotStubOP, core::Size > > StubSetStubPos;
53  typedef std::pair< protocols::simple_moves::DesignRepackMoverOP, core::Real > MoverRealPair;
54 public:
55  // used to define pairs of design/repack movers with an associated bool that
56  // determines whether to use the stub-based foldtree with cuts etc., or to
57  // use the default foldtree
58  typedef std::pair< simple_moves::DesignRepackMoverOP, bool > DesignMoverFoldTreePair;
59  typedef std::pair< simple_moves::DesignRepackMoverOP, core::Real > DesignMoverRealPair;
60  /// ResidueAuction is keyed by energy => we select the residue,stub,stubset combination with the best energy for each stubset,stub combination
61  typedef std::pair< protocols::hotspot_hashing::HotspotStubSetOP, protocols::hotspot_hashing::HotspotStubOP > StubsetStubPair;
62  typedef std::pair< core::Real, std::pair< core::Size, StubsetStubPair > > ResidueAuctionItem;
63  typedef std::multimap< core::Real, std::pair< core::Size, StubsetStubPair > > ResidueAuction;
64 public:
69  }
70 
71  virtual void apply( core::pose::Pose & pose );
72  virtual std::string get_name() const;
73  /// @brief minimize towards clouds of stubs made up of all the stub sets
74  /// @brief if bb_cst score is 0 return false, o/w true
75  bool minimize_no_bb( core::pose::Pose & pose ) const;
76  /// @brief minimize simultaneously towards the placed stubs from each of the stub sets
77  /// returns false if one of the filters fails
78  void minimize_all( core::pose::Pose & pose, core::Size const minimization_steps ) const;
79  /// @brief pair each stub set with a position on the scaffold
80  /// @brief if no mutually exclusive matches are found for all sets, return false
82 ///@brief conducts user-specified design movers. Returns true if the energy per residue filter passes for each of the placed hotspots
83  void design( core::pose::Pose & pose );
84  ///@brief will be removed
85  bool place_stubs( core::pose::Pose & pose ) const;
86  virtual void parse_my_tag( utility::tag::TagPtr const tag,
90  core::pose::Pose const & );
91  void final_cleanup( core::pose::Pose & pose );
92  ///@brief removes and reinstates coordinate constraints for all placed hotspots according to coord_sdev
93  void refresh_coordinate_constraints( core::pose::Pose & pose, core::Real const coord_sdev );
97  virtual ~PlaceSimultaneouslyMover();
98 
99 private:
100  ///where is the stub to be placed
102  core::pose::Pose saved_pose_;//used to restore the pose if placement fails
103  /// stub sets and placed positions
106  std::map< protocols::hotspot_hashing::HotspotStubSetOP, protocols::filters::FilterOP > stub_set_filters_;
107 
108  /// the maximum distance for a stub to be considered a a neighbour to a host residue
110  /// Maximum per-residue energy the placed stub can have to be saved
113  core::Size minimization_repeats_before_placement_;//how many times to repeat the minimization procedure after hs placement
114  core::Size minimization_repeats_after_placement_;//how many times to repeat the minimization procedure after hs placement
119  /// This task factory is used by placesimultaneously in two ways: 1) internally to create a packer task for
120  /// hotspot placement and user-defined design movers. 2) For design movers downstream of PlaceSimultaneously
121  /// so that they are aware of the choices made by PlaceSimultaneously. Note that item 1 is not implemented
122  /// in PlaceStub. This means that PlaceSimultaneously *always* uses the task factory, whereas PlaceStub only
123  /// uses it if the user specifies TaskAware design movers.
126  /// @brief does the pose have any active constraints?
129 // bool user_defined_auction_; // in which case, auction will not be called in PlaceSim
130 // bool user_defined_stub_score_filter_; // in which case, preliminary minimization will not be called in PlaceSim
131 // bool user_defined_bbstub_minimization_;
133 };
134 
135 } //movers
136 } //protein_interface_design
137 } //protocols
138 
139 #endif /*INCLUDED_protocols_protein_interface_design_movers_PlaceSimultaneously_HH*/
140