Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RepackMinimize.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/protein_interface_design/movers/RepackMinimize.cc
11 /// @brief
12 /// @author Sarel Fleishman (sarelf@u.washington.edu), Jacob Corn (jecorn@u.washington.edu)
13 
14 // Unit headers
17 
18 // Package headers
21 
22 // Project headers
27 #include <core/pose/Pose.hh>
28 #include <basic/Tracer.hh>
29 #include <utility/tag/Tag.hh>
30 
31 #include <utility/vector0.hh>
32 #include <utility/vector1.hh>
33 
34 //Auto Headers
36 
37 
38 
39 namespace protocols {
40 namespace protein_interface_design {
41 namespace movers {
42 
43 using namespace core;
44 using namespace std;
45 using namespace core::scoring;
46 using namespace protocols::moves;
47 
48 static basic::Tracer TR( "protocols.protein_interface_design.movers.RepackMinimize" );
49 
52 {
54 }
55 
58  return new RepackMinimize;
59 }
60 
63 {
64  return "RepackMinimize";
65 }
66 
69  return( protocols::moves::MoverOP( new RepackMinimize( *this ) ) );
70 }
71 
73  simple_moves::DesignRepackMover( RepackMinimizeCreator::mover_name() )
74 {
76  optimize_foldtree_ = true;
78 }
79 
81  ScoreFunctionCOP scorefxn_repack,
82  ScoreFunctionCOP scorefxn_minimize,
83  utility::vector1< core::Size > const target_residues,
84  bool const repack_partner1/*=false*/,
85  bool const repack_partner2/*=true*/,
86  core::Real const interface_distance_cutoff/*=8.0*/,
87  bool const repack_non_ala/*=true*/
88 ) :
89  simple_moves::DesignRepackMover( RepackMinimizeCreator::mover_name() )
90 {
91  repack_partner2_ = repack_partner2;
92  repack_partner1_ = repack_partner1;
93  target_residues_ = target_residues;
94  interface_distance_cutoff_ = interface_distance_cutoff;
95  if (symmetry_ ) {
96  if( scorefxn_repack ) scorefxn_repack_ = new core::scoring::symmetry::SymmetricScoreFunction( *scorefxn_repack );
97  if( scorefxn_minimize ) scorefxn_minimize_ = new core::scoring::symmetry::SymmetricScoreFunction( *scorefxn_minimize );
98  } else {
99  if( scorefxn_repack ) scorefxn_repack_ = new core::scoring::ScoreFunction( *scorefxn_repack );
100  if( scorefxn_minimize ) scorefxn_minimize_ = new ScoreFunction( *scorefxn_minimize );
101  }
102  repack_non_ala_ = repack_non_ala;
103 }
104 
106 
107 /// @details designs interface residues and minimizes the pose.
108 /// If minimization parameters have not been set by the user the default minimization behaviour is as follows:
109 /// + minimize bb/sc for all residues that are repacked.
110 /// + minimize bb/sc of residues that are +-1 from target residues
111 /// + minimize bb for all residues (minimizing over only interface residues causes large motions during minimization)
112 /// + minimize rb jump
113 /// Note that some confusion may arise from the use of repack1_ and repack2_
114 /// The behaviour of these variables is such that if they're false, then the
115 /// relevant partner is not designed but may be repacked. Turning off design_
116 /// precludes design across the whole system only allowing repack. At one point
117 /// the names should be rethought...
118 void
120 {
121  allowed_aas_[ chemical::aa_cys ] = false;
122  allowed_aas_[ chemical::aa_gly ] = false;
123  allowed_aas_[ chemical::aa_pro ] = false;
124 
125 if ( symmetry_ ) {
127  setup_mover->apply( pose );
128  }
129 
130  setup_packer_and_movemap( pose );
131  using namespace core::scoring;
132 
133  if ( symmetry_ ) {
135  SymMinimizeInterface( pose, scorefxn_minimize_, curr_min_bb_, curr_min_sc_, curr_min_rb_); //, optimize_foldtree_, target_residues_ );
136  } else {
139  }
141  (*scorefxn_minimize_)( pose );
142 }
143 
147 }
148 
149 
150 void
151 RepackMinimize::parse_my_tag( TagPtr const tag, DataMap & data, protocols::filters::Filters_map const &filters, Movers_map const & movers, core::pose::Pose const & pose )
152 {
153  TR<<"repack minimize mover with the following parameters:"<<std::endl;
154  simple_moves::DesignRepackMover::parse_my_tag( tag, data, filters, movers, pose );
155 }
156 
157 } //movers
158 } //protein_interface_design
159 } //protocols