Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
KinematicControl.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 KinematicControl.cc
11 /// @brief
12 /// @detailed
13 /// @author Oliver Lange
14 ///
15 
16 
17 // Unit Headers
19 
20 // Package Headers
21 // AUTO-REMOVED #include <protocols/jumping/JumpSetup.hh>
22 
23 // Project Headers
25 #include <core/pose/Pose.hh>
26 
27 // AUTO-REMOVED #include <core/fragment/OrderedFragSet.hh>
28 // AUTO-REMOVED #include <core/fragment/FragSetCollection.hh>
29 
32 
33 
34 
36 
39 // AUTO-REMOVED #include <protocols/jumping/PairingLibrary.hh>
40 
41 
42 // ObjexxFCL Headers
43 // AUTO-REMOVED #include <ObjexxFCL/string.functions.hh>
44 #include <ObjexxFCL/FArray1D.hh>
45 #include <ObjexxFCL/FArray2D.hh>
46 
47 // Utility headers
48 // AUTO-REMOVED #include <numeric/random/random.hh>
49 // AUTO-REMOVED #include <utility/io/izstream.hh>
50 // AUTO-REMOVED #include <utility/io/ozstream.hh>
51 
52 #include <basic/Tracer.hh>
53 // AUTO-REMOVED #include <basic/options/option.hh>
54 // AUTO-REMOVED #include <basic/options/keys/OptionKeys.hh>
55 
56 
57 //// C++ headers
58 // AUTO-REMOVED #include <fstream>
59 
60 //Auto Headers
62 #include <core/pose/util.hh>
63 #include <utility/vector1.hh>
64 
65 
66 static basic::Tracer tr("protocols.abinitio",basic::t_info);
67 
68 namespace protocols {
69 namespace abinitio {
70 
71 using namespace core;
72 
74  pose.fold_tree( sampling_fold_tree() );
75  if ( jump_mover() ) jump_mover()->apply_at_all_positions( pose ); //make sure each jump is initialized
76  jumping::safe_secstruct( pose ); //make sure that secstruct is valid (in the sense of FragmentMover::valid_ss)
77  return true;
78 }
79 
80 //@brief find all cutpoints that are only present in the "sampling" fold-tree.
81 void
83  kinematics::FoldTree const& sampling,
84  kinematics::FoldTree const& final,
85  utility::vector1< Size >& sample_cuts )
86 {
87  sample_cuts.clear();
88  for ( Size i = 1; i <= (Size) sampling.num_cutpoint(); i++ ) {
89  if ( !final.is_cutpoint( sampling.cutpoint( i ) ) ) sample_cuts.push_back( sampling.cutpoint( i ));
90  }
91 }
92 
93 void
95  utility::vector1< Size > sample_cuts;
96  find_sampling_cuts( pose.fold_tree(), final_fold_tree(), sample_cuts );
97  for ( utility::vector1< Size >::const_iterator it = sample_cuts.begin(), eit = sample_cuts.end();
98  it != eit; ++ it ) {
101  }
102 }
103 
104 void
106  //remove_chainbreaks( pose ); not necessary if max_dist is monotonoically increaseing
107  utility::vector1< Size > sample_cuts;
108  find_sampling_cuts( pose.fold_tree(), final_fold_tree(), sample_cuts );
109  for ( utility::vector1< Size >::const_iterator it = sample_cuts.begin(), eit = sample_cuts.end();
110  it != eit; ++ it ) {
111  if ( sp.dist( *it, *it+1 ) <= max_dist ) {
112  tr.Debug << "add chainbreak variant to residues " << *it << " and " << *it+1 << std::endl;
115  }
116  }
117 }
118 
121 
123  movemap_ = mm;
124  if ( jump_mover_ ) jump_mover_->set_movemap( movemap_ptr() );
125 }
126 
128  strict_movemap_ = mm;
129 }
130 
133  return movemap_;
134 }
135 
138  return *movemap_;
139 }
140 
141 //return a jump-Mover for jumps that you want to be sampled
144  return jump_mover_;
145 }
146 
147 //return a jump-Mover for jumps that you want to be sampled
148 void
150  jump_mover_ = jm;
151  if ( jump_mover_ && movemap_ ) jump_mover_->set_movemap( movemap_ );
152 }
153 
154 
156  scorefxn.set_weight( scoring::coordinate_constraint, ramp_ ? progress*final_weight_ : final_weight_ );
157 }
158 
159 }
160 }