From afb75d85300e20ac99762b57e08e349951f6532d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20M=C3=B6ller?= Date: Wed, 24 Jun 2015 10:49:27 +0200 Subject: [PATCH] Python: Added Omega torsion angles --- include/BALL/STRUCTURE/residueRotamerSet.h | 15 ++++++++++ source/KERNEL/residue.C | 4 +-- source/PYTHON/EXTENSIONS/BALL/residue.sip | 2 ++ .../EXTENSIONS/BALL/residueRotamerSet.sip | 3 ++ source/STRUCTURE/residueRotamerSet.C | 30 +++++++++++++++++-- 5 files changed, 49 insertions(+), 5 deletions(-) diff --git a/include/BALL/STRUCTURE/residueRotamerSet.h b/include/BALL/STRUCTURE/residueRotamerSet.h index 47e54377c0..3861fa40d2 100644 --- a/include/BALL/STRUCTURE/residueRotamerSet.h +++ b/include/BALL/STRUCTURE/residueRotamerSet.h @@ -205,6 +205,15 @@ namespace BALL /// void setTorsionPsi(const Angle& psi); + + /// + bool hasTorsionOmega() const; + + /// + Angle getTorsionOmega() const; + + /// + void setTorsionOmega(const Angle& psi); //@} /** @name Rotamer Assignment @@ -297,11 +306,17 @@ namespace BALL /// true if this residue rotamer set is backbone dependent bool has_torsion_psi_; + /// true if this residue rotamer set is backbone dependent + bool has_torsion_omega_; + /// The torsion phi Angle phi_; /// The torsion psi Angle psi_; + + /// The torsion omega + Angle omega_; }; } // namespace BALL diff --git a/source/KERNEL/residue.C b/source/KERNEL/residue.C index f2bbe1afa4..ccc67eb046 100644 --- a/source/KERNEL/residue.C +++ b/source/KERNEL/residue.C @@ -243,8 +243,8 @@ namespace BALL { return false; } - // the torsion angle phi is not defined for - // the N-terminus + // the torsion angle omega is not defined for + // the C-terminus return !isCTerminal() && hasProperty(PROPERTY__AMINO_ACID); } diff --git a/source/PYTHON/EXTENSIONS/BALL/residue.sip b/source/PYTHON/EXTENSIONS/BALL/residue.sip index bd9f415668..25b9e295be 100644 --- a/source/PYTHON/EXTENSIONS/BALL/residue.sip +++ b/source/PYTHON/EXTENSIONS/BALL/residue.sip @@ -46,6 +46,8 @@ class Residue Angle getTorsionPhi() const; bool hasTorsionPsi() const; Angle getTorsionPsi() const; + bool hasTorsionOmega() const; + Angle getTorsionOmega() const; Protein* getProtein(); // const Protein* getProtein() const; diff --git a/source/PYTHON/EXTENSIONS/BALL/residueRotamerSet.sip b/source/PYTHON/EXTENSIONS/BALL/residueRotamerSet.sip index 3b71537d69..ca71220256 100644 --- a/source/PYTHON/EXTENSIONS/BALL/residueRotamerSet.sip +++ b/source/PYTHON/EXTENSIONS/BALL/residueRotamerSet.sip @@ -48,6 +48,9 @@ class ResidueRotamerSet bool hasTorsionPsi() const; Angle getTorsionPsi() const; void setTorsionPsi(const Angle& psi); + bool hasTorsionOmega() const; + Angle getTorsionOmega() const; + void setTorsionOmega(const Angle& omega); bool setTemplateResidue(const Residue& residue, Size number_of_torsions); bool setRotamer(Residue& residue, const Rotamer& rotamer); Rotamer getRotamer(const Residue& residue) const; diff --git a/source/STRUCTURE/residueRotamerSet.C b/source/STRUCTURE/residueRotamerSet.C index d8eee5f57a..0786766c90 100644 --- a/source/STRUCTURE/residueRotamerSet.C +++ b/source/STRUCTURE/residueRotamerSet.C @@ -53,8 +53,10 @@ namespace BALL number_of_torsions_(0), has_torsion_phi_(false), has_torsion_psi_(false), + has_torsion_omega_(false), phi_(0), - psi_(0) + psi_(0), + omega_(0) { } @@ -70,8 +72,10 @@ namespace BALL number_of_torsions_(number_of_torsions), has_torsion_phi_(false), has_torsion_psi_(false), + has_torsion_omega_(false), phi_(0), - psi_(0) + psi_(0), + omega_(0) { setTemplateResidue(residue, number_of_torsions); @@ -261,8 +265,10 @@ namespace BALL original_coordinates_(rhs.original_coordinates_), has_torsion_phi_(rhs.has_torsion_phi_), has_torsion_psi_(rhs.has_torsion_psi_), + has_torsion_omega_(rhs.has_torsion_omega_), phi_(rhs.phi_), - psi_(rhs.psi_) + psi_(rhs.psi_), + omega_(rhs.omega_) { } @@ -285,8 +291,10 @@ namespace BALL original_coordinates_ = rhs.original_coordinates_; has_torsion_phi_ = rhs.has_torsion_phi_; has_torsion_psi_ = rhs.has_torsion_psi_; + has_torsion_omega_ = rhs.has_torsion_omega_; phi_ = rhs.phi_; psi_ = rhs.psi_; + omega_ = rhs.omega_; } return (*this); @@ -811,6 +819,22 @@ namespace BALL has_torsion_psi_ = true; } + bool ResidueRotamerSet::hasTorsionOmega() const + { + return has_torsion_omega_; + } + + Angle ResidueRotamerSet::getTorsionOmega() const + { + return omega_; + } + + void ResidueRotamerSet::setTorsionOmega(const Angle& angle) + { + omega_ = angle; + has_torsion_omega_ = true; + } + void ResidueRotamerSet::sort() { std::sort(rotamers_.begin(), rotamers_.end(), RotamerProbabilityGreaterThan_());