OpenStructure
xcs_editor.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-2020 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_XCS_EDITOR_HE
20 #define OST_XCS_EDITOR_HE
21 /*
22  Author: Marco Biasini
23  */
24 
25 #include <ost/mol/module_config.hh>
26 #include <ost/geom/geom.hh>
28 
29 #include "editor_base.hh"
30 
31 namespace ost { namespace mol {
32 
37 public:
38  friend class EntityHandle;
39 
42 
44 
45  XCSEditor(const XCSEditor& rhs);
46 
48 
51  void SetAtomOriginalPos(const AtomHandle& atom,
52  const geom::Vec3& position);
53 
58  float *positions);
59 
64  double *positions);
65 
70  const geom::Vec3& position);
71 
76  float *positions);
77 
82  double *positions);
83 
85  void SetAtomPos(const AtomHandle& atom,
86  const geom::Vec3& position);
87 
89  void SetAtomPos(const AtomHandleList& alist,
90  float *positions);
91 
93  void SetAtomPos(const AtomHandleList& alist,
94  double *positions);
95 
100  void ApplyTransform(const geom::Mat4& transform);
101  void ApplyTransform(const geom::Transform& transform);
102 
104  void SetTransform(const geom::Mat4& transform);
105  void SetTransform(const geom::Transform& transform);
106 
108  void FixTransform();
109 
111  void UpdateICS();
112 
115  void ForceUpdate();
116 
117 protected:
118  XCSEditor(const EntityHandle& ent, EditMode mode);
119 
120  void Update();
121 };
122 
123 }} //ns
124 
125 #endif
basic and essential transformation class, including translation, rotation and center of rotation
Definition: transform.hh:39
Three dimensional vector class, using Real precision.
Definition: vec3.hh:48
Handle to atom datatype.
Definition: atom_handle.hh:37
base class for entity editors
Definition: editor_base.hh:46
Protein or molecule.
external coordinate system editor
Definition: xcs_editor.hh:36
XCSEditor & operator=(const XCSEditor &rhs)
void SetAtomPos(const AtomHandleList &alist, double *positions)
same as SetTransformedPos(AtomHandleList,double*)
void SetAtomPos(const AtomHandle &atom, const geom::Vec3 &position)
same as SetAtomTransformedPos(AtomHandle, geom::Vec3)
void SetTransform(const geom::Mat4 &transform)
apply a new transformation to all atoms
XCSEditor(const XCSEditor &rhs)
void FixTransform()
set transformed pos to new original pos
void SetAtomTransformedPos(const AtomHandleList &alist, double *positions)
numpy double interface
XCSEditor()
create invalid xcs editor
void UpdateICS()
immediately update internal coordinate system
void ForceUpdate()
force spatial organizer and ics update workaround for delayed dtor call from Python garbage collectio...
void SetAtomPos(const AtomHandleList &alist, float *positions)
same as SetTransformedPos(AtomHandleList,float*)
void SetAtomOriginalPos(const AtomHandleList &alist, double *positions)
numpy double interface
void ApplyTransform(const geom::Mat4 &transform)
apply additional transformation to all atoms
void SetAtomTransformedPos(const AtomHandleList &alist, float *positions)
numpy float interface
void SetAtomOriginalPos(const AtomHandleList &alist, float *positions)
numpy float interface
void ApplyTransform(const geom::Transform &transform)
XCSEditor(const EntityHandle &ent, EditMode mode)
void SetAtomOriginalPos(const AtomHandle &atom, const geom::Vec3 &position)
set original position of atom This function also updates the stores transformed coordinates
void SetAtomTransformedPos(const AtomHandle &atom, const geom::Vec3 &position)
set transformed position of atom
void SetTransform(const geom::Transform &transform)
#define DLLEXPORT_OST_MOL
std::vector< AtomHandle > AtomHandleList
Definition: base.dox:1