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 #include <ost/mol/iterator_fw.hh>
30 
31 namespace ost { namespace mol {
32 
56 public:
57  ResidueHandle();
58 
61  : ResidueBase(impl) {}
62  EntityHandle GetEntity() const;
63 
65  double GetMass() const;
66 
68  geom::Vec3 GetCenterOfMass() const;
69 
74  geom::Vec3 GetCenterOfAtoms() const;
75 
77  geom::AlignedCuboid GetBounds() const;
78 
80  ChainHandle GetChain() const;
81 
84  ResidueHandle GetPrev() const;
85 
88  ResidueHandle GetNext() const;
89 
93  AtomHandle FindAtom(const String& aname) const;
94 
99  void Apply(EntityVisitor& visitor);
100 
104  AtomHandleList GetAtomList() const;
105 
107  int GetAtomCount() const;
108 
114  int GetBondCount() const;
115 
125  TorsionHandle FindTorsion(const String& torsion_name) const;
126 
128  TorsionHandleList GetTorsionList() const;
129 
131  int GetIndex() const;
132 
139 
140 
141 
142  bool HasAltAtomGroup(const String& group) const;
143 
148  const String& GetCurrentAltGroupName() const;
149 
151  std::vector<String> GetAltAtomGroupNames() const;
152 
154  bool HasAltAtoms() const;
155 
159  geom::Vec3 GetAltAtomPos(const AtomHandle& atom, const String& group) const;
160 
167  bool SwitchAtomPos(const String& group);
169 
176  AtomHandleIter AtomsBegin() const;
177 
181  ResidueHandle GetHandle() const;
182  unsigned long GetHashCode() const;
185  AtomHandleIter AtomsEnd() const;
186 
189  EntityView Select(const Query& q, QueryFlags flags=0) const;
190 
193  EntityView Select(const String& query_string, QueryFlags flags=0) const;
194 
195  bool operator==(const ResidueHandle& ref) const;
196  bool operator!=(const ResidueHandle& ref) const;
197 
198 
199 
200 };
201 
206 bool DLLEXPORT_OST_MOL InSequence(const ResidueHandle& residue_one,
207  const ResidueHandle& residue_two);
208 
209 
210 }} //ns
211 
212 #endif // OST_RESIDUE_HANDLE_HH
213