Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RNA_BaseBaseEnergy.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/rna/RNA_BaseBaseEnergy.cc
11 /// @brief Statistically derived rotamer pair potential class implementation
12 /// @author Phil Bradley
13 /// @author Andrew Leaver-Fay
14 /// @author Rhiju Das
15 
16 
17 // Unit headers
19 
20 // Package headers
27 
28 // Project headers
29 #include <core/pose/Pose.hh>
31 
32 
33 // Utility headers
34 
35 #include <ObjexxFCL/format.hh>
36 
37 
38 // C++
39 
40 
41 namespace core {
42 namespace scoring {
43 namespace rna {
44 
45 /// c-tor THIS CLASS REQUIRES AN EnergyMethodCreator TO WORK PROPERLY
47  rna_low_resolution_potential_( ScoringManager::get_instance()->get_RNA_LowResolutionPotential() )
48 {
49  /*add_score_type( rna_base_pair );
50  add_score_type( rna_base_axis );
51  add_score_type( rna_base_stagger );
52  add_score_type( rna_base_stack );
53  add_score_type( rna_base_stack_axis );*/
54 }
55 
56 
57 /// clone
60 {
61  return new RNA_BaseBaseEnergy();
62 }
63 
64 
65 /////////////////////////////////////////////////////////////////////////////
66 // scoring
67 /////////////////////////////////////////////////////////////////////////////
68 ///
69 void
71 {
73 
74  // Following will not repeat any work if any pairwise terms (e.g., base-backbone) have
75  // already been calculated... would be better to
76  // wrap it inside residue_pair_energy (so it could be used by the packer!).
77  // Also maybe this should be unified with RNA_PairwiseLowResolutionEnergy...
78  //rna_low_resolution_potential_.update_rna_base_base_interactions( pose );
79 
80 }
81 
82 
83 /////////////////////////////////////////////////////////////////////////////
84 void
86 {
89 
91  rna::RNA_RawBaseBaseInfo const & raw_base_base_info( rna_scoring_info.rna_raw_base_base_info() );
92  rna::RNA_FilteredBaseBaseInfo & rna_filtered_base_base_info( rna_scoring_info.rna_filtered_base_base_info() );
93 
94  rna_filtered_base_base_info.carry_out_filtering( raw_base_base_info );
95 }
96 
97 
98 /////////////////////////////////////////////////////////////////////////////
99 // This all needs to eventually be refactored for the packer.
100 void
102  pose::Pose & pose,
103  ScoreFunction const &,
104  EnergyMap & totals
105 ) const
106 {
107 
108  //This needs to take care of a bunch of base pair book-keeping.
109  // Get Pose cached pairwise "raw" base-base info. This was
110  // updated above, in setup_for_scoring
112  rna::RNA_RawBaseBaseInfo const & raw_base_base_info( rna_scoring_info.rna_raw_base_base_info() );
113 
114  // Create Pose cached non-pairwise, "filtered" base-base info.
115  // This forces each base edge to have only one pairing partner.
116  rna::RNA_FilteredBaseBaseInfo & rna_filtered_base_base_info( rna_scoring_info.rna_filtered_base_base_info() );
117 
118  rna_filtered_base_base_info.carry_out_filtering( raw_base_base_info );
119 
120  // From filtered base-base info, pull out total scores.
121  totals[ rna_base_pair ] += rna_filtered_base_base_info.get_total_base_pair_score();
122  totals[ rna_base_axis ] += rna_filtered_base_base_info.get_total_base_axis_score();
123  totals[ rna_base_stagger ] += rna_filtered_base_base_info.get_total_base_stagger_score();
124  totals[ rna_base_stack ] += rna_filtered_base_base_info.get_total_base_stack_score();
125  totals[ rna_base_stack_axis ] += rna_filtered_base_base_info.get_total_base_stack_axis_score();
126 
127 
128 
129  rna_low_resolution_potential_.finalize( pose ); //Set calculated to false!
130 
131  rna_filtered_base_base_info.set_calculated( false );
132 
133 }
134 
135 /////////////////////////////////////////////////////////////////////////////
136 void
138  id::AtomID const & atom_id,
139  pose::Pose const & pose,
140  kinematics::DomainMap const &,
141  ScoreFunction const &,
142  EnergyMap const & weights,
143  Vector & F1,
144  Vector & F2
145  ) const
146 {
147 
148  // updated above, in setup_for_scoring
149  rna_low_resolution_potential_.eval_atom_derivative_base_base( atom_id, pose, weights, F1, F2 );
150 
151  return;
152 }
153 
154 
155 /////////////////////////////////////////////////////////////////////////////////////
156 
157 
158 /// @brief RNA_BaseBaseEnergy distance cutoff
159 Distance
161 {
162  return 0.0; /// Uh, I don't know.
163 }
164 
165 }
166 }
167 }