OpenStructure
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-2020 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:
70  ResidueBase(const ResidueBase& rhs);
71 public:
72 
74 
75  operator bool() const { return this->IsValid(); }
84  bool IsValid() const;
87  const ResNum& GetNumber() const;
88 
90  const ResidueKey& GetKey() const;
91 
93  const String& GetName() const;
94 
98 
101 
109  void SetCentralAtom(const AtomHandle& a);
110 
113 
115  bool IsPeptideLinking() const;
116 
118  bool IsNucleotideLinking() const;
119 
121 
123 
126 
128 
132 
137 
143 
149 
155  char GetOneLetterCode() const;
156 
157  void SetOneLetterCode(char olc);
158 
161 
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:
178 
179  const impl::ResidueImplPtr& Impl() const;
180 protected:
182 
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 
Three dimensional vector class, using Real precision.
Definition: vec3.hh:48
base class for the handler classes
base class for the implementation
Handle to atom datatype.
Definition: atom_handle.hh:37
base class for ResidueHandle and ResidueView
Definition: residue_base.hh:66
ChemType GetChemType() const
PDB ligand classification from component dictionary.
String GetStringProperty(Prop::ID prop_id) const
Get String property by id
ResidueBase(const impl::ResidueImplPtr &impl)
void SetIsProtein(bool protein)
void SetSecStructure(SecStructure ss)
Set secondary structure type.
int GetIntProperty(Prop::ID prop_id) const
Get int property by id.
const impl::ResidueImplPtr & Impl() const
bool IsPeptideLinking() const
whether the residue can form peptide bonds
AtomHandle GetCentralAtom() const
returns main atom, ie CA for amino acids
SecStructure GetSecStructure() const
Get secondary structure type. By default, the residue is in COIL conformation.
ResidueBase(const ResidueBase &rhs)
bool IsLigand() const
TorsionHandle GetOmegaTorsion() const
Get omega torsion.
char GetOneLetterCode() const
void CheckValidity() const
void SetCentralAtom(const AtomHandle &a)
set explicit central atom
const ResidueKey & GetKey() const
return the residue key.
void SetOneLetterCode(char olc)
bool IsProtein() const
whether the residue is part of the protein.
String GetQualifiedName() const
get fully qualified name of residue, including the chain name, residue name and residue number
void SetIsLigand(bool ligand)
GenericPropContainerImpl * GpImpl()
geom::Vec3 GetCentralNormal() const
TorsionHandle GetPsiTorsion() const
Get psi torsion.
ChemClass GetChemClass() const
TorsionHandle GetPhiTorsion() const
Get phi torsion.
void SetChemClass(ChemClass cc)
bool IsNucleotideLinking() const
whether the residue can be part of a polynucleotide
const GenericPropContainerImpl * GpImpl() const
void SetChemType(ChemType ct)
const ResNum & GetNumber() const
return residue number
impl::ResidueImplPtr & Impl()
const String & GetName() const
return the residue name, at the moment an alias for GetKey().
Real GetFloatProperty(Prop::ID prop_id) const
Get float property by id
Named torsion (dihedral) angle.
float Real
Definition: base.hh:44
std::string String
Definition: base.hh:54
#define DLLEXPORT_OST_MOL
boost::shared_ptr< ResidueImpl > ResidueImplPtr
String ResidueKey
DLLEXPORT_OST_MOL std::ostream & operator<<(std::ostream &os, const AtomBase &atom)
Definition: base.dox:1
ID
Defined properties.
Definition: property_id.hh:41
Secondary structure types as defined by DSSP. For convenience, the enum values match the characters u...