Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RNA_ScoringInfo.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_BaseBasePotential.cc
11 /// @brief Statistically derived rotamer pair potential class implementation
12 /// @author Rhiju Das
13 
14 // Unit headers
18 
19 // Package headers
20 
21 // Project headers
22 #include <core/chemical/AA.hh>
23 // AUTO-REMOVED #include <core/chemical/VariantType.hh>
24 // AUTO-REMOVED #include <core/conformation/Residue.hh>
25 #include <core/pose/Pose.hh>
27 #include <basic/datacache/BasicDataCache.hh>
28 
29 // Utility headers
30 #include <numeric/xyzMatrix.hh>
31 
32 #include <utility/vector1.hh>
33 
34 
35 // AUTO-REMOVED #include <numeric/xyz.functions.hh>
36 
37 // C++
38 
39 ///////////////////////////////////////////////////////
40 // Keep track of some base geometry that is
41 // useful for RNA scoring.
42 ///////////////////////////////////////////////////////
43 
44 namespace core {
45 namespace scoring {
46 namespace rna {
47 
49 {}
50 
51 
52 /// @details Copy constructors must copy all data, not just some...
54  CacheableData(),
55  rna_centroid_info_( src.rna_centroid_info_ ),
56  rna_raw_base_base_info_( src.rna_raw_base_base_info_ ),
57  rna_filtered_base_base_info_( src.rna_filtered_base_base_info_ ),
58  rna_data_info_( src.rna_data_info_ ),
59  atom_numbers_for_vdw_calculation_( src.atom_numbers_for_vdw_calculation_ ),
60  atom_numbers_for_mg_calculation_( src.atom_numbers_for_mg_calculation_ ),
61  is_magnesium_( src.is_magnesium_ ),
62  vdw_calculation_annotated_sequence_( src.vdw_calculation_annotated_sequence_ ),
63  mg_calculation_annotated_sequence_( src.mg_calculation_annotated_sequence_ )
64 {
65 }
66 
67 
68 /// @details Pose must already contain a rna_scoring_info object or this method will fail.
69 RNA_ScoringInfo const &
71 {
72  //using core::pose::datacache::CacheableDataType::RNA_SCORING_INFO;
73 
75  return *( static_cast< RNA_ScoringInfo const * >( pose.data().get_const_ptr( core::pose::datacache::CacheableDataType::RNA_SCORING_INFO)() ) );
76 }
77 
78 /// @details Either returns a non-const reference to the rna_scoring object already stored
79 /// in the pose, or creates a new rna scoring info object, places it in the pose, and returns
80 /// a non-const reference to it.
81 RNA_ScoringInfo &
83 {
84  //using core::pose::datacache::CacheableDataType::RNA_SCORING_INFO;
85 
87  return *( static_cast< RNA_ScoringInfo * >( pose.data().get_ptr( core::pose::datacache::CacheableDataType::RNA_SCORING_INFO )() ));
88  }
89  // else
90  RNA_ScoringInfoOP rna_scoring_info = new RNA_ScoringInfo();
91 
92  // This should get initialized and dimensioned later -- when it is filled!
93  rna_scoring_info->rna_raw_base_base_info().resize( pose.total_residue() );
94 
96  return *rna_scoring_info;
97 }
98 
99 
100 }
101 }
102 }