Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SubroutineMover.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 sw=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 protocols/protein_interface_design/movers/SubroutineMover.cc
11 /// @brief
12 /// @author Sarel Fleishman (sarelf@u.washington.edu)
13 
14 // Unit headers
20 
21 // Project headers
22 #include <core/types.hh>
23 #include <core/pose/Pose.hh>
24 #include <utility/tag/Tag.hh>
25 
26 #include <protocols/moves/Mover.hh>
27 #include <basic/Tracer.hh>
28 
29 #include <protocols/jd2/Job.hh>
30 #include <utility/vector0.hh>
31 #include <utility/vector1.hh>
32 
33 
34 using namespace protocols::protein_interface_design;
35 
36 static basic::Tracer TR( "protocols.protein_interface_design.movers.SubroutineMover" );
37 
38 namespace protocols {
39 namespace protein_interface_design {
40 namespace movers {
41 
42 using namespace protocols::moves;
43 using namespace core;
44 
46 SubroutineMoverCreator::keyname() const
47 {
48  return SubroutineMoverCreator::mover_name();
49 }
50 
52 SubroutineMoverCreator::create_mover() const {
53  return new SubroutineMover;
54 }
55 
57 SubroutineMoverCreator::mover_name()
58 {
59  return "Subroutine";
60 }
61 
64  return( protocols::moves::MoverOP( new SubroutineMover( *this ) ) );
65 }
66 
67 
68 void
69 SubroutineMover::apply( core::pose::Pose & pose )
70 {
71  mover_->apply( pose );
72 }
73 
74 void
75 SubroutineMover::parse_my_tag( TagPtr const tag,
76  DataMap &,
78  Movers_map const &,
79  core::pose::Pose const & pose )
80 {
81  using namespace protocols::jd2;
82 
83  std::string const xml_fname( tag->getOption< std::string >( "xml_fname" ) );
84 
86  ParserOP ddparser = new DockDesignParser;
87  TR<<"Parsing a subroutine xml_file"<<std::endl;
88  TR<<"*************WARNING: AT THIS POINT, CONSTRAINTS ADDED TO THE POSE IN A SUBROUTINE WILL BE IGNORED***********"<<std::endl;
89  core::pose::Pose nonconst_pose( pose );
90  ddparser->generate_mover_from_pose( job, nonconst_pose, mover_, true /*new input*/, xml_fname );
91 }
92 
94 SubroutineMover::fresh_instance() const {
96 }
97 
98 SubroutineMover::~SubroutineMover(){}
99 
100 SubroutineMover::SubroutineMover() :
101  Mover( SubroutineMoverCreator::mover_name() ),
102  mover_( NULL )
103 {}
104 
108 }
109 
110 } //movers
111 } //protein_interface_design
112 } //protocols
113