Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
relax_main.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 relax_protocols
11 /// @brief protocols that are specific to relax
12 /// @detailed
13 /// @author Mike Tyka, Monica Berrondo
14 /// @author Roland A. Pache
15 
16 
18 
19 #include <core/pose/Pose.hh>
20 // AUTO-REMOVED #include <core/io/pdb/pose_io.hh>
21 
22 // AUTO-REMOVED #include <basic/datacache/BasicDataCache.hh> //pba
23 // AUTO-REMOVED #include <core/pose/datacache/CacheableDataType.hh> //pba
24 
25 // AUTO-REMOVED #include <core/scoring/ScoreFunction.hh>
26 // AUTO-REMOVED #include <core/scoring/ScoreFunctionFactory.hh>
27 
29 // AUTO-REMOVED #include <core/scoring/electron_density/util.hh>
33 
34 
35 #include <basic/options/option.hh>
36 #include <basic/options/keys/relax.OptionKeys.gen.hh>
37 #include <basic/options/keys/edensity.OptionKeys.gen.hh>
38 #include <basic/options/keys/constraints.OptionKeys.gen.hh>
39 #include <basic/options/keys/symmetry.OptionKeys.gen.hh>
40 #include <basic/options/keys/in.OptionKeys.gen.hh>
41 
43 #include <protocols/jd2/util.hh>
44 
46 // AUTO-REMOVED #include <protocols/electron_density/util.hh>
47 
48 // ObjexxFCL Headers
49 #include <ObjexxFCL/string.functions.hh>
50 
51 #include <basic/Tracer.hh>
52 
55 #include <protocols/relax/util.hh>
56 #include <utility/vector0.hh>
57 #include <utility/vector1.hh>
58 
59 using basic::T;
60 using basic::Error;
61 using basic::Warning;
62 
63 static basic::Tracer tr("protocols.relax");
64 
65 using namespace core;
66 ////////////////////////////////////////////////////////////////////////////////////////////////////
67 
68 namespace protocols {
69 namespace relax {
70 ////////////////////////////////////////////////////////////////////////////////////////////////////
71 
72 int
73 Relax_main( bool ) {
74  using namespace protocols::jobdist;
75  using namespace basic::options;
76  using namespace basic::options::OptionKeys;
77 
80 
81  // add constraints from cmd line
82  if ( option[ OptionKeys::constraints::cst_fa_file ].user() || option[ OptionKeys::constraints::cst_file ].user()) {
85  if (option[ OptionKeys::constraints::cst_fa_file ].user()) {
86  loadCsts->constraint_file( core::scoring::constraints::get_cst_fa_file_option() );
87  } else {
88  loadCsts->constraint_file( core::scoring::constraints::get_cst_file_option() );
89  }
90  seqmov->add_mover( loadCsts );
91  seqmov->add_mover( protocol );
92  protocol = seqmov;
93  }
94 
95  // set pose for density scoring if a map was input
96  // (potentially) dock map into density
97  if ( option[ OptionKeys::edensity::mapfile ].user() ) {
100  seqmov->add_mover( protocol );
101  protocol = seqmov;
102  }
103 
104  // setup symmetry mover ... this should happen _before_ SetupForDensityScoringMover
105  // to avoid adding extra VRTs
106  if ( option[ OptionKeys::symmetry::symmetry_definition ].user() ) {
109  seqmov->add_mover( protocol );
110  protocol = seqmov;
111  }
112 
113  // superimpose input model to the native structure or to a supplied PDB file
114  if ( option[ OptionKeys::relax::superimpose_to_file ].user() ||
115  option[ OptionKeys::relax::superimpose_to_native ].user()
116  ) {
117  core::pose::Pose ref_pose;
118  std::string ref_filename;
119  if( option[ OptionKeys::relax::superimpose_to_file ].user() ) ref_filename = option[ basic::options::OptionKeys::relax::superimpose_to_file ]();
120  if( option[ OptionKeys::relax::superimpose_to_native ].user() ) ref_filename = option[ basic::options::OptionKeys::in::file::native ]();
121  core::import_pose::pose_from_pdb( ref_pose, ref_filename );
124  sm->set_reference_pose( ref_pose );
125  seqmov->add_mover( sm );
126  seqmov->add_mover( protocol );
127  protocol = seqmov;
128  }
129 
131 
132  return 0;
133 }
134 
135 
136 
137 }
138 }