OpenStructure
ics_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_ICS_EDITOR_HE
20 #define OST_ICS_EDITOR_HE
21 /*
22  Author: Marco Biasini
23  */
24 
25 #include <ost/mol/module_config.hh>
26 #include <ost/geom/geom.hh>
27 
28 #include "handle_type_fw.hh"
29 #include "editor_base.hh"
30 namespace ost { namespace mol {
31 
35 public:
36  friend class EntityHandle;
38 protected:
39  ICSEditor(const EntityHandle& ent, EditMode mode);
40 
41  void Update();
42 public:
43  ICSEditor(const ICSEditor& rhs);
44 
46 
55  void SetBondLength(const BondHandle& bond, Real length);
56 
66 
67  bool SetAngle(const AtomHandle& atom_a, const AtomHandle& atom_b,
68  const AtomHandle& atom_c, Real angle);
69 
77  void SetTorsionAngle(TorsionHandle torsion, Real angle,
78  bool update_others=true);
80  void RotateTorsionAngle(TorsionHandle torsion, Real delta,
81  bool update_others=true);
82 
83  void RotateTorsionAngle(const AtomHandle& atom_a,
84  const AtomHandle& atom_b,
85  const AtomHandle& atom_c,
86  const AtomHandle& atom_d,
87  Real angle,
88  bool update_others=true);
89 
90  void SetTorsionAngle(const AtomHandle& atom_a, const AtomHandle& atom_b,
91  const AtomHandle& atom_c, const AtomHandle& atom_d,
92  Real angle, bool update_others=true);
93 
95  void UpdateXCS();
96 };
97 
98 }} // ns
99 
105 #endif
Handle to atom datatype.
Definition: atom_handle.hh:37
chemical bond
Definition: bond_handle.hh:35
base class for entity editors
Definition: editor_base.hh:46
Protein or molecule.
editor for internal molecule coordinates
Definition: ics_editor.hh:34
void RotateTorsionAngle(const AtomHandle &atom_a, const AtomHandle &atom_b, const AtomHandle &atom_c, const AtomHandle &atom_d, Real angle, bool update_others=true)
void SetTorsionAngle(TorsionHandle torsion, Real angle, bool update_others=true)
set absolute torsion angle
void UpdateXCS()
immediately update external coordinate system
void SetBondLength(const BondHandle &bond, Real length)
set the lengh of the bond, ie the distance of the second atom from the first
void RotateTorsionAngle(TorsionHandle torsion, Real delta, bool update_others=true)
rotate torsion angle
ICSEditor & operator=(const ICSEditor &rhs)
ICSEditor(const EntityHandle &ent, EditMode mode)
bool SetAngle(const AtomHandle &atom_a, const AtomHandle &atom_b, const AtomHandle &atom_c, Real angle)
Set angle of vectors formed by a12 and a13 to the given value.
void SetTorsionAngle(const AtomHandle &atom_a, const AtomHandle &atom_b, const AtomHandle &atom_c, const AtomHandle &atom_d, Real angle, bool update_others=true)
ICSEditor(const ICSEditor &rhs)
Named torsion (dihedral) angle.
float Real
Definition: base.hh:44
#define DLLEXPORT_OST_MOL
Definition: base.dox:1