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
RG_Energy.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/methods/RG_Energy.cc
11
/// @brief Radius of gyration energy function definition. Returns -1 * RG for a given Pose.
12
/// @author James Thompson
13
14
15
// Unit headers
16
#include <
core/scoring/methods/RG_Energy.hh
>
17
18
// Package headers
19
#include <
core/conformation/Residue.hh
>
20
#include <
core/conformation/Atom.hh
>
21
22
#include <
core/scoring/EnvPairPotential.hh
>
23
//#include <core/scoring/ScoringManager.hh>
24
#include <
core/scoring/EnergyGraph.hh
>
25
26
// Project headers
27
#include <
core/pose/Pose.hh
>
28
#include <
core/conformation/Residue.hh
>
29
30
31
// Utility headers
32
#include <basic/prof.hh>
33
#include <ObjexxFCL/format.hh>
34
35
36
// C++
37
38
39
namespace
core {
40
namespace
scoring {
41
namespace
methods {
42
43
/// THIS CLASS IS DEPRICATED.
44
/// USE RG_Energy_Fast
45
RG_Energy::RG_Energy
()
46
{
47
//add_score_type( rg );
48
}
49
50
51
/// clone
52
EnergyMethodOP
53
RG_Energy::clone
()
const
54
{
55
return
new
RG_Energy
();
56
}
57
58
59
/////////////////////////////////////////////////////////////////////////////
60
// scoring
61
/////////////////////////////////////////////////////////////////////////////
62
63
/// @brief Calculate the radius of gyration and place the answer into
64
/// totals[ rg ].
65
void
66
RG_Energy::finalize_total_energy
(
67
pose::Pose
& pose,
68
ScoreFunction
const
&,
69
EnergyMap
& totals
70
)
const
{
71
using namespace
conformation;
72
73
PROF_START(
basic::RG
);
74
75
Size
const
nres( pose.
total_residue
() );
76
77
///////////////////////////////////////
78
//
79
// RG SCORE
80
core::Real
rg_score = 0;
81
for
(
Size
i = 1; i <= nres; ++i ) {
// outer loop over residues
82
Vector
const
v( pose.
residue
(i).
nbr_atom_xyz
() );
83
for
(
Size
j = i + 1; j <= nres; ++j ) {
84
rg_score +=
distance_squared
( v, pose.
residue
(j).
nbr_atom_xyz
() );
85
}
86
}
87
88
rg_score /= ( pose.
total_residue
() * pose.
total_residue
() - pose.
total_residue
() );
89
totals[
rg
] = sqrt(rg_score);
90
91
PROF_STOP(
basic::RG
);
92
}
93
94
}
95
}
96
}
Generated on Sat Jun 1 2013 11:38:59 for Rosetta 3.5 by
1.8.4