Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ContactMapEvaluatorCreator.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/simple_filters/ContactMapEvaluatorCreator.hh
11 /// @brief Header for ContactMapEvaluatorCreator
12 /// @author Matthew O'Meara
13 
14 // Unit Headers
16 
17 // Package Headers
19 
20 // Package Headers
23 
25 
27 #include <core/pose/Pose.hh>
28 
29 // ObjexxFCL Headers
30 #include <ObjexxFCL/string.functions.hh>
31 
32 // Utility headers
33 #include <utility/pointer/ReferenceCount.hh>
34 #include <utility/vector1.hh>
35 
36 #include <utility/file/FileName.hh>
37 
38 #include <basic/options/option.hh>
39 #include <basic/Tracer.hh>
40 
41 //// C++ headers
42 
43 // due to template function
45 
46 
47 // option key includes
48 #include <basic/options/option_macros.hh>
49 #include <basic/options/keys/evaluation.OptionKeys.gen.hh>
50 
51 #include <basic/options/keys/in.OptionKeys.gen.hh>
53 #include <utility/vector0.hh>
54 
55 #ifdef WIN32
57 #endif
58 
59 
60 static basic::Tracer tr("protocols.evalution.ContactMapEvaluatorCreator");
61 
62 namespace protocols {
63 namespace simple_filters {
64 
66 
68  using namespace basic::options;
69  if ( options_registered_ ) return;
70  options_registered_ = true;
71 
72  OPT( evaluation::contact_map );
73  OPT( in::file::native );
74 }
75 
77  using namespace core;
78  using namespace basic::options;
79  using namespace basic::options::OptionKeys;
80 
81 
82  if ( option[ OptionKeys::evaluation::contact_map ] ) {
83  core::pose::PoseOP native_pose = NULL;
84  if ( option[ in::file::native ].user() ) {
85  native_pose = new core::pose::Pose;
86  core::import_pose::pose_from_pdb( *native_pose, option[ in::file::native ]() );
87  }
88 
89  if ( !native_pose ) {
90  tr.Error << "Error: -evaluation::contact_map must be specified with a native!\n";
91  } else {
92  core::Real max_dist(12);
93  core::Size min_seqsep(5);
94  eval.add_evaluation(
95  new ContactMapEvaluator( *native_pose, max_dist, min_seqsep )
96  );
97  }
98  }
99 
100 
101 }
102 
104  return "ContactMapEvaluatorCreator";
105 }
106 
107 } //namespace
108 } //namespace