Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RNA_BulgeEnergy.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/RNA_BulgeEnergy.cc
11 /// @brief RNA_Bulge energy method implementation
12 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
13 
14 // Unit headers
17 
18 // Package Headers
20 //#include <core/scoring/ScoringManager.hh>
21 //#include <core/pack/dunbrack/RotamerLibrary.hh>
22 //#include <core/pack/dunbrack/RotamerLibraryScratchSpace.hh>
23 
25 
26 // Project headers
28 // AUTO-REMOVED #include <core/pose/Pose.hh>
29 
30 // AUTO-REMOVED #include <core/id/TorsionID.hh>
31 
32 // Utility headers
33 // AUTO-REMOVED #include <numeric/conversions.hh>
34 
35 #include <utility/vector1.hh>
36 
37 
38 namespace core {
39 namespace scoring {
40 namespace rna {
41 
42 
43 /// @details This must return a fresh instance of the RNA_BulgeEnergy class,
44 /// never an instance already in use
48 ) const {
49  return new RNA_BulgeEnergy;
50 }
51 
54  ScoreTypes sts;
55  sts.push_back( rna_bulge );
56  return sts;
57 }
58 
59 
60 
61 /// ctor
64 {}
65 
67 
68 /// clone
71 {
72  return new RNA_BulgeEnergy;
73 }
74 
75 /////////////////////////////////////////////////////////////////////////////
76 // methods for ContextIndependentOneBodyEnergies
77 /////////////////////////////////////////////////////////////////////////////
78 
79 /// @details Allocate the scratch space object on the stack to
80 /// alieviate thread-safety concerns. Scratch does not use new.
81 void
83  conformation::Residue const & rsd,
84  pose::Pose const &,
85  EnergyMap & emap
86 ) const
87 {
88  static Real const bulge_bonus = -10.0 /*Totally made up for now*/;
89 
90  if ( !rsd.is_RNA() ) return;
91 
92  if ( rsd.has_variant_type( "BULGE" ) ){
93  ///pack::dunbrack::RotamerLibraryScratchSpace scratch; // apl -- I'm removing this line; it doesn't seem to do anything
94  emap[ rna_bulge ] += bulge_bonus;
95  }
96 
97  if ( rsd.has_variant_type( "VIRTUAL_RNA_RESIDUE" ) ){
98  emap[ rna_bulge ] += bulge_bonus;
99  }
100 
101 }
102 
103 
104 ///
105 Real
107  id::DOF_ID const &,
108  id::TorsionID const &,
109  pose::Pose const &,
110  ScoreFunction const &,
111  EnergyMap const &
112 ) const
113 {
114  return 0.0; // no derivative -- bulge is a binary thing for now.
115 }
116 
117 /// @brief RNA_BulgeEnergy is context independent; indicates that no context graphs are required
118 void
120  utility::vector1< bool > & /*context_graphs_required*/
121 ) const
122 {}
125 {
126  return 1; // Initial versioning
127 }
128 
129 
130 
131 } // methods
132 } // scoring
133 } // core
134