Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
util.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 relax_initialization_protocols
11 /// @brief initialization protocols for relax
12 /// @detailed
13 /// Contains currently: Classic Abinitio
14 ///
15 ///
16 /// @author Oliver Lange
17 
18 
19 // Unit Headers
20 
21 // Package Headers
25 //#include <protocols/canonical_sampling/mc_convergence_checks/Pool_ConvergenceCheck.hh>
26 
27 // Project Headers
30 #include <core/chemical/util.hh>
32 
34 #include <core/pose/Pose.hh>
35 // AUTO-REMOVED #include <core/io/pdb/pose_io.hh>
36 
39 
40 #include <core/sequence/util.hh>
43 
44 // ObjexxFCL Headers
45 #include <ObjexxFCL/string.functions.hh>
46 
47 // Utility headers
48 #include <utility/pointer/ReferenceCount.hh>
49 #include <utility/vector1.hh>
50 #include <utility/string_util.hh>
51 #include <utility/file/FileName.hh>
52 
53 #include <basic/options/option.hh>
54 #include <basic/Tracer.hh>
56 //// C++ headers
57 
58 // due to template function
60 
61 
62 // option key includes
63 #include <basic/options/option_macros.hh>
64 #include <basic/options/keys/evaluation.OptionKeys.gen.hh>
65 #include <basic/options/keys/abinitio.OptionKeys.gen.hh>
66 #include <basic/options/keys/in.OptionKeys.gen.hh>
67 // AUTO-REMOVED #include <basic/options/keys/run.OptionKeys.gen.hh>
68 
72 #include <utility/vector0.hh>
73 
74 #ifdef WIN32
76 #endif
77 
78 
79 static basic::Tracer tr("protocols.evalution");
80 
81 namespace protocols {
82 namespace evaluation {
83 using namespace core;
84 
85 static bool options_registered_=false;
86 
88  using namespace basic::options;
89  if ( options_registered_ ) return;
90  options_registered_ = true;
91  OPT( evaluation::rmsd );
92  OPT( evaluation::gdtmm );
93  OPT( evaluation::rdc );
94  OPT( evaluation::pool );
95  OPT( evaluation::constraints );
96  OPT( in::file::native );
97  OPT( evaluation::chemical_shifts );
98 }
99 
101 
102  exclude_list.clear();
103 
104  for ( Size ir = 1; ir <= nres; ++ir ) {
105  bool include_residue = false;
106  for ( Size ex = 1; ex <= include_list.size(); ex ++ ) {
107  if ( include_list[ex] == ir ) {
108  include_residue = true;
109  break;
110  }
111  }
112 
113  if ( !include_residue ) {
114  exclude_list.push_back( ir );
115  }
116  } // for ( Size ir = 1; ir <= native_pose.total_residue(); ++ir )
117 }
118 
119 //@detail find residues that don't have missing density
121  for ( Size pos = 1; pos <= pose->total_residue(); pos++ ) {
122  if ( pose->residue_type( pos ).is_protein() && pose->residue_type( pos ).has("CA") ) {
123  numeric::xyzVector< core::Real> ca_pos = pose->residue( pos ).atom("CA").xyz();
124  bool good ( true );
125  for ( Size j=1; j<= pose->residue( pos ).natoms(); ++j ) {
126  if ( ( ca_pos - pose->residue( pos ).atom(j).xyz() ).length() > 20 ) {
127  good = false;
128  }
129  }
130  if ( good ) selection.push_back( pos );
131  }
132  }
133  if ( tr.Trace.visible() ) {
134  tr.Trace << "selection of residues for rmsd of " << tag << std::endl;
135  for ( std::list< core::Size >::const_iterator it = selection.begin(), eit = selection.end();
136  it != eit; ++it ) {
137  tr.Trace << " " << *it;
138  }
139  tr.Trace << std::endl;
140  }
141 }
142 
143 void evaluate_pose( core::pose::Pose& pose, PoseEvaluator& eval, std::ostream& os ) {
144  // ProteinSilentStruct pss;
146  pss->fill_struct( pose, "eval" );
147  eval.apply( pose, "eval", *pss );
148  os << "\n";
149  pss->print_score_header( os );
150  os << "\n";
151  pss->print_scores( os );
152  os << std::endl;
153 }
154 
155 
156 
157 
158 }
159 }