Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FoldandDockClaimer.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 // This file is part of the Rosetta software suite and is made available under license.
5 // The Rosetta software is developed by the contributing members of the Rosetta Commons consortium.
6 // (C) 199x-2009 Rosetta Commons participating institutions and developers.
7 // For more information, see http://www.rosettacommons.org/.
8 
9 /// @file FoldandDockClaimer
10 /// @brief Fold-and-dock
11 /// @author Ingemar Andre
12 
13 // Unit Headers
19 // AUTO-REMOVED #include <core/conformation/symmetry/SymmetricConformation.hh>
20 
21 // Package Headers
24 #include <basic/Tracer.hh>
25 
26 // Utility header
28 // AUTO-REMOVED #include <core/conformation/symmetry/util.hh>
29 
30 #include <numeric/random/random.hh>
31 
32 #include <basic/options/option.hh>
33 #include <basic/options/keys/fold_and_dock.OptionKeys.gen.hh>
34 
35 
39 #include <utility/vector0.hh>
40 #include <utility/vector1.hh>
41 
42 //Auto Headers
44 
45 // Project Headers
46 
47 static basic::Tracer tr("protocols.topo_broker.fold_and_dock",basic::t_info);
48 static numeric::random::RandomGenerator RG(24278234);
49 
50 namespace protocols {
51 namespace topology_broker {
52 
53 using namespace core;
54 
55 
57 
59  input_pose_(input_pose)
60 {}
61 
62  //clone
65  return new FoldandDockClaimer( *this );
66 }
67 
68 ///@brief type() is specifying the output name of the TopologyClaimer
71  return _static_type_name();
72 }
73 
76  return "FoldandDockClaimer";
77 }
78 
79 void
81  moves::RandomMover& random_mover,
82  core::pose::Pose const& /*pose*/,
83  abinitio::StageID stageID, /*abinitio sampler stage */
84  core::scoring::ScoreFunction const& scorefxn,
85  core::Real /*progress progress within stage */
86 )
87 {
88  using namespace basic::options;
89 
91  moves::MoverOP rb_trial_mover = (stageID==abinitio::STAGE_4) ?
92  new symmetric_docking::SymFoldandDockRbTrialMover( &scorefxn, true ) :
93  new symmetric_docking::SymFoldandDockRbTrialMover( &scorefxn ); // smooth RB moves in stage 4
95  core::Real move_anchor_weight(option[ OptionKeys::fold_and_dock::move_anchor_frequency ]()),
96  rb_weight(option[ OptionKeys::fold_and_dock::rigid_body_frequency ]()),
97  slide_weight(option[ OptionKeys::fold_and_dock::slide_contact_frequency ]());
98 
99  if (move_anchor_weight > 0) random_mover.add_mover( move_anchor_mover, move_anchor_weight );
100  random_mover.add_mover( rb_trial_mover, rb_weight );
101  random_mover.add_mover( slide_mover, slide_weight );
102 }
103 
105  core::pose::Pose& pose,
106  DofClaims const& init_dofs,
107  DofClaims& /*failed_to_init*/ ) {
108 
109  using namespace core::conformation::symmetry;
110 
111  // Setup symmetry if we have nit already done it
112  // slide chains into contact
115  setup_mover->slide_into_contact(true);
116  if ( !core::pose::symmetry::is_symmetric( pose ) ) {
117  setup_mover->apply( pose ); // calls SymDockingInitialPerturbation
118  assert( core::pose::symmetry::is_symmetric( pose ) );
119  // Save the pose into input pose
120  input_pose_ = pose;
121  } else {
122  input_pose_ = pose;
123  // Randomize the rigid body
124  protocols::simple_moves::symmetry::SymDockingInitialPerturbation initial( true /*slide into contact*/ );
125  initial.apply( pose );
126  }
127 
128  // Setup the movemap
129  //SymmetricConformation & symm_conf (dynamic_cast<SymmetricConformation & > ( pose.conformation()) );
131  movemap->set_bb( true );
132  movemap->set_jump( false );
134 
135  for ( DofClaims::const_iterator it = init_dofs.begin(), eit = init_dofs.end();
136  it != eit; ++it ) {
137  if ( (*it)->owner()==this ) {
138  (*it)->toggle( *movemap, true );
139  }
140  }
141 }
142 
144  // Set all cuts to real cuts. We don't want to close any of them...
146  for ( Size i = 1; i <= cuts.size(); ++i ) {
147  new_claims.push_back( new CutClaim( this, cuts[i], DofClaim::INIT /* for now... eventually CAN_INIT ? */ ) );
148  }
149 }
150 
151 
152 
153 } //topology_broker
154 } //protocols