Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
P_AA_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/P_AA_Energy.cc
11 /// @brief Probability of observing an amino acid (NOT conditional on phi/psi), energy method implementation
12 /// @author Ron Jacak
13 
14 
15 // Unit headers
18 
19 // Package headers
21 #include <core/scoring/P_AA.hh>
24 
25 #include <utility/vector1.hh>
26 
27 
28 // Project headers
29 
30 
31 namespace core {
32 namespace scoring {
33 namespace methods {
34 
35 
36 /// @details This must return a fresh instance of the P_AA_Energy class,
37 /// never an instance already in use
41 ) const {
42  return new P_AA_Energy;
43 }
44 
47  ScoreTypes sts;
48  sts.push_back( p_aa );
49  return sts;
50 }
51 
52 
53 ///@remarks
54 /// get_P_AA calls a method in ScoringManager which create a new object of type P_AA. The constructor for that created object
55 /// reads in the three database files: p_aa, p_aa_pp, and p_aa_n. That object is returned and then stored as a private member
56 /// variable here.
59  p_aa_( ScoringManager::get_instance()->get_P_AA() )
60 {}
61 
62 
65  return new P_AA_Energy;
66 }
67 
68 
69 /////////////////////////////////////////////////////////////////////////////
70 // methods for ContextIndependentOneBodyEnergies
71 /////////////////////////////////////////////////////////////////////////////
72 
73 void
75  conformation::Residue const & rsd,
76  pose::Pose const &,
77  EnergyMap & emap
78 ) const
79 {
80  emap[ p_aa ] += p_aa_.P_AA_energy( rsd );
81 }
82 
83 
84 ///@remarks no DOF to vary for P_AA, so just return 0.0 like the reference energy does
85 Real
87  id::DOF_ID const & ,// dof_id,
88  id::TorsionID const & , //tor_id
89  pose::Pose const & , // pose
90  ScoreFunction const &, //sfxn,
91  EnergyMap const & // weights
92 ) const
93 {
94  return 0.0;
95 }
96 
97 /// @brief P_AA_Energy is context independent; indicates that no context graphs are required
98 void
102 {
103  return 1; // Initial versioning
104 }
105 
106 
107 } // methods
108 } // scoring
109 } // core
110