OpenStructure
torsion_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-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 TORSION_IMPL_HH
20 #define TORSION_IMPL_HH
21 
22 #include <boost/enable_shared_from_this.hpp>
23 
24 #include <ost/mol/module_config.hh>
25 #include <ost/geom/geom.hh>
26 
27 #include "torsion_impl_fw.hh"
28 #include "connector_impl_fw.hh"
29 #include "atom_impl_fw.hh"
31 #include "dihedral.hh"
32 namespace ost { namespace mol { namespace impl {
33 
35 class TorsionImpl: public Dihedral,
36  public boost::enable_shared_from_this<TorsionImpl> {
37 public:
38  TorsionImpl(const String& name,
39  const AtomImplPtr& atom1,
40  const AtomImplPtr& atom2,
41  const AtomImplPtr& atom3,
42  const AtomImplPtr& atom4);
43 
44  void Apply(EntityVisitor& h);
45 
46  const String& GetName() const;
47 
48  Real GetAngle() const;
49 
50  void SetAngle(Real a, bool up);
51 
52  void RotateAngle(Real angle, bool up);
53 private:
54  String name_;
55  ConnectorImplW conn2_;
56 };
57 
58 }}} // ns
59 
60 #endif
EntityVisitor interface.
Low level dihedral implementation.
Definition: dihedral.hh:31
void Apply(EntityVisitor &h)
void RotateAngle(Real angle, bool up)
void SetAngle(Real a, bool up)
const String & GetName() const
TorsionImpl(const String &name, const AtomImplPtr &atom1, const AtomImplPtr &atom2, const AtomImplPtr &atom3, const AtomImplPtr &atom4)
float Real
Definition: base.hh:44
std::string String
Definition: base.hh:54
boost::shared_ptr< AtomImpl > AtomImplPtr
Definition: atom_impl_fw.hh:33
boost::weak_ptr< ConnectorImpl > ConnectorImplW
Definition: base.dox:1