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
coord_group.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_COORD_GROUP_HH
20
#define OST_COORD_GROUP_HH
21
22
/*
23
Author: Ansgar Philippsen, Marco Biasini
24
*/
25
26
#include <vector>
27
#include <boost/shared_array.hpp>
28
#include "
atom_handle.hh
"
29
#include "
coord_source.hh
"
30
31
namespace
geom {
32
// we should really have fw headers...
33
class
Transform
;
34
}
35
36
namespace
ost {
namespace
mol {
37
39
class
DLLEXPORT_OST_MOL
CoordGroupHandle
{
40
public
:
42
CoordGroupHandle
();
44
CoordGroupHandle
(
CoordSourcePtr
source);
45
47
EntityHandle
GetEntity()
const
;
48
49
//EntityGroupHandle ExtractFromTo(int start, int end, int step=1);
50
//EntityGroupHandle ExtractEvery(int step, int start=0);
51
53
uint
GetAtomCount()
const
;
54
56
uint
GetFrameCount()
const
;
57
59
float
GetDelta()
const
;
60
62
void
SetDelta(
float
d);
63
65
float
GetStartTime()
const
;
66
68
void
SetStartTime(
float
t);
69
72
void
SetFramePositions(
uint
frame,
const
std::vector<geom::Vec3>& clist);
73
75
geom::Vec3List
GetFramePositions(
uint
frame);
76
78
void
CopyFrame(
uint
frame);
79
81
void
Capture();
82
83
void
CaptureInto(
int
pos);
84
86
void
Capture(
uint
frame);
87
89
//void AddFrame(const std::vector<geom::Vec3>& clist);
90
void
AddFrame(
const
geom::Vec3List
& clist);
91
void
AddFrame(
const
geom::Vec3List
& clist,
const
geom::Vec3
& cell_size,
const
geom::Vec3
& cell_angles);
92
93
void
AddFrames(
const
CoordGroupHandle
& cg);
95
void
SetAtomPos(
uint
frame,
AtomHandle
atom,
const
geom::Vec3
& pos);
96
98
geom::Vec3
GetAtomPos(
uint
frame,
AtomHandle
atom)
const
;
99
101
bool
IsValid()
const
;
102
104
operator
bool()
const
;
105
106
AtomHandleList
GetAtomList()
const
;
107
CoordFramePtr
GetFrame(
uint
frame)
const
;
108
CoordFrame
GetFrame2(
uint
frame);
109
112
CoordGroupHandle
Filter(
const
EntityView
& selected,
int
first=0,
int
last=-1)
const
;
113
115
void
ApplyTransform(
const
geom::Transform
& tf);
116
117
118
private
:
119
void
CheckValidity()
const
;
120
CoordSourcePtr
source_;
121
};
122
123
// factory method
124
// create with a reference set of atoms and zero frames
125
DLLEXPORT_OST_MOL
CoordGroupHandle
CreateCoordGroup
(
const
AtomHandleList
& atoms);
126
127
}}
// ns
128
129
#endif
Generated on Mon Nov 11 2013 09:56:13 for OpenStructure by
1.8.1.1