OpenStructure
residue_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_RESIDUE_HANDLE_HU
20 #define OST_RESIDUE_HANDLE_HU
21 
22 #include <ost/geom/vec3.hh>
24 
25 #include <ost/mol/query.hh>
26 #include <ost/mol/module_config.hh>
27 #include <ost/mol/residue_base.hh>
29 
30 namespace ost { namespace mol {
31 
55 public:
57 
60  : ResidueBase(impl) {}
62 
64  double GetMass() const;
65 
68 
74 
77 
80 
84 
88 
92  AtomHandle FindAtom(const String& aname) const;
93 
98  void Apply(EntityVisitor& visitor);
99 
104 
106  int GetAtomCount() const;
107 
113  int GetBondCount() const;
114 
124  TorsionHandle FindTorsion(const String& torsion_name) const;
125 
128 
130  int GetIndex() const;
131 
138 
139  bool HasAltAtomGroup(const String& group) const;
142 
148 
150  std::vector<String> GetAltAtomGroupNames() const;
151 
153  bool HasAltAtoms() const;
154 
158  geom::Vec3 GetAltAtomPos(const AtomHandle& atom, const String& group) const;
159 
166  bool SwitchAtomPos(const String& group);
168 
173  unsigned long GetHashCode() const;
174 
177  EntityView Select(const Query& q, QueryFlags flags=0) const;
178 
181  EntityView Select(const String& query_string, QueryFlags flags=0) const;
182 
183  bool operator==(const ResidueHandle& ref) const;
184  bool operator!=(const ResidueHandle& ref) const;
185 
186 
187 
188 };
189 
195  const ResidueHandle& residue_two);
196 
197 
198 }} //ns
199 
200 #endif // OST_RESIDUE_HANDLE_HH
201 
axis-aligned cuboid
Three dimensional vector class, using Real precision.
Definition: vec3.hh:48
Handle to atom datatype.
Definition: atom_handle.hh:37
linear chain of residues
Definition: chain_handle.hh:52
Protein or molecule.
definition of EntityView
Definition: entity_view.hh:86
EntityVisitor interface.
Selection Query.
Definition: query.hh:74
base class for ResidueHandle and ResidueView
Definition: residue_base.hh:66
ResidueHandle GetPrev() const
Get previous residue in chain.
TorsionHandle FindTorsion(const String &torsion_name) const
Find torsion by name.
EntityView Select(const Query &q, QueryFlags flags=0) const
return view based on a query object
TorsionHandleList GetTorsionList() const
Get list of all torsion angles of this residue.
std::vector< String > GetAltAtomGroupNames() const
Get names of alternative atom groups.
ResidueHandle GetHandle() const
get this handle
geom::Vec3 GetAltAtomPos(const AtomHandle &atom, const String &group) const
Get alternative atom position for given atom.
bool SwitchAtomPos(const String &group)
switch atoms that have alternative positions to the position in the group. Atoms that do not have an ...
double GetMass() const
Get residue's mass.
bool operator!=(const ResidueHandle &ref) const
void Apply(EntityVisitor &visitor)
Apply entity visitor.
EntityHandle GetEntity() const
ResidueHandle(const impl::ResidueImplPtr &impl)
geom::AlignedCuboid GetBounds() const
get axis-aligned bounding box of residue
const String & GetCurrentAltGroupName() const
Name of active alternative atom group.
int GetAtomCount() const
Get number of atoms of this residue.
geom::Vec3 GetCenterOfMass() const
Get residue's center of mass (mass weighted)
unsigned long GetHashCode() const
int GetBondCount() const
Get number of bonds of this residue. This method might NOT work as expected (see warning below).
AtomHandleList GetAtomList() const
Get number of atoms of this residue.
bool operator==(const ResidueHandle &ref) const
geom::Vec3 GetCenterOfAtoms() const
Get residue's center of atoms (not mass weighted)
bool HasAltAtoms() const
Test if the residue has any alternative atom positions.
int GetIndex() const
Get position of residue in chain.
EntityView Select(const String &query_string, QueryFlags flags=0) const
return view based on query String.
ChainHandle GetChain() const
The chain this residue is attached to.
ResidueHandle GetNext() const
Get next residue in chain.
AtomHandle FindAtom(const String &aname) const
Find atom by name.
Named torsion (dihedral) angle.
std::string String
Definition: base.hh:54
#define DLLEXPORT_OST_MOL
boost::shared_ptr< ResidueImpl > ResidueImplPtr
std::vector< AtomHandle > AtomHandleList
bool DLLEXPORT_OST_MOL InSequence(const ResidueHandle &residue_one, const ResidueHandle &residue_two)
Test if two residues are in next in sequence.
uint QueryFlags
Definition: query.hh:69
std::vector< TorsionHandle > TorsionHandleList
Definition: base.dox:1