Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PackStatEnergy.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/PackStatEnergy.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
18 
19 // Package headers
20 // AUTO-REMOVED #include <core/scoring/Energies.hh>
21 //#include <core/scoring/ScoringManager.hh>
23 
24 // Project headers
25 #include <core/pose/Pose.hh>
26 
28 #include <utility/vector1.hh>
29 
30 
31 
32 namespace core {
33 namespace scoring {
34 namespace methods {
35 
36 
37 /// @details This must return a fresh instance of the PackStatEnergy class,
38 /// never an instance already in use
42 ) const {
43  return new PackStatEnergy;
44 }
45 
48  ScoreTypes sts;
49  sts.push_back( pack_stat );
50  return sts;
51 }
52 
53 
54 /// c-tor
57 {}
58 
59 
60 /// clone
63 {
64  return new PackStatEnergy();
65 }
66 
67 
68 /////////////////////////////////////////////////////////////////////////////
69 // scoring
70 /////////////////////////////////////////////////////////////////////////////
71 
72 /// @brief Calculate the radius of gyration and place the answer into
73 /// totals[ rg ].
74 void
76  pose::Pose & pose,
77  ScoreFunction const &,
78  EnergyMap & totals
79 ) const {
80  using namespace core::scoring::packstat;
81 
82  core::Real packing_score = compute_packing_score(pose);
83  // std::cerr << "ps " << packing_score << " " << std::endl;
84  totals[ pack_stat ] = - packing_score * pose.total_residue();
85 
86 }
89 {
90  return 1; // Initial versioning
91 }
92 
93 }
94 }
95 }