Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SingleResidueFragData.cc
Go to the documentation of this file.
1 
2 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
3 // vi: set ts=2 noet:
4 // :noTabs=false:tabSize=4:indentSize=4:
5 //
6 // (c) Copyright Rosetta Commons Member Institutions.
7 // (c) This file is part of the Rosetta software suite and is made available under license.
8 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
9 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
10 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
11 
12 /// @file core/fragments/FragData.cc
13 /// @brief a collection classes of the FragData and SingleResidueFragData class hirachy
14 /// @author Oliver Lange (olange@u.washington.edu)
15 /// @date Wed Oct 20 12:08:31 2007
16 ///
17 
18 // Unit Headers
20 
21 // Package Headers
22 //#include <core/fragment/FragData.hh>
23 #include <core/fragment/Frame.hh>
24 
25 // Project Headers
26 // AUTO-REMOVED #include <core/kinematics/MoveMap.hh>
27 #include <core/pose/Pose.hh>
29 
30 #include <utility/vector1.hh>
31 
32 
33 // ObjexxFCL Headers
34 //#include <ObjexxFCL/format.hh>
35 
36 // Utility headers
37 //#include <utility/vector1.fwd.hh>
38 //#include <basic/Tracer.hh>
39 
40 namespace core {
41 namespace fragment {
42 
43 /// @details Auto-generated virtual destructor
45 
46 //static basic::Tracer tr("core.fragment");
47 
48 bool SingleResidueFragData::steal(pose::Pose const& pose, Size seq_pos) {
49  sequence_ = oneletter_code_from_aa( pose.residue( seq_pos ).aa() );
50  return true;
51 }
52 
53 // insert fragment_data into pose at position given by Frame.seqpos( intra_frame_pos );
54 bool SingleResidueFragData::apply(pose::Pose &pose, Size const intra_frame_pos, Frame const& frame) const {
55  return apply( pose, frame.seqpos( intra_frame_pos ) );
56 }
57 
58 /// @brief insert fragment_data into pose at position given by Frame.seqpos( intra_frame_pos )
59 /// for dofs that are allowed to move in the MoveMap
60 bool SingleResidueFragData::apply( kinematics::MoveMap const & movemap, pose::Pose & pose, Size const intra_frame_pos, Frame const & frame ) const {
61  return apply( movemap, pose, frame.seqpos( intra_frame_pos ) );
62 }
63 
64 // insert fragment_data sec-struct into ss-string at position seq_pos
65 bool SingleResidueFragData::apply_ss( std::string& ss, Size intra_frame_pos, Frame const& frame) const {
66  return apply_ss( ss, frame.seqpos( intra_frame_pos ) );
67 }
68 
69 // insert fragment_data into pose at position seq_pos
70 bool SingleResidueFragData::steal(pose::Pose const& pose, Size intra_frame_pos, Frame const& frame) {
71  return steal( pose, frame.seqpos( intra_frame_pos ) );
72 }
73 
74 // check weather dofs can be moved
75 bool SingleResidueFragData::is_applicable( kinematics::MoveMap const& mm, Size intra_frame_pos, Frame const& frame) const {
76  return is_applicable( mm, frame.seqpos( intra_frame_pos ) );
77 }
78 
79 void SingleResidueFragData::show( std::ostream &out ) const {
80  out << type() << " ";
81  //out << "SINGLE RESIDUE FRAG DATA -- show() not overloaded for class " << typeid(*this).name() << std::endl;
82 }
83 
84 
85 void SingleResidueFragData::read_data( std::istream& ) {
86  //nothing to read
87 }
88 
89 
92  return "_SRFD_Base_ERROR_";
93 }
94 
97  return "SingleResidueFragData";
98 }
99 
100 
101 }
102 }