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
sym_e
symE.cc
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/symE/symE.c
11
/// @brief Implementation of symmetric design bonus class
12
/// @author Sam DeLuca (samuel.l.deluca@vanderbilt.edu)
13
14
// Unit headers
15
#include <
core/scoring/sym_e/symE.hh
>
16
#include <
core/scoring/sym_e/symECreator.hh
>
17
18
// Package headers
19
#include <
core/scoring/Energies.hh
>
20
// AUTO-REMOVED #include <core/scoring/ScoreFunction.hh>
21
//#include <core/scoring/ScoringManager.hh>
22
#include <
core/scoring/LREnergyContainer.hh
>
23
#include <
core/scoring/DenseEnergyContainer.hh
>
24
25
// Project headers
26
// AUTO-REMOVED #include <core/conformation/Conformation.hh>
27
// AUTO-REMOVED #include <core/io/pdb/pose_io.hh>
28
#include <basic/options/option.hh>
29
#include <basic/options/keys/score.OptionKeys.gen.hh>
30
#include <
core/pose/Pose.hh
>
31
// AUTO-REMOVED #include <basic/database/open.hh>
32
#include <basic/Tracer.hh>
33
34
#include <
core/chemical/AtomType.hh
>
35
#include <
core/conformation/Residue.hh
>
36
#include <
core/kinematics/Jump.hh
>
37
#include <utility/vector1.hh>
38
39
40
static
basic::Tracer
TR
(
"core.scoring.symE"
);
41
42
namespace
core {
43
namespace
scoring {
44
namespace
sym_e {
45
46
47
/// @details This must return a fresh instance of the symE class,
48
/// never an instance already in use
49
methods::EnergyMethodOP
50
symECreator::create_energy_method
(
51
methods::EnergyMethodOptions
const
&
52
)
const
{
53
return
new
symEnergy
;
54
}
55
56
ScoreTypes
57
symECreator::score_types_for_method
()
const
{
58
ScoreTypes
sts;
59
sts.push_back(
symE_bonus
);
60
return
sts;
61
}
62
63
64
65
symEnergy::symEnergy
() :
66
parent
( new
symECreator
)
67
{}
68
69
methods::EnergyMethodOP
symEnergy::clone
()
const
70
{
71
return
new
symEnergy
(*
this
);
72
}
73
74
void
symEnergy::setup_for_scoring
(
pose::Pose
&pose,
const
ScoreFunction
&)
const
75
{
76
77
using namespace
methods;
78
if
(pose.
energies
().
long_range_container
(
sym_bonus_lr
) == 0)
79
{
80
DenseEnergyContainerOP
lr_container =
new
DenseEnergyContainer
(pose.
total_residue
(),
symE_bonus
);
81
//LREnergyContainerOP lr_container = new LREnergyContainer(pose);
82
pose.
energies
().
set_long_range_container
(
sym_bonus_lr
, lr_container);
83
}
else
{
84
DenseEnergyContainerOP
lr_container_copied =
DenseEnergyContainerOP
(static_cast<DenseEnergyContainer*>(pose.
energies
().
nonconst_long_range_container
(
sym_bonus_lr
).get() ));
85
if
(lr_container_copied->size() !=pose.
total_residue
() )
86
{
87
DenseEnergyContainerOP
lr_container =
new
DenseEnergyContainer
(pose.
total_residue
(),
symE_bonus
);
88
//LREnergyContainerOP lr_container = new LREnergyContainer(pose);
89
pose.
energies
().
set_long_range_container
(
sym_bonus_lr
, lr_container);
90
}
91
//lr_container_copied->update(pose);
92
}
93
94
pose.
update_residue_neighbors
();
95
}
96
97
void
symEnergy::setup_for_packing
(
pose::Pose
&pose,
utility::vector1< bool >
const
&,
utility::vector1< bool >
const
&)
const
98
{
99
pose.
update_residue_neighbors
();
100
}
101
102
void
symEnergy::indicate_required_context_graphs
(
utility::vector1< bool >
& )
const
103
{
104
//
105
}
106
107
bool
symEnergy::defines_intrares_energy
(
const
EnergyMap
& )
const
108
{
109
return
false
;
110
}
111
112
void
symEnergy::eval_intrares_energy
(
conformation::Residue
const
& ,
pose::Pose
const
& ,
ScoreFunction
const
& ,
EnergyMap
& )
const
113
{
114
//
115
}
116
117
bool
symEnergy::defines_residue_pair_energy
(
const
core::pose::Pose
& ,
platform::Size
,
platform::Size
)
const
118
{
119
return
true
;
120
}
121
122
123
methods::LongRangeEnergyType
symEnergy::long_range_type
()
const
124
{
125
return
methods::sym_bonus_lr
;
126
}
127
128
129
void
symEnergy::residue_pair_energy
(
conformation::Residue
const
&rsd1,
conformation::Residue
const
&rsd2,
pose::Pose
const
&pose,
scoring::ScoreFunction
const
&,
EnergyMap
& emap)
const
130
{
131
Size
rsd1Pos = rsd1.
seqpos
();
132
Size
rsd2Pos = rsd2.
seqpos
();
133
Size
totalLength = pose.
total_residue
();
134
135
int
symUnits = basic::options::option[ basic::options::OptionKeys::score::symE_units ]();
136
core::Real
symBonus = basic::options::option[
basic::options::OptionKeys::score::symE_bonus
]();
137
138
if
(symUnits >0)
139
{
140
141
if
(rsd1Pos % (totalLength/symUnits) == rsd2Pos % (totalLength/symUnits) && rsd1Pos != rsd2Pos)
142
{
143
144
if
(rsd1.
name
() == rsd2.
name
())
145
{
146
emap[
symE_bonus
] += symBonus;
147
}
148
}
149
}
150
151
}
152
core::Size
153
symEnergy::version
()
const
154
{
155
return
1;
// Initial versioning
156
}
157
}
//symE
158
}
//scoring
159
}
//core
Generated on Sat Jun 1 2013 11:40:19 for Rosetta 3.5 by
1.8.4