Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions include/BALL/STRUCTURE/residueRotamerSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions source/KERNEL/residue.C
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 2 additions & 0 deletions source/PYTHON/EXTENSIONS/BALL/residue.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions source/PYTHON/EXTENSIONS/BALL/residueRotamerSet.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
30 changes: 27 additions & 3 deletions source/STRUCTURE/residueRotamerSet.C
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
}

Expand All @@ -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);
Expand Down Expand Up @@ -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_)
{
}

Expand All @@ -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);
Expand Down Expand Up @@ -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_());
Expand Down