Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ConstraintFileRCG.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 protocols/forge/constraints/ConstraintFileRCG.cc
11 ///
12 /// @brief
13 /// @author Nobuyasu Koga( nobuyasu@uw.edu ) , October 2009
14 
15 // Unit header
18 
19 // Package headers
23 
24 // Project headers
25 #include <basic/options/option.hh>
26 #include <basic/Tracer.hh>
27 #include <utility/tag/Tag.hh>
28 #include <utility/vector1.hh>
29 
30 
31 static basic::Tracer tr( "protocols.forge.constraints.ConstraintFileRCG" );
32 
33 namespace protocols{
34 namespace forge{
35 namespace constraints{
36 
39 {
41 }
42 
45 {
46  return new ConstraintFileRCG();
47 }
48 
51 {
52  return "ConstraintFileCstGenerator";
53 }
54 
55 /// @brief
57  RemodelConstraintGenerator(),
58  filename_( "" )
59 {
60  /*using namespace basic::options;
61  using namespace basic::options::OptionKeys;
62  if( option[ constraints::cst_file ].user() ){
63  filename_ = option[ constraints::cst_file ].value().at( 1 );
64  }*/
65 }
66 
67 /// @brief
69  RemodelConstraintGenerator(),
70  filename_( filename )
71 {}
72 
73 /// @brief
75 
76 void
79  protocols::filters::Filters_map const & filters,
80  protocols::moves::Movers_map const & movers,
81  core::pose::Pose const & pose )
82 {
83  RemodelConstraintGenerator::parse_my_tag( tag, data, filters, movers, pose );
84  set_cstfile( tag->getOption< std::string >( "filename", filename_ ) );
85 }
86 
89 {
91 }
92 
95 {
96  return new ConstraintFileRCG();
97 }
98 
99 /// @brief
100 void
102 {
104 }
105 
106 /// @brief
107 void
109 {
110  using namespace core::scoring::constraints;
111  if ( filename_ == "" ) {
112  utility_exit_with_message( "ConstraintFileCstGenerator requires that a constraint filename be specified." );
113  }
115  this->add_constraints( constraints->get_all_constraints() );
116 } //generate constraints
117 
118 
119 } //namespace constraints
120 } //namespace forge
121 } //namespace protocols