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
atom_base.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_ATOM_BASE_HH
20
#define OST_ATOM_BASE_HH
21
22
#include <
ost/geom/vec3.hh
>
23
24
#include <
ost/mol/module_config.hh
>
25
#include <
ost/mol/impl/atom_impl_fw.hh
>
26
#include <
ost/generic_property.hh
>
27
28
#include "
property_id.hh
"
29
30
namespace
ost {
namespace
mol {
31
48
class
DLLEXPORT_OST_MOL
AtomBase
:
public
GenericPropContainer
<AtomBase> {
49
public
:
50
AtomBase
();
51
AtomBase
(
const
impl::AtomImplPtr
& impl);
52
public
:
54
55
56
57
58
59
60
61
operator
bool()
const
{
return
this->IsValid(); }
64
bool
IsValid
()
const
{
return
Impl().get()!=0; }
66
friend
class
ConstGenericPropContainer
<
AtomBase
>;
70
const
String
& GetName()
const
;
71
81
void
SetName(
const
String
& atom_name);
82
84
const
geom::Vec3
& GetPos()
const
;
85
87
const
geom::Vec3
& GetOriginalPos()
const
;
89
geom::Vec3
GetAltPos(
const
String
& alt_group)
const
;
90
Real
GetAltBFactor(
const
String
& alt_group)
const
;
91
Real
GetAltOcc(
const
String
& alt_group)
const
;
92
93
std::vector<String> GetAltGroupNames()
const
;
94
96
102
String
GetQualifiedName()
const
;
103
105
String
GetStringProperty(
Prop::ID
prop_id)
const
;
106
108
Real
GetFloatProperty(
Prop::ID
prop_id)
const
;
109
111
int
GetIntProperty(
Prop::ID
prop_id)
const
;
112
114
unsigned
long
GetIndex()
const
;
115
117
Real
GetRadius()
const
;
118
120
const
String
& GetElement()
const
;
121
123
bool
IsHetAtom()
const
;
124
128
Real
GetBFactor()
const
;
129
130
131
void
SetBFactor(
Real
factor);
132
133
void
SetOccupancy(
Real
occ);
134
135
136
void
SetCharge(
Real
charge);
137
138
void
SetMass(
Real
mass);
139
140
void
SetHetAtom(
bool
het);
141
142
void
SetRadius(
Real
radius);
143
144
void
SetIndex (
const
unsigned
long
index);
145
146
const
geom::Mat3
& GetAnisou()
const
;
147
148
void
SetAnisou(
const
geom::Mat3
& anisou);
152
Real
GetMass()
const
;
153
155
Real
GetCharge()
const
;
156
158
Real
GetOccupancy()
const
;
159
163
const
impl::AtomImplPtr
& Impl()
const
;
164
166
impl::AtomImplPtr
& Impl();
167
168
169
void
SetElement(
const
String
& element);
170
protected
:
171
172
GenericPropContainerImpl
* GpImpl();
173
174
const
GenericPropContainerImpl
* GpImpl()
const
;
175
176
void
CheckValidity()
const
;
177
impl::AtomImplPtr
impl_
;
178
};
179
180
DLLEXPORT_OST_MOL
std::ostream&
operator<<
(std::ostream& os,
181
const
AtomBase
& atom);
182
}}
// ns
183
184
#endif // OST_ATOM_BASE_HH
185
Generated on Mon Nov 11 2013 09:56:13 for OpenStructure by
1.8.1.1