OpenStructure
Loading...
Searching...
No Matches
bond_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_BOND_HANDLE_HE
20#define OST_BOND_HANDLE_HE
21
25
27
28namespace ost { namespace mol {
29
35 public GenericPropContainer<BondHandle> {
36public:
42
44
45
51 operator bool() const;
52
55 bool IsValid() const;
57
61
63
64
72
76
81
84
87
89 Real GetLength() const;
90
93 unsigned char GetBondOrder() const;
94
97 void SetBondOrder(unsigned char bo);
98
100 unsigned long GetHashCode() const;
101
102 bool operator==(const BondHandle& rhs) const;
103 bool operator!=(const BondHandle& rhs) const;
104
105 const impl::ConnectorImplP& Impl() const {
106 return impl_;
107 }
108
110 return impl_;
111 }
112
113protected:
114
116
118 void CheckValidity() const;
119private:
121};
122
133
134typedef std::vector<BondHandle> BondHandeList;
135
136DLLEXPORT_OST_MOL std::ostream& operator<<(std::ostream& os,
137 const BondHandle& bond);
138
139
140}} // ns
141
142#endif
Three dimensional vector class, using Real precision.
Definition vec3.hh:48
base class for the handler classes
base class for the implementation
Handle to atom datatype.
geom::Vec3 GetOriginalPos() const
return midpoint between the two atoms (original coordinates)
geom::Vec3 GetPos() const
return midpoint between the two atoms (transformed coordinates)
const impl::ConnectorImplP & Impl() const
void CheckValidity() const
Real GetLength() const
return the length of the bond
void SetBondOrder(unsigned char bo)
set the bond order ((1) single, (2) double, (3) triple, (4) aromatic)
AtomHandle GetOther(const AtomHandle &a) const
get other atom Returns one of the two atoms that does not match the given one.
unsigned char GetBondOrder() const
get the bond order ((1) single, (2) double, (3) triple, (4) aromatic)
bool DLLEXPORT_OST_MOL BondExists(const AtomHandle &a, const AtomHandle &b)
check whether a bond exists, that connects the two atom handles.
AtomHandle GetSecond() const
get second atom In python also available as the property second
bool operator!=(const BondHandle &rhs) const
unsigned long GetHashCode() const
unique bond id
impl::ConnectorImplP & Impl()
void Apply(EntityVisitor &v)
entry point for entity visitor
BondHandle(const impl::ConnectorImplP &im)
ctor for internal use, in public interface for convenience purposes
BondHandle()
necessary dummy ctor, creates invalid handle
bool operator==(const BondHandle &rhs) const
bool IsValid() const
check validity of handle
GenericPropContainerImpl * GpImpl()
void Apply(EntityViewVisitor &v)
const GenericPropContainerImpl * GpImpl() const
AtomHandle GetFirst() const
Get first atom In python also available as the property first.
EntityViewVisitor interface.
EntityVisitor interface.
float Real
Definition base.hh:44
#define DLLEXPORT_OST_MOL
boost::shared_ptr< ConnectorImpl > ConnectorImplP
std::vector< BondHandle > BondHandeList
DLLEXPORT_OST_MOL std::ostream & operator<<(std::ostream &os, const AtomBase &atom)
Definition base.dox:1