Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Template.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 
12 #ifndef INCLUDED_protocols_abinitio_Template_hh
13 #define INCLUDED_protocols_abinitio_Template_hh
14 
15 // Unit Headers
17 
18 // Package Headers
19 
20 // Project Headers
21 #include <core/pose/Pose.fwd.hh>
22 #include <core/types.hh>
23 
25 // AUTO-REMOVED #include <core/fragment/FragData.fwd.hh>
28 
30 
31 // AUTO-REMOVED #include <core/scoring/constraints/AtomPairConstraint.hh>
32 #ifdef WIN32
34 #endif
35 
36 // AUTO-REMOVED #include <core/scoring/dssp/PairingsList.hh>
37 // AUTO-REMOVED #include <core/fragment/SecondaryStructure.fwd.hh>
38 // AUTO-REMOVED #include <core/scoring/dssp/StrandPairing.hh>
39 
40 // ObjexxFCL Headers
41 
42 // Utility headers
43 #include <utility/pointer/ReferenceCount.hh>
44 
45 
46 
47 //// C++ headers
48 // AUTO-REMOVED #include <cstdlib>
49 #include <string>
50 // AUTO-REMOVED #include <vector>
51 
56 #include <utility/vector1.hh>
57 
58 
59 
60 namespace protocols {
61 namespace abinitio {
62 
64 public:
65  ///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
66  virtual ~Template();
69 
70  static void register_options();
71 
73  Template( std::string const& name, core::pose::PoseCOP, std::string const& map_file, int offset, core::Real score );
74 
75  //@brief pick fragments of <length> from Template according to mapping, return nr of Frames
76  /// good for continuous fragments: no torsions from insertions are mapped
77  // Size pick_frags( core::fragment::FragSet&, core::fragment::FragDataCOP frag_type ) const;
78 
79 
80  //@brief steals frames as templated in target_frames and accumulates them in FragSet
81  // steal frags does not take care of insertion/deletions ( fine for e.g., jump-frames )
82  Size steal_frags( core::fragment::FrameList const& target_frames, core::fragment::FragSet& accumulator, Size ncopies = 1 ) const;
83 
84  //@brief maps pairings from target to template ( or the reverse )
87 
88  //@brief generate new list of frames aligned to the target --> only alignable frames in target_frames
89  void map2target( core::fragment::FrameList const& template_frames, core::fragment::FrameList& target_frames ) const;
90 
91  //@brief in-place mapping ---> breaks if not alignable
93 
94  //@brief generate new list of frame aligned to the template --> only alignable frames in template_frames
95  void map2template( core::fragment::FrameList const& target_frames, core::fragment::FrameList& template_frames ) const;
96 
97  //@brief in-place mapping ----> breaks if not alignable
99 
101 
102  //@brief map constraints:
103  // in the moment only support for AtomPairConstraints... otherwise would have to add clone() method to Constraint
104  // and write-accessors for AtomID to all derived classes
106 
108 
109  // core::scoring::constraints::NamedAtomPairConstraintOP
110  // map2template( core::scoring::constraints::NamedAtomPairConstraint const& ) const;
111 
112  void cull_violators( NamedAtomPairConstraintList const& target_list, NamedAtomPairConstraintList& culled_list ) const;
113 
114  void read_constraints( std::string const& cst_file );
115 
116  //@brief constraints for this tempalte are present
117  bool has_constraints() const {
118  return cstfile_.size();
119  // return cstset_.size();
120  }
121 
123  return *strand_pairings_;
124  }
125 
126  //@brief constraints -- template numbering
128  if ( cstset_.size() == 0 ) _read_constraints( cstfile_ );
129  return cstset_;
130  }
131 
132  //void map2template( FrameList const& target_frames, FrameList const& template_frame ) const;
133 
134  std::string const& name() const {
135  return name_;
136  }
137 
139  return score_;
140  }
141 
143  return mapping_.seq1();
144  }
145 
147  return topol_score_;
148  }
149 
150  void topology_score( core::Real setting ) {
151  topol_score_ = setting;
152  }
153 
154  bool is_good() const { return good_; }
155 
156 private:
158  void _read_constraints( std::string const& cst_file ) const;
159 
162  // std::string aligned_seq_;
163  // std::string target_seq_;
166  core::Real score_; //the svr_alignment score
167  core::Real topol_score_; //the pairing-stat score
168  //constraints template numbering
169  mutable NamedAtomPairConstraintList cstset_; //because of lazy read
170 
172 
174 
175  bool good_;
176 };
177 
178 } //abinitio
179 } //protocols
180 
181 #endif