OpenStructure
Loading...
Searching...
No Matches
torsion_handle.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_TORSION_HANDLE_HH
20#define OST_TORSION_HANDLE_HH
21
24
26
27namespace ost { namespace mol {
28
45public:
50
52
53
59 operator bool() const;
62 bool IsValid() const;
64
67
68 const String& GetName() const;
69
71
72
81
84 Real GetAngle() const;
89
91 return impl_;
92 }
93
94 const impl::TorsionImplP& Impl() const {
95 return impl_;
96 }
97protected:
98 void CheckValidity() const;
99private:
100 impl::TorsionImplP impl_;
101};
102
104 const AtomHandle& a2,
105 const AtomHandle& a3,
106 const AtomHandle& a4);
107
108DLLEXPORT_OST_MOL std::ostream& operator<<(std::ostream& os,
109 const TorsionHandle& torsion);
110
111}} // ns
112
113#endif
Three dimensional vector class, using Real precision.
Definition vec3.hh:48
Handle to atom datatype.
EntityVisitor interface.
Named torsion (dihedral) angle.
Real GetAngle() const
get dihedral angle based on whatever coordinate system is available
TorsionHandle(const impl::TorsionImplP &im)
ctor for internal use, in public interface for convenience purposes
const String & GetName() const
geom::Vec3 GetOriginalPos() const
get position, i.e midpoint between the second and third atom (original coordinates)
const impl::TorsionImplP & Impl() const
geom::Vec3 GetPos() const
get position, i.e midpoint between the second and third atom (transformed coordinates)
TorsionHandle()
necessary dummy ctor, creates invalid handle
void CheckValidity() const
impl::TorsionImplP & Impl()
AtomHandle GetSecond() const
return second atom
AtomHandle GetFourth() const
return fourth atom
void Apply(EntityVisitor &v)
entry point for entity visitor
bool IsValid() const
check validity of handle
AtomHandle GetThird() const
return third atom
AtomHandle GetFirst() const
return first atom
float Real
Definition base.hh:44
std::string String
Definition base.hh:54
#define DLLEXPORT_OST_MOL
boost::shared_ptr< TorsionImpl > TorsionImplP
Real DLLEXPORT_OST_MOL DihedralAngle(const AtomHandle &a1, const AtomHandle &a2, const AtomHandle &a3, const AtomHandle &a4)
DLLEXPORT_OST_MOL std::ostream & operator<<(std::ostream &os, const AtomBase &atom)
Definition base.dox:1