Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DisulfideFilter.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 devel/protein_interface_design/filters/DisulfideFilter.hh
11 /// @brief Filters for interfaces which could form a disulfide bond between
12 /// docking partners.
13 /// @author Spencer Bliven <blivens@u.washington.edu>
14 /// @date Created 4/30/2009
17 
18 
19 // Project Headers
20 #include <core/types.hh>
21 
22 
23 //parsing
24 #include <utility/tag/Tag.hh>
26 #include <protocols/moves/Mover.fwd.hh> //Movers_map
28 #include <core/pose/selection.hh>
30 
31 // Utility Headers
32 
33 // Unit Headers
34 
35 // C++ headers
36 
38 #include <utility/vector0.hh>
39 #include <utility/vector1.hh>
40 #include <basic/Tracer.hh>
41 
42 namespace protocols {
43 namespace protein_interface_design {
44 namespace filters {
45 
46 using namespace core;
47 using namespace core::scoring;
48 using core::pose::Pose;
49 using namespace std;
50 using std::pair;
51 using utility::vector1;
52 using utility::vector1_int;
54 
55 static basic::Tracer TR( "protocols.protein_interface_design.filters.DisulfideFilter" );
56 
58 
59 ///@brief default ctor
61  parent( "DisulfideFilter" ),
62  targets_(),
63  rb_jump_(1)
64 {}
65 
66 ///@brief copy ctor
68  //utility::pointer::ReferenceCount(),
69  parent( "DisulfideFilter" ),
70  targets_(df.targets_),
71  rb_jump_(df.rb_jump_)
72 {}
73 
74 ///@brief Constructor with a single target residue
76  parent( "DisulfideFilter" ),
77  targets_(),
78  rb_jump_(1)
79 {
80  targets_.push_back(targetResidue);
81 }
82 
83 ///@brief Constructor with multiple target residues
85  parent( "DisulfideFilter" ),
86  targets_(targetResidues),
87  rb_jump_(1)
88 {}
89 
91 
92 /// @return Whether a disulfide bond is possible between any of the targets
93 bool DisulfideFilter::apply(Pose const & pose ) const
94 {
95  vector1< pair<Size,Size> > disulfides;
97  if( disulfides.empty() ) {
98  TR << "Failing."<<std::endl;
99  return false;
100  } else {
101  TR << "Passing."<<std::endl;
102  return true;
103  }
104 }
105 
106 void DisulfideFilter::report( ostream & out, Pose const & pose ) const
107 {
108  vector1< pair<Size,Size> > disulfides;
110 
111  out << disulfides.size() << " disulfides possible: ";
112  for( vector1< pair<Size,Size> >::const_iterator disulf = disulfides.begin(),
113  end_disulf = disulfides.end();
114  disulf != end_disulf; ++disulf)
115  {
116  out << disulf->first << '-' << disulf->second << ", ";
117  }
118  out << "\n";
119  }
120 /// @return The number of disulfides possible
121 Real DisulfideFilter::report_sm( Pose const & pose ) const
122 {
123  vector1< pair<Size,Size> > disulfides;
125 
126  return disulfides.size();
127 }
128 
129 /**
130  * @details Parameters recognized:
131  * - targets. A list of possible target residues, seperated by commas.
132  */
137  core::pose::Pose const & pose)
138 {
139 
140  // Set target to the residue specified by "target_pdb_num" or "target_res_num"
141  if( tag->hasOption("targets") ) {
142  targets_ = core::pose::get_resnum_list(tag, "targets",pose);
143  }
144 
145  TR.Info << "DisulfideFilter targeting residues ";
146  for(vector1<Size>::const_iterator target = targets_.begin();
147  target != targets_.end();++target)
148  {
149  TR.Info<<*target<<", ";
150  }
151  TR.Info<<std::endl;
152 }
153 
156 
158 DisulfideFilterCreator::keyname() const { return "DisulfideFilter"; }
159 
160 
161 } // filters
162 } // protein_interface_design
163 } // devel