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
core
chemical
Patch.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
//
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
11
/// @author Phil Bradley
12
// see Patch.cc to understand what's going on
13
14
#ifndef INCLUDED_core_chemical_Patch_hh
15
#define INCLUDED_core_chemical_Patch_hh
16
17
18
// // Unit headers
19
#include <
core/chemical/Patch.fwd.hh
>
20
21
// // Package headers
22
#include <
core/chemical/PatchOperation.hh
>
23
#include <
core/chemical/ResidueSelector.hh
>
24
25
#include <utility/vector1.hh>
26
27
28
// Project headers
29
30
// Utility headers
31
// Commented by inclean daemon #include <utility/vector1.hh>
32
// Commented by inclean daemon #include <utility/pointer/owning_ptr.hh>
33
// Commented by inclean daemon #include <utility/pointer/ReferenceCount.hh>
34
35
// C++ headers
36
37
namespace
core {
38
namespace
chemical {
39
40
41
42
/// @brief the string used to create new residue names after patching
43
extern
std::string
const
patch_linker
;
44
45
/// @brief helper function, returns the base residue name prior to any patching
46
std::string
47
residue_type_base_name
( ResidueType
const
& rsd_type );
48
49
/// @brief helper function, returns the name of all added patches
50
std::string
51
residue_type_all_patches_name
( ResidueType
const
& rsd_type );
52
53
/// @brief A single case of a patch, eg proline Nterminus is a case of NtermProteinFull
54
class
PatchCase
:
public
utility::pointer::ReferenceCount
{
55
public
:
56
///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
57
virtual
~PatchCase
();
58
59
/// @brief whether the PatchCase is applicable to this ResidueType?
60
bool
61
applies_to
(
ResidueType
const
& rsd )
const
62
{
63
return
selector_
[ rsd ];
64
}
65
66
/// @brief returns patched residue, 0 if patch failed
67
virtual
68
ResidueTypeOP
69
apply
(
ResidueType
const
& rsd_in )
const
;
70
71
/// @brief add one more operation in this PatchCase
72
void
73
add_operation
(
PatchOperationOP
operation )
74
{
75
operations_
.push_back( operation );
76
}
77
78
/// @brief to which ResidueTypes this PatchCase applies to?
79
ResidueSelector
&
80
selector
()
81
{
82
return
selector_
;
83
}
84
85
86
// data:
87
private
:
88
/// @brief to which ResidueTypes this PatchCase applies to?
89
ResidueSelector
selector_
;
90
/// @brief operations to done in this PatchCase
91
utility::vector1< PatchOperationOP >
operations_
;
92
93
};
94
95
96
////////////////////////////////////////////////////////////////////////////////////////
97
/// @brief A class patching basic ResidueType to create variant types, containing multiple PatchCase
98
class
Patch
:
public
utility::pointer::ReferenceCount
{
99
public
:
100
///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
101
virtual
~Patch
();
102
/// @brief constructor from file
103
void
104
read_file
(
std::string
const
&
filename
);
105
106
/// can I operate on this residue type?
107
virtual
108
bool
109
applies_to
(
ResidueType
const
& rsd )
const
110
{
111
return
selector_
[ rsd ];
112
}
113
114
/// do I replace this residue type?
115
virtual
116
bool
117
replaces
(
ResidueType
const
& rsd )
const
118
{
119
return
applies_to
( rsd ) &&
replaces_residue_type_
;
120
}
121
122
/// @brief returns patched residue, 0 if patch failed
123
virtual
124
ResidueTypeOP
125
apply
(
ResidueType
const
& rsd_type )
const
;
126
127
128
/// @brief unique name of this patch, eg Nter-simple, Cter-full, Phospho, ... ?
129
virtual
130
std::string
const
&
131
name
()
const
132
{
133
return
name_
;
134
}
135
136
/// @brief the variant types created by applying this patch
137
virtual
138
utility::vector1< VariantType >
const
&
139
types
()
const
140
{
141
return
types_
;
142
}
143
144
/// private data
145
private
:
146
/// name of the patch
147
std::string
name_
;
148
149
/// @brief variant types created by the patch
150
utility::vector1< VariantType >
types_
;
151
152
/// @brief criteria to select ResidueTypes to which the patch is applied
153
ResidueSelector
selector_
;
154
155
/// @brief different cases to which the patch is applied slightly differently, e.g., N-terminus patch to PRO and GLY
156
utility::vector1< PatchCaseOP >
cases_
;
157
158
/// @brief if set this patch will not change the name of the ResidueType and returns true for replaces()
159
bool
replaces_residue_type_
;
160
161
};
162
163
164
165
}
// chemical
166
}
// core
167
168
169
170
#endif
Generated on Sat Jun 1 2013 11:31:36 for Rosetta 3.5 by
1.8.4