OpenStructure
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
#include <
ost/mol/chem_type.hh
>
38
39
#include <
ost/generic_property.hh
>
40
#include <
ost/mol/property_id.hh
>
41
42
namespace
ost {
namespace
mol {
namespace
impl {
43
44
47
class
ResidueImpl
:
public
GenericPropContainerImpl
,
48
public
boost::enable_shared_from_this<ResidueImpl>
49
50
{
51
public
:
52
ResidueImpl
(
const
EntityImplPtr
& ent,
const
ChainImplPtr
& ch,
53
const
ResNum
& num,
const
ResidueKey
& key);
54
55
AtomImplPtr
InsertAtom
(
const
String
& name,
const
geom::Vec3
& pos,
56
const
String
& ele);
59
AtomImplPtr
InsertAtom
(
const
AtomImplPtr
& atom);
60
AtomImplPtr
InsertAltAtom
(
const
String
& name,
const
String
& alt_group,
61
const
geom::Vec3
& pos,
const
String
& ele,
62
Real
occ,
Real
b_factor);
63
const
ResNum
&
GetNumber
()
const
{
return
num_;}
64
void
SetNumber
(
const
ResNum
& num) {num_=num;}
65
66
const
ResidueKey
&
GetKey
()
const
{
67
return
key_;
68
}
69
70
void
SetKey
(
const
ResidueKey
& key) {
71
key_=key;
72
}
73
74
ChainImplPtr
GetChain
()
const
;
75
76
AtomImplPtr
GetCentralAtom
()
const
;
83
void
SetCentralAtom
(
const
AtomImplPtr
& a);
84
85
geom::Vec3
GetCentralNormal
()
const
;
86
87
char
GetOneLetterCode
()
const
;
88
89
void
SetOneLetterCode
(
const
char
olc);
90
97
AtomImplPtr
FindAtom
(
const
String
& aname)
const
;
98
99
void
Apply
(
EntityVisitor
& v);
100
102
int
GetAtomCount
()
const
;
103
105
int
GetBondCount
()
const
;
106
107
EntityImplPtr
GetEntity
()
const
;
108
113
TorsionImplP
GetPhiTorsion
()
const
;
114
119
TorsionImplP
GetOmegaTorsion
()
const
;
120
125
TorsionImplP
GetPsiTorsion
()
const
;
126
129
SecStructure
GetSecStructure
()
const
;
130
132
void
SetSecStructure
(
SecStructure
ss);
133
134
const
AtomImplList
&
GetAtomList
()
const
;
135
136
AtomImplList
&
GetAtomList
() {
137
return
atom_list_;
138
}
139
140
Real
GetMass
()
const
;
141
geom::Vec3
GetCenterOfMass
()
const
;
142
geom::Vec3
GetCenterOfAtoms
()
const
;
143
144
geom::AlignedCuboid
GetBounds
()
const
;
145
146
147
void
DeleteAtom
(
const
AtomImplPtr
& atom);
148
void
DeleteAtoms
(
const
String
& atom_name);
149
void
DeleteAllAtoms
();
150
151
void
AddTorsion
(
const
TorsionImplP
& torsion);
152
153
const
TorsionImplList
&
GetTorsionList
()
const
{
154
return
torsion_list_;
155
}
157
bool
HasAltAtomGroup
(
const
String
& group)
const
;
158
159
std::vector<String>
GetAltAtomGroupNames
()
const
;
160
161
std::vector<String>
GetAltAtomGroupNames
(
const
AtomImplPtr
& atom)
const
;
162
bool
HasAltAtoms
()
const
;
163
165
Real
GetAverageBFactor
()
const
;
166
167
bool
SwitchAtomPos
(
const
String
& group);
168
169
void
AddAltAtomPos
(
const
String
& group,
170
const
AtomImplPtr
& atom,
171
const
geom::Vec3
& position,
172
Real
occ,
Real
b_factor);
173
geom::Vec3
GetAltAtomPos
(
const
AtomImplPtr
& atom,
const
String
& group)
const
;
174
Real
GetAltAtomOcc
(
const
AtomImplPtr
& atom,
const
String
& group)
const
;
175
Real
GetAltAtomBFactor
(
const
AtomImplPtr
& atom,
const
String
& group)
const
;
176
177
178
const
String
&
GetCurrentAltGroupName
()
const
{
179
return
curr_group_;
180
}
181
int
GetIndex
()
const
;
182
186
String
GetQualifiedName
()
const
;
187
189
const
String
&
GetName
()
const
{
190
return
key_;
191
}
192
194
TorsionImplList
&
GetTorsionList
() {
195
return
torsion_list_;
196
}
197
198
void
SetChemClass
(
ChemClass
cc) {
199
chem_class_=cc;
200
}
201
ChemClass
GetChemClass
()
const
{
202
return
chem_class_;
203
}
204
ChemType
GetChemType
()
const
{
205
return
chem_type_;
206
}
207
void
SetChemType
(
ChemType
ct) {
208
chem_type_=ct;
209
}
210
211
TorsionImplP
FindTorsion
(
const
String
& torsion_name)
const
;
212
213
214
String
GetStringProperty
(
Prop::ID
prop_id)
const
;
215
216
Real
GetFloatProperty
(
Prop::ID
prop_id)
const
;
217
218
int
GetIntProperty
(
Prop::ID
prop_id)
const
;
219
220
void
SetProtein
(
bool
protein) { protein_=protein; }
221
222
bool
IsProtein
()
const
{
return
protein_; }
223
224
bool
IsLigand
()
const
{
return
ligand_; }
225
void
SetIsLigand
(
bool
flag) { ligand_=flag; }
226
227
void
UpdateTransformedPos
();
228
229
private
:
230
void
AddAltAtom(
const
String
& group,
const
AtomImplPtr
& atom,
231
const
geom::Vec3
& position,
Real
occ,
Real
b_factor);
232
void
RemoveAltPositionsForAtom(
const
AtomImplPtr
& atom);
233
234
String
curr_group_;
235
AtomEntryGroups
alt_groups_;
236
EntityImplW
ent_;
237
ChainImplW
chain_;
238
ResNum
num_;
239
ResidueKey
key_;
240
AtomImplList
atom_list_;
241
TorsionImplList
torsion_list_;
242
SecStructure
sec_structure_;
243
ChemClass
chem_class_;
244
ChemType
chem_type_;
245
char
olc_;
246
// whether the residue is part of the protein.
247
// TODO: this should be fixed to be a enum'ed type aka
248
// RESIDUE_TYPE type_;
249
// where enum is one of protein, ligand, dna, lipid, etc
250
bool
protein_;
251
bool
ligand_;
252
AtomImplPtr
central_atom_;
253
254
};
255
256
}}}
// ns
257
258
#endif
259
Generated on Thu Mar 5 2015 15:19:06 for OpenStructure by
1.8.1.1