Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PyEnergy.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/methods/PyEnergy.hh
11 /// @brief Various Energy classes for subclassing in PyRosetta.
12 /// @author Sergey Lyskov
13 
14 
15 #ifndef INCLUDED_core_scoring_methods_PyEnergy_hh
16 #define INCLUDED_core_scoring_methods_PyEnergy_hh
17 
21 
22 // Package headers
23 #include <utility/pointer/owning_ptr.hh>
24 
25 namespace core {
26 namespace scoring {
27 namespace methods {
28 
29 template< class T > utility::pointer::access_ptr<T> _AP( T & o) { return utility::pointer::access_ptr<T> ( & o ); }
30 template< class T > utility::pointer::access_ptr<T const > _CAP( T const & o ) { return utility::pointer::access_ptr<T const > ( & o ); }
31 
32 
34 {
35 public:
37 
38 
39  virtual void residue_energy(conformation::Residue const & rsd, pose::Pose const & pose, EnergyMap & emap) const {
40  Py_residue_energy( _AP(rsd), _AP(pose), _AP(emap) ) ;
41  }
42 
44  pose::PoseCAP const &,
46  ) const = 0;
47 };
48 
49 
51 {
52 public:
54 
55 
56  virtual void residue_pair_energy(conformation::Residue const & rsd1, conformation::Residue const & rsd2, pose::Pose const & pose, ScoreFunction const &sfn, EnergyMap & emap) const
57  { Py_residue_pair_energy(_CAP(rsd1), _CAP(rsd2), _CAP(pose), _CAP(sfn), _AP(emap) ); }
58 
63  utility::pointer::access_ptr< EnergyMap > const & emap) const = 0;
64 
65 
66  virtual bool defines_intrares_energy( EnergyMap const & emap ) const
67  { return Py_defines_intrares_energy( _CAP(emap) ); }
68 
70 
71 
72  virtual void eval_intrares_energy(conformation::Residue const & rsd, pose::Pose const & pose, ScoreFunction const &sfn, EnergyMap & emap) const
73  { Py_eval_intrares_energy( _CAP(rsd), _CAP(pose), _CAP(sfn), _AP(emap)); }
74 
78  utility::pointer::access_ptr< EnergyMap > const & emap) const = 0;
79 
80 
81  virtual Real eval_dof_derivative(id::DOF_ID const & dof_id, id::TorsionID const & tor_id, pose::Pose const & pose, ScoreFunction const & sfxn, EnergyMap const & weights) const
82  { return Py_eval_dof_derivative(_CAP(dof_id), _CAP(tor_id), _CAP(pose), _CAP(sfxn), _CAP(weights)); }
83 
88  utility::pointer::access_ptr< EnergyMap const > const & weights) const = 0;
89 
90 
91  virtual void indicate_required_context_graphs( utility::vector1< bool > & context_graphs_required ) const
92  { Py_indicate_required_context_graphs( _AP(context_graphs_required) ); }
93 
94  virtual void Py_indicate_required_context_graphs( utility::pointer::access_ptr< utility::vector1< bool > > const & context_graphs_required ) const = 0;
95 
96 };
97 
98 
99 }
100 }
101 }
102 
103 #endif // INCLUDED_core_scoring_methods_PyEnergy_hh