OpenStructure
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
stage
include
ost
mol
impl
residue_impl.hh
Go to the documentation of this file.
1
//------------------------------------------------------------------------------
2
// This file is part of the OpenStructure project <www.openstructure.org>
3
//
4
// Copyright (C) 2008-2011 by the OpenStructure authors
5
//
6
// This library is free software; you can redistribute it and/or modify it under
7
// the terms of the GNU Lesser General Public License as published by the Free
8
// Software Foundation; either version 3.0 of the License, or (at your option)
9
// any later version.
10
// This library is distributed in the hope that it will be useful, but WITHOUT
11
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13
// details.
14
//
15
// You should have received a copy of the GNU Lesser General Public License
16
// along with this library; if not, write to the Free Software Foundation, Inc.,
17
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
//------------------------------------------------------------------------------
19
#ifndef OST_RESIDUE_IMPL_HH
20
#define OST_RESIDUE_IMPL_HH
21
22
#include <boost/enable_shared_from_this.hpp>
23
24
#include <
ost/geom/geom.hh
>
25
26
#include <
ost/mol/residue_prop.hh
>
27
#include <
ost/mol/entity_visitor_fw.hh
>
28
29
#include <
ost/mol/impl/residue_impl_fw.hh
>
30
#include <
ost/mol/impl/atom_impl_fw.hh
>
31
#include <
ost/mol/impl/chain_impl_fw.hh
>
32
#include <
ost/mol/impl/entity_impl_fw.hh
>
33
#include <
ost/mol/sec_structure.hh
>
34
#include <
ost/mol/impl/torsion_impl_fw.hh
>
35
#include <
ost/mol/impl/atom_group.hh
>
36
#include <
ost/mol/chem_class.hh
>
37
38
#include <
ost/generic_property.hh
>
39
#include <
ost/mol/property_id.hh
>
40
41
namespace
ost {
namespace
mol {
namespace
impl {
42
43
46
class
ResidueImpl
:
public
GenericPropContainerImpl
,
47
public
boost::enable_shared_from_this<ResidueImpl>
48
49
{
50
public
:
51
ResidueImpl
(
const
EntityImplPtr
& ent,
const
ChainImplPtr
& ch,
52
const
ResNum
& num,
const
ResidueKey
& key);
53
54
AtomImplPtr
InsertAtom
(
const
String
& name,
const
geom::Vec3
& pos,
55
const
String
& ele);
58
AtomImplPtr
InsertAtom
(
const
AtomImplPtr
& atom);
59
AtomImplPtr
InsertAltAtom
(
const
String
& name,
const
String
& alt_group,
60
const
geom::Vec3
& pos,
const
String
& ele);
61
const
ResNum
&
GetNumber
()
const
{
return
num_;}
62
void
SetNumber
(
const
ResNum
& num) {num_=num;}
63
64
const
ResidueKey
&
GetKey
()
const
{
65
return
key_;
66
}
67
68
void
SetKey
(
const
ResidueKey
& key) {
69
key_=key;
70
}
71
72
ChainImplPtr
GetChain
()
const
;
73
74
AtomImplPtr
GetCentralAtom
()
const
;
75
76
geom::Vec3
GetCentralNormal
()
const
;
77
78
char
GetOneLetterCode
()
const
;
79
80
void
SetOneLetterCode
(
const
char
olc);
81
88
AtomImplPtr
FindAtom
(
const
String
& aname)
const
;
89
90
void
Apply
(
EntityVisitor
& v);
91
93
int
GetAtomCount
()
const
;
94
96
int
GetBondCount
()
const
;
97
98
EntityImplPtr
GetEntity
()
const
;
99
104
TorsionImplP
GetPhiTorsion
()
const
;
105
110
TorsionImplP
GetOmegaTorsion
()
const
;
111
116
TorsionImplP
GetPsiTorsion
()
const
;
117
120
SecStructure
GetSecStructure
()
const
;
121
123
void
SetSecStructure
(
SecStructure
ss);
124
125
const
AtomImplList
&
GetAtomList
()
const
;
126
127
AtomImplList
&
GetAtomList
() {
128
return
atom_list_;
129
}
130
131
Real
GetMass
()
const
;
132
geom::Vec3
GetCenterOfMass
()
const
;
133
geom::Vec3
GetCenterOfAtoms
()
const
;
134
135
geom::AlignedCuboid
GetBounds
()
const
;
136
137
138
void
DeleteAtom
(
const
AtomImplPtr
& atom);
139
void
DeleteAtoms
(
const
String
& atom_name);
140
void
DeleteAllAtoms
();
141
142
void
AddTorsion
(
const
TorsionImplP
& torsion);
143
144
const
TorsionImplList
&
GetTorsionList
()
const
{
145
return
torsion_list_;
146
}
148
bool
HasAltAtomGroup
(
const
String
& group)
const
;
149
150
std::vector<String>
GetAltAtomGroupNames
()
const
;
151
152
std::vector<String>
GetAltAtomGroupNames
(
const
AtomImplPtr
& atom)
const
;
153
bool
HasAltAtoms
()
const
;
154
156
Real
GetAverageBFactor
()
const
;
157
158
bool
SwitchAtomPos
(
const
String
& group);
159
160
void
AddAltAtomPos
(
const
String
& group,
161
const
AtomImplPtr
& atom,
162
const
geom::Vec3
& position);
163
geom::Vec3
GetAltAtomPos
(
const
AtomImplPtr
& atom,
const
String
& group)
const
;
164
165
166
const
String
&
GetCurrentAltGroupName
()
const
{
167
return
curr_group_;
168
}
169
int
GetIndex
()
const
;
170
174
String
GetQualifiedName
()
const
;
175
177
const
String
&
GetName
()
const
{
178
return
key_;
179
}
180
182
TorsionImplList
&
GetTorsionList
() {
183
return
torsion_list_;
184
}
185
186
void
SetChemClass
(
ChemClass
cc) {
187
chem_class_=cc;
188
}
189
ChemClass
GetChemClass
()
const
{
190
return
chem_class_;
191
}
192
193
TorsionImplP
FindTorsion
(
const
String
& torsion_name)
const
;
194
195
196
String
GetStringProperty
(
Prop::ID
prop_id)
const
;
197
198
Real
GetFloatProperty
(
Prop::ID
prop_id)
const
;
199
200
int
GetIntProperty
(
Prop::ID
prop_id)
const
;
201
202
void
SetProtein
(
bool
protein) { protein_=protein; }
203
204
bool
IsProtein
()
const
{
return
protein_; }
205
206
bool
IsLigand
()
const
{
return
ligand_; }
207
void
SetIsLigand
(
bool
flag) { ligand_=flag; }
208
private
:
209
void
AddAltAtom(
const
String
& group,
const
AtomImplPtr
& atom,
210
const
geom::Vec3
& position);
211
void
RemoveAltPositionsForAtom(
const
AtomImplPtr
& atom);
212
String
curr_group_;
213
AtomEntryGroups
alt_groups_;
214
EntityImplW
ent_;
215
ChainImplW
chain_;
216
ResNum
num_;
217
ResidueKey
key_;
218
AtomImplList
atom_list_;
219
TorsionImplList
torsion_list_;
220
SecStructure
sec_structure_;
221
ChemClass
chem_class_;
222
char
olc_;
223
// whether the residue is part of the protein.
224
bool
protein_;
225
bool
ligand_;
226
};
227
228
}}}
// ns
229
230
#endif
231
Generated on Thu Jun 14 2012 18:58:01 for OpenStructure by
1.8.1.1