Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RotamerConstraint.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 core/scoring/constraints/RotamerConstraint.hh
11 ///
12 /// @brief
13 /// @author Ian W. Davis
14 
15 
16 #ifndef INCLUDED_core_pack_dunbrack_RotamerConstraint_hh
17 #define INCLUDED_core_pack_dunbrack_RotamerConstraint_hh
18 
19 // Unit headers
21 
22 // Package headers
24 
26 
27 #include <core/id/AtomID.hh>
30 #include <utility/vector1.hh>
31 
32 
33 namespace core {
34 namespace pack {
35 namespace dunbrack {
36 
37 
38 /// @brief Convenience function adds constraints to the supplied pose based on
39 /// the -unboundrot command line flag.
40 void load_unboundrot(pose::Pose & pose);
41 
42 /// @brief Convenience function adds constraints to the supplied pose based on
43 /// the list of provided poses.
44 void load_unboundrot(pose::Pose & pose, core::pose::PoseCOPs const & unboundrot_poses);
45 
46 
47 ///@brief This class favors a particular rotamer at a particular position by reducing its Dunbrack energy.
48 ///
49 ///@details Specifically, the given rotamer well(s) receive a bonus equal to the
50 /// difference between their minimum energy (for the ideal rotamer in this well)
51 /// and the minimum energy of any rotamer (at the current phi,psi).
52 /// This class is used to implement the scoring component of the -unboundrot flag;
53 /// actually adding those rotamers to the library occurs in core/pack/rotamer_set/UnboundRotamersOperation.
55 {
56 public:
57  virtual std::string type() const {
58  return "Rotamer";
59  }
60 
62  pose::Pose const & pose,
63  Size seqpos
64  );
65  virtual ~RotamerConstraint();
66 
67  virtual
68  void
69  add_residue( conformation::Residue const & rsd );
70 
71  virtual
73  clone() const { return new RotamerConstraint( *this ); }
74 
75  virtual
76  Size
77  natoms() const;
78 
79  virtual
80  AtomID const &
81  atom( Size const index ) const;
82 
83  virtual
84  void
85  score(
86  scoring::constraints::XYZ_Func const & xyz_func,
87  scoring::EnergyMap const & weights,
88  scoring::EnergyMap & emap
89  ) const;
90 
91  virtual
92  void
93  fill_f1_f2(
94  AtomID const & atom,
96  Vector & F1,
97  Vector & F2,
98  scoring::EnergyMap const & weights
99  ) const;
100 
101  /// @brief This gets used to compare one constraint to another, so it should
102  /// uniquely reflect all the parameters.
103  virtual void show( std::ostream & out ) const ;
104 
105 private:
112 
113 }; // RotamerConstraint
114 
115 
116 } // namespace dunbrack
117 } // namespace pack
118 } // namespace core
119 
120 #endif // INCLUDED_core_pack_dunbrack_RotamerConstraint_HH