Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
protocols
rna
RNA_JumpLibrary.hh
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
// CVS information:
4
// $Revision: 1.1.2.1 $
5
// $Date: 2005/11/07 21:05:35 $
6
// $Author: rhiju $
7
// (c) Copyright Rosetta Commons Member Institutions.
8
// (c) This file is part of the Rosetta software suite and is made available under license.
9
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
10
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
11
// (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
12
13
#ifndef INCLUDED_protocols_rna_RNA_JumpLibrary_HH
14
#define INCLUDED_protocols_rna_RNA_JumpLibrary_HH
15
16
// AUTO-REMOVED #include <core/pose/Pose.fwd.hh>
17
#include <
core/kinematics/Jump.hh
>
18
#include <
core/types.hh
>
19
#include <utility/pointer/ReferenceCount.hh>
20
#include <utility/vector1.fwd.hh>
21
// C++ Headers
22
#include <string>
23
#include <map>
24
25
#include <utility/vector1.hh>
26
27
28
29
namespace
protocols {
30
namespace
rna {
31
32
///////////////////////////////////////////////////////////////////////////////////
33
class
BasePairType
{
34
public
:
35
char
aa1
;
36
char
aa2
;
37
char
edge1
;
38
char
edge2
;
39
char
orientation
;
40
41
BasePairType
(
char
const
aa1_in,
char
const
aa2_in,
42
char
const
edge1_in,
char
const
edge2_in,
43
char
const
orientation_in){
44
aa1
= aa1_in;
aa2
= aa2_in;
45
edge1
= edge1_in;
edge2
= edge2_in;
46
orientation
= orientation_in;
47
}
48
49
friend
50
bool
operator <
(
BasePairType
const
& lhs,
BasePairType
const
& rhs )
51
{
52
//There must be a more elegant way to do this...
53
if
( lhs.
aa1
< rhs.
aa1
) {
54
return
true
;
55
}
else
if
( lhs.
aa1
== rhs.
aa1
) {
56
if
( lhs.
aa2
< rhs.
aa2
) {
57
return
true
;
58
}
else
if
( lhs.
aa2
== rhs.
aa2
) {
59
if
( lhs.
edge1
< rhs.
edge1
) {
60
return
true
;
61
}
else
if
( lhs.
edge1
== rhs.
edge1
) {
62
if
( lhs.
edge2
< rhs.
edge2
) {
63
return
true
;
64
}
else
{
65
if
( lhs.
edge2
== rhs.
edge2
) {
66
return
( lhs.
orientation
< rhs.
orientation
);
67
}
68
}
69
}
70
}
71
}
72
return
false
;
73
}
74
75
};
76
77
///////////////////////////////////////////////////////////////////////////////////
78
class
RNA_PairingTemplate
:
public
utility::pointer::ReferenceCount
{
79
80
public
:
81
///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
82
virtual
~RNA_PairingTemplate
();
83
84
RNA_PairingTemplate
(
core::kinematics::Jump
const
j,
std::string
const
atom_name1
,
std::string
const
atom_name2
);
85
86
RNA_PairingTemplate
(
core::kinematics::Jump
const
j1,
core::kinematics::Jump
const
j2,
std::string
const
atom_name1,
std::string
const
atom_name2 );
87
88
core::kinematics::Jump
const
&
89
jump
()
const
{
return
jump_forward_
; }
90
91
core::kinematics::Jump
const
&
92
jump_forward
()
const
{
return
jump_forward_
; }
93
94
core::kinematics::Jump
const
&
95
jump_backward
()
const
{
return
jump_backward_
; }
96
97
std::string
const
&
98
atom_name1
()
const
{
return
atom_name1_
; }
99
100
std::string
const
&
101
atom_name2
()
const
{
return
atom_name2_
; }
102
103
private
:
104
core::kinematics::Jump
const
jump_forward_
;
105
core::kinematics::Jump
const
jump_backward_
;
106
std::string
const
atom_name1_
;
107
std::string
const
atom_name2_
;
108
};
109
110
typedef
utility::pointer::owning_ptr< RNA_PairingTemplate >
RNA_PairingTemplateOP
;
111
112
///////////////////////////////////////////////////////////////////////////////////
113
114
typedef
utility::vector1< RNA_PairingTemplateOP >
RNA_PairingTemplateList
;
115
typedef
std::map< BasePairType, RNA_PairingTemplateList >
RNA_PairingTemplateMap
;
116
117
///////////////////////////////////////////////////////////////////////////////////
118
class
RNA_JumpLibrary
:
public
utility::pointer::ReferenceCount
{
119
public
:
120
///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
121
virtual
~RNA_JumpLibrary
();
122
RNA_JumpLibrary
(
std::string
const
filename
){
read_jumps_from_file
( filename ); };
123
124
void
125
read_jumps_from_file
(
std::string
const
& jump_library_filename );
126
127
void
128
check_forward_backward
(
129
std::string
& atom_name,
130
bool
const
forward,
131
core::kinematics::Jump
& j,
132
RNA_PairingTemplateOP
const
&
t
)
const
;
133
134
core::kinematics::Jump
135
get_random_base_pair_jump
(
136
char
const
aa1,
137
char
const
aa2,
138
char
const
edge1,
139
char
const
edge2,
140
char
const
orientation,
141
std::string
& atom_name1,
142
std::string
& atom_name2,
143
bool
& success,
144
bool
const
forward1 =
true
,
145
bool
const
forward2 =
true
)
const
;
146
147
private
:
148
149
void
150
save_in_jump_library
(
core::Size
const
reschar1,
core::Size
const
reschar2,
151
char
const
edgechar1,
char
const
edgechar2,
152
char
const
orientation,
153
std::string
const
& atom_name1,
154
std::string
const
& atom_name2,
155
core::kinematics::Jump
const
& jump1,
156
core::kinematics::Jump
const
& jump2 );
157
158
159
RNA_PairingTemplateMap
rna_pairing_template_map_
;
160
161
};
162
163
typedef
utility::pointer::owning_ptr< RNA_JumpLibrary >
RNA_JumpLibraryOP
;
164
165
}
//rna
166
}
//protocols
167
168
#endif
Generated on Sat Jun 1 2013 12:09:57 for Rosetta 3.5 by
1.8.4