Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DensityScoringClaimer.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 TopologyBroker
11 /// @brief top-class (Organizer) of the TopologyBroker mechanism
12 /// @detailed responsibilities:
13 /// @author Oliver Lange
14 
15 // Unit Headers
17 
18 // Package Headers
22 
23 // Project Headers
24 // AUTO-REMOVED #include <core/chemical/ChemicalManager.hh>
25 // AUTO-REMOVED
26 // AUTO-REMOVED #include <core/pose/Pose.hh>
27 // AUTO-REMOVED #include <core/pose/util.hh>
28 
29 // AUTO-REMOVED #include <protocols/jumping/ResiduePairJumpSetup.hh>
30 // AUTO-REMOVED #include <protocols/jumping/ResiduePairJump.hh>
31 // AUTO-REMOVED #include <protocols/jumping/JumpSetup.hh>
32 
33 // ObjexxFCL Headers
34 #include <ObjexxFCL/string.functions.hh>
35 
36 // Utility headers
37 // AUTO-REMOVED #include <core/sequence/util.hh>
38 
39 
40 #include <basic/Tracer.hh>
41 #include <utility/excn/Exceptions.hh>
42 //#include <basic/options/option.hh>
43 
44 //// C++ headers
45 // AUTO-REMOVED #include <fstream>
46 
48 #include <utility/vector1.hh>
49 
50 
51 // option key includes
52 
53 
54 static basic::Tracer tr("protocols.topo_broker",basic::t_info);
55 
56 namespace protocols {
57 namespace topology_broker {
58 
59 using namespace core;
61 {}
62 
64  SequenceClaimer::initialize_residues( pose, my_claim, failed_to_init );
65  resolved_anchor_residue_ = broker().resolve_residue( anchor_chain_, anchor_residue_ );
66 
67  vrt_id_ = my_claim->offset(); // now that we know it, set vrt id here
68  tr.Debug << "Setting vrt_id_ to " << vrt_id_ << std::endl;
69  tr.Debug << "Setting resolved_anchor_residue_ to " << resolved_anchor_residue_ << std::endl;
70 }
71 
73  new_claims.push_back( new RootClaim( this, vrt_id_, DofClaim::EXCLUSIVE ) );
74  new_claims.push_back( new JumpClaim( this, vrt_id_, resolved_anchor_residue_, "ORIG", "CA", DofClaim::EXCLUSIVE ) );
75  //new_claims.push_back( new JumpClaim( this, resolved_anchor_residue_, vrt_id_, "ORIG", "CA", DofClaim::EXCLUSIVE ) );
76 
77  // sequence claimer does not claim the cut automatically??
78  // ??? it should ....
79  //new_claims.push_back( new CutClaim( this, vrt_id_-1, DofClaim::EXCLUSIVE ) );
80 
82 }
83 
85  return new DensityScoringClaimer( *this );
86 }
87 
88 
90  // ??
91 }
92 
95  anchor_chain_ = ""; //usually anchored to DEFAULT chain
96  anchor_residue_ = 0;
97 }
98 
99 bool DensityScoringClaimer::read_tag( std::string tag, std::istream& is ) {
100  using namespace jumping;
101  if ( tag == "anchor" ) {
102  is >> anchor_residue_;
103  tr.Debug << "Read anchor res = " << anchor_residue_ << std::endl;
104  } else if ( SequenceClaimer::read_tag( tag, is ) ) {
105  //noop
106  } else return false;
107  return true;
108 }
109 
111  tr.Error << "JumpClaim of " << type() << " was declined: " << was_declined << std::endl;
112  return false; // full tolerance here ---
113 }
114 
115 
117  if ( !anchor_residue_ ) {
118  throw EXCN_Input( "need to specify anchor residue for DensityScoring" );
119  }
120 
121  set_label( ObjexxFCL::string_of( anchor_residue_ ) + anchor_chain_ );
122  if ( !anchor_chain_.size() ) anchor_chain_ = "main"; // ?????
123 
124  set_sequence( "X" );
125 }
126 
127 
128 
129 } //topology_broker
130 } //protocols