Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LoopBuild.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 /// @brief demo program for implementing loop relax + FA relax
11 /// @author Srivatsan Raman
12 /// @author James Thompson
13 /// @author Mike Tyka
14 /// @author Daniel J. Mandell
15 
16 //unit headers
19 
20 // basic headers
21 #include <basic/options/keys/edensity.OptionKeys.gen.hh>
22 #include <basic/options/keys/in.OptionKeys.gen.hh>
23 #include <basic/options/keys/loops.OptionKeys.gen.hh>
24 #include <basic/options/keys/out.OptionKeys.gen.hh>
25 #include <basic/options/option.hh>
26 
27 #include <basic/Tracer.hh>
28 
29 
31 #include <core/fragment/FragSet.hh>
33 #include <core/io/pdb/pose_io.hh>
34 #include <core/types.hh>
35 #include <core/kinematics/Jump.hh>
36 #include <core/pose/Pose.hh>
37 #include <core/pose/util.hh>
40 
48 #include <protocols/loops/util.hh>
49 #include <protocols/loops/Loops.hh>
53 
56 
57 #include <utility/vector1.hh>
58 #include <utility/exit.hh>
59 
60 #include <numeric/random/random.hh>
61 
62 #if defined(WIN32) || defined(__CYGWIN__)
63  #include <ctime>
64 #endif
65 
66 using basic::T;
67 using basic::Error;
68 using basic::Warning;
69 
70 namespace protocols {
71 namespace loop_build {
72 
73 int
74 LoopBuild_main( bool ) {
75  basic::Tracer TR("protocols.loop_build.LoopBuild");
76 
77  using namespace basic::options;
78  using namespace basic::options::OptionKeys;
79  using namespace core::scoring;
80  using namespace core::scoring::constraints;
81  using namespace core::chemical;
82  using namespace core::id;
83  using namespace jobdist;
84 
85  //using namespace basic::resource_manager;
86 
87  std::string remodel ( option[ OptionKeys::loops::remodel ]() );
88  std::string const intermedrelax( option[ OptionKeys::loops::intermedrelax ]() );
89  std::string const refine ( option[ OptionKeys::loops::refine ]() );
90  std::string const relax ( option[ OptionKeys::loops::relax ]() );
91  //bool const keep_time ( option[ OptionKeys::loops::timer ]() );
92 
93  TR << "==== Loop protocol: ================================================="
94  << std::endl;
95  TR << " remodel " << remodel << std::endl;
96  TR << " intermedrelax " << intermedrelax << std::endl;
97  TR << " refine " << refine << std::endl;
98  TR << " relax " << relax << std::endl;
99 
100 
101  // fragment initialization
102  // is there any way to clean this up? This logic is very convoluted.
104  if ( remodel == "perturb_ccd" || remodel == "quick_ccd" ||
105  remodel == "quick_ccd_moves" || remodel == "old_loop_relax" ||
106  remodel == "sdwindow" ||
107  option[ OptionKeys::loops::build_initial ].value() ||
108  ( option[ OptionKeys::loops::frag_files ].user()
109  && (refine == "refine_ccd" || intermedrelax != "no" || relax != "no")
110  )
111  ) {
112  // these protocols optionally take a fragment set .. only load if
113  // specified
114  loops::read_loop_fragments( frag_libs );
115  }
116 
117  //setup of looprelax_mover
118  comparative_modeling::LoopRelaxMover looprelax_mover;
119  looprelax_mover.frag_libs( frag_libs );
120  looprelax_mover.relax( relax );
121  looprelax_mover.refine( refine );
122  looprelax_mover.remodel( remodel );
123  looprelax_mover.intermedrelax( intermedrelax );
124 
125  LoopBuildMoverOP loopbuild_mover = new protocols::loop_build::LoopBuildMover(looprelax_mover);
126 
127 
129 
130  return 0;
131 } // Looprelax_main
132 
133 } // namespace loop_build
134 } // namespace protocols