Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SaneMinMover.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 SaneMinMover.cc
11 /// @brief
12 /// @author James Thompson
13 
16 
23 #include <core/pose/Pose.fwd.hh>
24 #include <basic/prof.hh>
25 // AUTO-REMOVED #include <utility/string_util.hh>
26 
27 #include <utility/vector1.hh>
28 #include <basic/Tracer.hh>
29 
30 
31 namespace protocols {
32 namespace simple_moves {
33 
34 static basic::Tracer TR("protocols.simple_moves.SaneMinMover");
35 
39 }
40 
43  return new SaneMinMover;
44 }
45 
48  return "SaneMinMover";
49 }
50 
51 // default constructor
52 SaneMinMover::SaneMinMover() : protocols::moves::Mover("SaneMinMover") {
53  set_defaults_();
54 }
55 
57 protocols::moves::Mover(name) {
58  set_defaults_();
59 }
60 
62 
63 // constructor with arguments
65  core::kinematics::MoveMapOP movemap_in,
68  bool cartesian_in
69 ) : protocols::moves::Mover("SaneMinMover"),
70  cartesian_(cartesian_in),
71  movemap_(movemap_in),
72  scorefxn_(scorefxn_in),
73  min_options_(min_options_in)
74 {}
75 
77  return cartesian_;
78 }
79 
81  return movemap_;
82 }
83 
85  return scorefxn_;
86 }
87 
89  return min_options_;
90 }
91 
92 void
94  using namespace core::optimization;
95 
96  PROF_START( basic::MINMOVER_APPLY );
97  (*scorefxn_)(pose);
98  if (cartesian()) {
99  CartesianMinimizer minimizer;
100  minimizer.run( pose, *movemap_, *scorefxn_, *min_options_ );
101  } else {
102  AtomTreeMinimizer minimizer;
103  minimizer.run( pose, *movemap_, *scorefxn_, *min_options_ );
104  }
105  PROF_STOP( basic::MINMOVER_APPLY );
106 
107  scorefxn_->show(TR, pose);
108  TR.flush();
109 }
110 
114 }
115 
117 
119  cartesian_ = false;
122  min_options_ = new core::optimization::MinimizerOptions( "dfpmin", 1e-2, true, false, false );
123 }
124 
125 } // moves
126 } // protocols