Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TranslatorSet.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 /// @file
11 /// @author Oliver Lange
12 
13 #ifndef INCLUDED_core_coarse_TranslatorSet_hh
14 #define INCLUDED_core_coarse_TranslatorSet_hh
15 
16 // Unit headers
17 // you cannot #include yourself #include <core/coarse/TranslatorSet.hh>
18 
19 // Coarse headers
20 #include <core/coarse/Rules.fwd.hh>
21 
22 // Project headers
24 //#include <core/coarse/Translator.hh>
25 #ifdef __clang__
27 #endif
29 //#include <core/chemical/AtomTypeSet.hh>
30 //#include <core/chemical/MMAtomTypeSet.fwd.hh>
31 #include <core/chemical/AA.hh>
32 
34 #include <core/pose/Pose.fwd.hh>
36 
37 // Utility headers
38 // AUTO-REMOVED #include <utility/vector1.hh>
39 #include <utility/pointer/access_ptr.hh>
40 #include <utility/pointer/owning_ptr.hh>
41 #include <utility/pointer/ReferenceCount.hh>
42 
43 
44 
45 // std headers
46 #include <ostream>
47 #include <map>
48 
49 /* TODO:
50 
51 make atoms in beads weighted
52 then a true centroid representation wouldn't need any change of the programming but just different rules
53 w=1 for CB and w=0 for all others
54 but all sidechain atoms in B1
55 
56 */
57 
58 
59 namespace core {
60 namespace coarse {
61 
63 
64  /* this is a container of Translators */
65  /* for every Residue in ResidueTypeSet we find a Translator in here */
66 public:
68  typedef std::map<ResName,TranslatorCOP> TranslatorMap;
69  typedef TranslatorMap::iterator iterator;
70  typedef TranslatorMap::const_iterator const_iterator;
73 public:
74 
75 
76  TranslatorSet( const RuleSet &rules, chemical::ResidueTypeSetCAP residue_set, ResidueTypeSetAP coarse_set);
77 
78  /// @brief prints Translator mappings
79  void pretty_print( std::ostream &os ) const;
80 
81  /// @brief generate new coarseified pose from coordinates in pose_in
82  void coarsify( pose::Pose &pose_out,pose::Pose const &pose_in ) const;
83 
84  /// @brief generate new coarsified residue from coordinates in fine_rsd
86 
87  // Undefined, commented out to allow pyton bindings to be builded
88  //void coarsify(
89  // RotamerLibrary &rot_lib_coarse,
90  // RotamerLibrary const &rot_lib_fine
91  //) const;
92 
93  //can ResName be translated ?
94  bool has(ResName name) const; //silly: by construction there are no residues in residue_set but not here.
95 
96  //// @brief return the Translator for the "most generic" residue_type that is of type aa
97  //// this will be the first one found now, but maybe we add the notion of "most generic"
98  //// to the residue_set later on ?
99  TranslatorCOP const &default_for_aa(chemical::AA aa) const;
100 protected: //protected since not needed apart from pretty_print.... might change
101  iterator begin() { return coarse_maps_.begin(); };
102  const_iterator begin() const { return coarse_maps_.begin(); };
103 
104  iterator end() { return coarse_maps_.end(); };
105  const_iterator end() const { return coarse_maps_.end(); };
106 
107 
108 private:
109  mutable TranslatorMap coarse_maps_;
112 
113 };
114 
115 
116 
117 } //namespace coarse
118 } // namespace core
119 
120 #endif