Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IGEdgeReweighters.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 edge reweighting for Interaction Graphs
11 /// @brief
12 /// @author Florian Richter, floric@u.washington.edu, june 08
13 
14 #ifndef INCLUDED_protocols_toolbox_IGEdgeReweighters_hh
15 #define INCLUDED_protocols_toolbox_IGEdgeReweighters_hh
16 
17 // Unit headers
19 // Package headers
20 //#include <core/pose/Pose.fwd.hh>
21 //#include <core/pack/task/PackerTask.fwd.hh>
22 #include <set>
23 
24 #include <utility/vector1.hh>
25 
26 
27 
28 namespace protocols {
29 namespace toolbox {
30 
32 
33 public:
34  IGLigandDesignEdgeUpweighter( core::Real weight_factor ){ weight_factor_ = weight_factor; }
35 
37  core::pose::Pose const & pose,
38  core::pack::task::PackerTask const & task,
39  Size res1,
40  Size res2
41  ) const;
42 
43 private:
45 
46 };
47 
48 
49 //template <class T>
51 
52  //typedef typename T::const_iterator t_it;
53 
54 public:
55  /*
56  ResidueGroupIGEdgeUpweighter(
57  core::Real weight_factor,
58  T const & group1_in,
59  T const & group2_in
60  ) : weight_factor_(weight_factor)
61  {
62  for( t_it g1it = group1_in.begin(); g1it != group1_in.end(); ++g1it ) group1_.insert( *g1it );
63  for( t_it g2it = group2_in.begin(); g2it != group2_in.end(); ++g2it ) group2_.insert( *g2it );
64  }
65  */
66  // /*
68  core::Real weight_factor,
69  utility::vector1< core::Size> const & group1_in,
70  utility::vector1< core::Size> const & group2_in
71  ) : weight_factor_(weight_factor)
72  {
73  for( utility::vector1< core::Size>::const_iterator g1it = group1_in.begin(); g1it != group1_in.end(); ++g1it ) group1_.insert( *g1it );
74  for( utility::vector1< core::Size>::const_iterator g2it = group2_in.begin(); g2it != group2_in.end(); ++g2it ) group2_.insert( *g2it );
75  }
76  // */
77 
79  core::pose::Pose const &, // pose,
80  core::pack::task::PackerTask const &, // task,
81  Size res1,
82  Size res2
83  ) const {
84  if( ( (group1_.find(res1) != group1_.end()) && (group2_.find(res2) != group2_.end() ) )
85  ||( (group2_.find(res1) != group2_.end()) && (group1_.find(res2) != group1_.end() ) ) ){
86  return weight_factor_;
87  }
88  else return default_weight_;
89  }
90 
91 private:
92 
94  std::set< core::Size > group1_;
95  std::set< core::Size > group2_;
96 
97 };
98 
99 } //namespace toolbox
100 } //namespace protocols
101 
102 
103 #endif