Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
core
scoring
methods
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
18
#include <
core/scoring/methods/ContextIndependentOneBodyEnergy.hh
>
19
#include <
core/scoring/methods/ContextIndependentTwoBodyEnergy.hh
>
20
#include <
core/scoring/methods/EnergyMethodCreator.hh
>
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
33
class
PyContextIndependentOneBodyEnergy
:
public
ContextIndependentOneBodyEnergy
34
{
35
public
:
36
PyContextIndependentOneBodyEnergy
(
EnergyMethodCreatorOP
op) :
ContextIndependentOneBodyEnergy
(op) {}
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
43
virtual
void
Py_residue_energy
(
utility::pointer::access_ptr< conformation::Residue const >
const
& ,
44
pose::PoseCAP
const
&,
45
utility::pointer::access_ptr< EnergyMap >
const
&
46
)
const
= 0;
47
};
48
49
50
class
PyContextIndependentTwoBodyEnergy
:
public
ContextIndependentTwoBodyEnergy
51
{
52
public
:
53
PyContextIndependentTwoBodyEnergy
(
EnergyMethodCreatorOP
op) :
ContextIndependentTwoBodyEnergy
(op) {}
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
59
virtual
void
Py_residue_pair_energy
(
utility::pointer::access_ptr< conformation::Residue const >
const
& rsd1,
60
utility::pointer::access_ptr< conformation::Residue const >
const
& rsd2,
61
utility::pointer::access_ptr< pose::Pose const>
const
& pose,
62
utility::pointer::access_ptr< ScoreFunction const >
const
& sfn,
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
69
virtual
bool
Py_defines_intrares_energy
(
utility::pointer::access_ptr< EnergyMap const >
const
& emap )
const
= 0;
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
75
virtual
void
Py_eval_intrares_energy
(
utility::pointer::access_ptr< conformation::Residue const>
const
& rsd,
76
utility::pointer::access_ptr< pose::Pose const >
const
& pose,
77
utility::pointer::access_ptr< ScoreFunction const >
const
& sfn,
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
84
virtual
Real
Py_eval_dof_derivative
(
utility::pointer::access_ptr< id::DOF_ID const >
const
& dof_id,
85
utility::pointer::access_ptr< id::TorsionID const >
const
& tor_id,
86
utility::pointer::access_ptr< pose::Pose const >
const
& pose,
87
utility::pointer::access_ptr< ScoreFunction const >
const
& sfxn,
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
Generated on Sat Jun 1 2013 11:38:44 for Rosetta 3.5 by
1.8.4