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_CHAIN_HANDLE_HS 00020 #define OST_CHAIN_HANDLE_HS 00021 00022 #include <vector> 00023 00024 #include <ost/mol/module_config.hh> 00025 00026 #include <ost/geom/geom.hh> 00027 00028 #include "chain_base.hh" 00029 00030 #include "query.hh" 00031 #include "view_type_fw.hh" 00032 #include "handle_type_fw.hh" 00033 #include "residue_prop.hh" 00034 #include "entity_visitor_fw.hh" 00035 #include "iterator_fw.hh" 00036 #include "sec_structure.hh" 00037 00038 namespace ost { namespace mol { 00039 00053 class DLLEXPORT_OST_MOL ChainHandle : public ChainBase { 00054 00055 public: 00056 ChainHandle(); 00057 00058 ChainHandle(const impl::ChainImplPtr& impl); 00059 00061 EntityHandle GetEntity() const; 00062 00066 void Apply(EntityVisitor& visitor); 00067 00069 00074 ResidueHandle GetPrev(const ResidueHandle& rh); 00075 ResidueHandle GetNext(const ResidueHandle& rh); 00076 00078 00079 00080 00081 00082 00083 ResidueHandle FindResidue(const ResNum& num) const; 00084 00092 AtomHandle FindAtom(const ResNum& num, 00093 const String& atom_name) const; 00097 ResidueHandle GetResidueByIndex(int index) const; 00099 00101 // 00102 // To count all atoms of the entity the chain belongs to, use 00103 // \c EntityHandle::GetAtomCount(). For count of specific residues, use 00104 // \c ResidueHandle::GetResidueCount(). 00105 int GetAtomCount() const; 00106 00112 int GetBondCount() const; 00113 00117 int GetResidueCount() const; 00118 00124 00125 00126 AtomHandleList GetAtomList() const; 00127 00133 ResidueHandleList GetResidueList() const; 00134 00148 ResidueHandleIter ResiduesBegin() const; 00149 00152 ResidueHandleIter ResiduesEnd() const; 00153 00154 AtomHandleIter AtomsBegin() const; 00155 AtomHandleIter AtomsEnd() const; 00156 00158 Real GetMass() const; 00159 00161 geom::Vec3 GetCenterOfMass() const; 00162 00167 geom::Vec3 GetCenterOfAtoms() const; 00168 00173 geom::Vec3 GetGeometricCenter() const; 00174 00176 geom::Vec3 GetGeometricStart() const; 00177 00179 geom::Vec3 GetGeometricEnd() const; 00180 00183 void AssignSecondaryStructure(SecStructure ss, 00184 const ResNum& start, 00185 const ResNum& end); 00186 00189 EntityView Select(const Query& q, QueryFlags flags=0) const; 00190 00193 EntityView Select(const String& query_string, QueryFlags flags=0) const; 00194 00198 ChainHandle GetHandle() const; 00201 bool InSequence() const; 00202 bool operator==(const ChainHandle& ref) const; 00203 bool operator!=(const ChainHandle& ref) const; 00204 00205 00206 }; 00207 00208 }} // ns 00209 00210 #endif // OST_CHAIN_HANDLE_HH 00211
1.5.8