OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
residue_base.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_BASE_HH
20 #define OST_RESIDUE_BASE_HH
21 
22 #include <ost/geom/geom.hh>
23 
24 #include <ost/mol/module_config.hh>
25 #include <ost/mol/residue_prop.hh>
27 #include <ost/mol/sec_structure.hh>
29 #include <ost/mol/chem_class.hh>
30 #include <ost/mol/chem_type.hh>
31 
32 #include <ost/generic_property.hh>
33 #include "property_id.hh"
34 
35 namespace ost { namespace mol {
36 
66  public GenericPropContainer<ResidueBase> {
67 public:
68  ResidueBase();
69  ResidueBase(const impl::ResidueImplPtr& impl);
70  ResidueBase(const ResidueBase& rhs);
71 public:
72 
74 
75  operator bool() const { return this->IsValid(); }
84  bool IsValid() const { return Impl().get()!=0; }
87  const ResNum& GetNumber() const;
88 
90  const ResidueKey& GetKey() const;
91 
93  const String& GetName() const;
94 
97  String GetQualifiedName() const;
98 
100  AtomHandle GetCentralAtom() const;
101 
109  void SetCentralAtom(const AtomHandle& a);
110 
112  geom::Vec3 GetCentralNormal() const;
113 
115  bool IsPeptideLinking() const;
116 
118  bool IsNucleotideLinking() const;
119 
120  ChemClass GetChemClass() const;
121 
122  void SetChemClass(ChemClass cc);
123 
125  ChemType GetChemType() const;
126 
127  void SetChemType(ChemType ct);
128 
131  SecStructure GetSecStructure() const;
132 
136  void SetSecStructure(SecStructure ss);
137 
142  TorsionHandle GetPhiTorsion() const;
143 
148  TorsionHandle GetPsiTorsion() const;
149 
154  TorsionHandle GetOmegaTorsion() const;
155  char GetOneLetterCode() const;
156 
157  void SetOneLetterCode(char olc);
158 
160  String GetStringProperty(Prop::ID prop_id) const;
161 
163  Real GetFloatProperty(Prop::ID prop_id) const;
164 
166  int GetIntProperty(Prop::ID prop_id) const;
167 
169  bool IsProtein() const;
170 
171  void SetIsProtein(bool protein);
172 
173  void SetIsLigand(bool ligand);
174 
175  bool IsLigand() const;
176 public:
177  impl::ResidueImplPtr& Impl();
178 
179  const impl::ResidueImplPtr& Impl() const;
180 protected:
181  GenericPropContainerImpl* GpImpl();
182 
183  const GenericPropContainerImpl* GpImpl() const;
184  void CheckValidity() const;
185 private:
186  impl::ResidueImplPtr impl_;
187 
188 };
189 
190 DLLEXPORT_OST_MOL std::ostream& operator<<(std::ostream& os,
191  const ResidueBase& residue);
192 }} // ns
193 
194 #endif // OST_RESIDUE_BASE_HH
195 
String ResidueKey
std::string String
Definition: base.hh:54
Handle to atom datatype.
Definition: atom_handle.hh:37
float Real
Definition: base.hh:44
ID
Defined properties.
Definition: property_id.hh:41
boost::shared_ptr< ResidueImpl > ResidueImplPtr
Secondary structure types as defined by DSSP. For convenience, the enum values match the characters u...
DLLEXPORT_OST_MOL std::ostream & operator<<(std::ostream &os, const AtomBase &atom)
bool IsValid() const
check validity of handle
Definition: residue_base.hh:84
Three dimensional vector class, using Real precision.
Definition: vec3.hh:42
#define DLLEXPORT_OST_MOL
Named torsion (dihedral) angle.
base class for ResidueHandle and ResidueView
Definition: residue_base.hh:65
base class for the implementation
base class for the handler classes