OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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-2011 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:
56  ResidueHandle();
57 
60  : ResidueBase(impl) {}
61  EntityHandle GetEntity() const;
62 
64  double GetMass() const;
65 
67  geom::Vec3 GetCenterOfMass() const;
68 
73  geom::Vec3 GetCenterOfAtoms() const;
74 
76  geom::AlignedCuboid GetBounds() const;
77 
79  ChainHandle GetChain() const;
80 
83  ResidueHandle GetPrev() const;
84 
87  ResidueHandle GetNext() const;
88 
92  AtomHandle FindAtom(const String& aname) const;
93 
98  void Apply(EntityVisitor& visitor);
99 
103  AtomHandleList GetAtomList() const;
104 
106  int GetAtomCount() const;
107 
113  int GetBondCount() const;
114 
124  TorsionHandle FindTorsion(const String& torsion_name) const;
125 
127  TorsionHandleList GetTorsionList() const;
128 
130  int GetIndex() const;
131 
138 
139 
140 
141  bool HasAltAtomGroup(const String& group) const;
142 
147  const String& GetCurrentAltGroupName() const;
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 
172  ResidueHandle GetHandle() const;
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 
194 bool DLLEXPORT_OST_MOL InSequence(const ResidueHandle& residue_one,
195  const ResidueHandle& residue_two);
196 
197 
198 }} //ns
199 
200 #endif // OST_RESIDUE_HANDLE_HH
201