00001 //------------------------------------------------------------------------------ 00002 // This file is part of the OpenStructure project <www.openstructure.org> 00003 // 00004 // Copyright (C) 2008-2010 by the OpenStructure authors 00005 // 00006 // This library is free software; you can redistribute it and/or modify it under 00007 // the terms of the GNU Lesser General Public License as published by the Free 00008 // Software Foundation; either version 3.0 of the License, or (at your option) 00009 // any later version. 00010 // This library is distributed in the hope that it will be useful, but WITHOUT 00011 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00012 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00013 // details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public License 00016 // along with this library; if not, write to the Free Software Foundation, Inc., 00017 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 //------------------------------------------------------------------------------ 00019 #ifndef OST_RESIDUE_HANDLE_HU 00020 #define OST_RESIDUE_HANDLE_HU 00021 00022 #include <ost/mol/query.hh> 00023 #include <ost/mol/module_config.hh> 00024 #include <ost/geom/vec3.hh> 00025 #include <ost/mol/residue_base.hh> 00026 #include <ost/mol/atom_prop.hh> 00027 #include <ost/mol/entity_visitor_fw.hh> 00028 #include <ost/mol/iterator_fw.hh> 00029 00030 namespace ost { namespace mol { 00031 00054 class DLLEXPORT_OST_MOL ResidueHandle : public ResidueBase { 00055 public: 00056 ResidueHandle(); 00057 00058 ResidueHandle(const impl::ResidueImplPtr& impl) 00059 : ResidueBase(impl) {} 00060 EntityHandle GetEntity() const; 00061 00063 AtomHandle GetCentralAtom() const; 00064 00066 geom::Vec3 GetCentralNormal() const; 00067 00069 double GetMass() const; 00070 00072 geom::Vec3 GetCenterOfMass() const; 00073 00078 geom::Vec3 GetCenterOfAtoms() const; 00079 00084 geom::Vec3 GetGeometricCenter() const; 00085 00087 geom::Vec3 GetGeometricStart() const; 00088 00090 geom::Vec3 GetGeometricEnd() const; 00091 00093 ChainHandle GetChain() const; 00094 00097 ResidueHandle GetPrev() const; 00098 00101 ResidueHandle GetNext() const; 00102 00106 AtomHandle FindAtom(const String& aname) const; 00107 00112 void Apply(EntityVisitor& visitor); 00113 00117 AtomHandleList GetAtomList() const; 00118 00120 int GetAtomCount() const; 00121 00127 int GetBondCount() const; 00128 00138 TorsionHandle FindTorsion(const String& torsion_name) const; 00139 00141 TorsionHandleList GetTorsionList() const; 00142 00144 int GetIndex() const; 00145 00152 00153 00154 00155 bool HasAltAtomGroup(const String& group) const; 00156 00161 const String& GetCurrentAltGroupName() const; 00162 00164 std::vector<String> GetAltAtomGroupNames() const; 00165 00167 bool HasAltAtoms() const; 00168 00172 geom::Vec3 GetAltAtomPos(const AtomHandle& atom, const String& group) const; 00173 00180 bool SwitchAtomPos(const String& group); 00182 00189 AtomHandleIter AtomsBegin() const; 00190 00194 ResidueHandle GetHandle() const; 00195 unsigned long GetHashCode() const; 00198 AtomHandleIter AtomsEnd() const; 00199 00202 EntityView Select(const Query& q, QueryFlags flags=0) const; 00203 00206 EntityView Select(const String& query_string, QueryFlags flags=0) const; 00207 00208 bool operator==(const ResidueHandle& ref) const; 00209 bool operator!=(const ResidueHandle& ref) const; 00210 00211 00212 00213 }; 00214 00219 bool DLLEXPORT_OST_MOL InSequence(const ResidueHandle& residue_one, 00220 const ResidueHandle& residue_two); 00221 00222 00223 }} //ns 00224 00225 #endif // OST_RESIDUE_HANDLE_HH 00226
1.5.8