Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CompleteConnectionsFilter.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/protein_interface_design/ligand_docking/CompleteConnectionsFilter.cc
11 /// @brief Find packing defects at an interface using packstat score terms
12 /// @author Jacob Corn (jecorn@u.washington.edu)
13 
14 // Unit headers
17 
18 
20 // Project Headers
21 #include <core/types.hh>
22 #include <core/pose/Pose.hh>
24 #include <utility/tag/Tag.hh>
25 #include <protocols/moves/Mover.fwd.hh> //Movers_map
26 // AUTO-REMOVED #include <core/pose/PDBInfo.hh>
27 #include <core/pose/util.hh>
28 #include <utility/exit.hh>
29 
30 #include <basic/Tracer.hh>
31 #include <utility/vector0.hh>
32 #include <utility/excn/Exceptions.hh>
33 #include <utility/vector1.hh>
34 
35 
36 namespace protocols {
37 namespace ligand_docking {
38 
39 static basic::Tracer complete_connections_tracer( "protocols.ligand_docking.CompleteConnectionsFilter" );
40 
41 bool
43 
45  core::Size start = pose.conformation().chain_begin(chain_id);
46  core::Size const end = pose.conformation().chain_end(chain_id);
47 
48  for(;start <= end; ++start){
49  core::conformation::Residue const & res= pose.residue(start);
51  if(res.has_incomplete_connection()){
52  complete_connections_tracer<<" has incomplete connection"<< std::endl;
53  return true;
54  }
55  complete_connections_tracer<<" completely connected"<< std::endl;
56  }
57  complete_connections_tracer<< "no more connections"<< std::endl;
58  return false;
59 }
60 
61 void
63 {
64 
65  if ( tag->getName() != "CompleteConnections" ) {
66  complete_connections_tracer << " received incompatible Tag " << tag << std::endl;
67  assert(false);
68  return;
69  }
70  if ( ! tag->hasOption("chain") ){
71  throw utility::excn::EXCN_RosettaScriptsOption("CompleteConnections filter needs a 'chain' option");
72  }
73  chain_ = tag->getOption<std::string>("chain");
74 }
75 
78 
80 CompleteConnectionsFilterCreator::keyname() const { return "CompleteConnections"; }
81 
82 
83 
84 } // ligand_docking
85 } // protocols