Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Templates.hh
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 /// @author Oliver Lange
11 #ifndef INCLUDED_protocols_abinitio_Templates_hh
12 #define INCLUDED_protocols_abinitio_Templates_hh
13 
14 // Unit Headers
16 
17 // Package Headers
20 
21 // Project Headers
22 #include <core/pose/Pose.fwd.hh>
23 #include <core/types.hh>
24 
27 // AUTO-REMOVED #include <core/fragment/FrameList.fwd.hh>
29 // AUTO-REMOVED #include <core/scoring/constraints/AtomPairConstraint.fwd.hh>
33 // AUTO-REMOVED #include <core/scoring/dssp/StrandPairing.hh>
34 #ifdef __clang__
35 #include <core/pose/Pose.hh>
37 #endif
38 // ObjexxFCL Headers
39 
40 // Utility headers
41 #include <utility/pointer/ReferenceCount.hh>
42 #include <utility/exit.hh>
43 
44 //// C++ headers
45 #include <string>
46 #include <map>
47 
50 #include <utility/vector1.hh>
51 
52 #ifdef WIN32
54 #endif
55 
56 
57 namespace protocols {
58 namespace abinitio {
59 
61 public:
62  typedef std::map< std::string, TemplateOP > TemplateMap;
63 
64 public:
65  typedef TemplateMap::const_iterator const_iterator;
67 
68  static void register_options();
69 
70  Templates( std::string const& config_file, core::pose::PoseCOP native = NULL );
71  virtual ~Templates();
73  Size pick_frags( core::fragment::FragSet&, core::fragment::FragDataOP frag_type, Size ncopies = 1 ) const;
74 
76 
78 
79  bool has_pairings() const {
80  return pairings_.size();
81  }
82 
84  return pairings_;
85  }
86 
87  std::string const& target_sequence() const {
88  return target_sequence_;
89  }
90 
92  return target_sequence_;
93  }
94 
96  return target_sequence().size();
97  }
98 
100  return templates_.begin();
101  }
102 
103  const_iterator end() const {
104  return templates_.end();
105  }
106 
107  TemplateList const& helixjump_picks() const {
108  return helixjump_pick_list_;
109  }
110 
111  void
113 
114  bool has_template( std::string const& ModelID ) const {
115  return ( templates_.find( ModelID ) != templates_.end() );
116  }
117 
118  Template const& get_template( std::string const& ModelID ) const {
119  TemplateMap::const_iterator iter ( templates_.find( ModelID ) );
120  if ( iter == templates_.end() ) {
121  utility_exit_with_message("Unknown model name: " + ModelID );
122  }
123  return *(iter->second);
124  }
125 
126  bool
127  is_good() const { return good_; };
128 
129 
131  core::fragment::FragSet& frag_set,
133  core::Size ncopies = 1
134  ) const;
135 
136  void set_native( core::pose::PoseCOP native );
137 
139  return *strand_stats_;
140  }
141 
142 private:
143  void get_cst_list( TemplateList& cst_list, TemplateList& cull_list ) const;
144  void scored_fragpick_list( TemplateList& frag_pick_list ) const;
145  void _get_scored_list( TemplateList& cst_list, core::Size topN, core::Real wTopol, core::Real wExtern) const;
146 
147  bool good_;
148 
152 
155 
159 };
160 
161 } //abinitio
162 } //protocols
163 
164 #endif