Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RNA_SecStructInfo.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/SecStruct/methods/RNA_BaseBasePotential.cc
11 /// @brief Statistically derived rotamer pair potential class implementation
12 /// @author Rhiju Das
13 
14 // Unit headers
17 
18 // Package headers
19 
20 // Project headers
21 #include <core/chemical/AA.hh>
22 // AUTO-REMOVED #include <core/chemical/VariantType.hh>
23 // AUTO-REMOVED #include <core/conformation/Residue.hh>
24 #include <core/pose/Pose.hh>
26 #include <basic/datacache/BasicDataCache.hh>
27 
28 #include <utility/vector1.hh>
29 
30 
31 // Utility headers
32 
33 // C++
34 
35 ///////////////////////////////////////////////////////
36 // Keep track of some base geometry that is
37 // useful for RNA scoring.
38 ///////////////////////////////////////////////////////
39 
40 namespace protocols {
41 namespace rna {
42 
43 /// @details Copy constructors must copy all data, not just some...
45  CacheableData()
46 {
48 }
49 
50 /// @details Pose must already contain a core::pose::datacache::CacheableDataType::RNA_SCORING_INFO object or this method will fail.
51 std::string const &
53 {
54  //using core::pose::datacache::CacheableDataType::RNA_SECSTRUCT_INFO;
55 
57  set_rna_secstruct( pose, std::string( pose.total_residue(), 'X' ) );
58  }
59 
60  return ( static_cast< RNA_SecStructInfo const * >(pose.data().get_const_ptr( core::pose::datacache::CacheableDataType::RNA_SECSTRUCT_INFO )() ) )->get_secstruct();
61 }
62 
63 /// @details Either returns a non-const reference to the rna_scoring object already stored
64 /// in the pose, or creates a new rna scoring info object, places it in the pose, and returns
65 /// a non-const reference to it.
66 void
67 set_rna_secstruct( core::pose::Pose & pose, std::string const rna_secstruct_string )
68 {
69  //using core::pose::datacache::CacheableDataType::RNA_SECSTRUCT_INFO;
70 
72  ( static_cast< RNA_SecStructInfo * >( pose.data().get_ptr( core::pose::datacache::CacheableDataType::RNA_SECSTRUCT_INFO )()) )->set_secstruct( rna_secstruct_string );
73  }
74  // else
75  RNA_SecStructInfoOP rna_secstruct_info( new RNA_SecStructInfo( rna_secstruct_string ) );
77 }
78 
79 
80 
81 }
82 }
83