OpenStructure
Public Member Functions | Protected Member Functions
TorsionHandle Class Reference

#include <torsion_handle.hh>

Public Member Functions

 TorsionHandle ()
 TorsionHandle (const impl::TorsionImplP &im)
void Apply (EntityVisitor &v)
const StringGetName () const
Real GetAngle () const
geom::Vec3 GetPos () const
geom::Vec3 GetOriginalPos () const
void SetAngle (Real a, bool up=true)
void RotateAngle (Real angle, bool up=true)
impl::TorsionImplPImpl ()
const impl::TorsionImplPImpl () const
Handle validity
 operator bool () const
bool IsValid () const
Accessing atoms
AtomHandle GetFirst () const
AtomHandle GetSecond () const
AtomHandle GetThird () const
AtomHandle GetFourth () const

Protected Member Functions

void CheckValidity () const

Detailed Description

Named torsion (dihedral) angle.

A torsion (angle) is determined by three consecutive connections, which means by four consecutive atoms, and is defined by the two planes, one formed by A1-A2-A3, the other by A2-A3-A4

Torsion are named, such that they can be retrieved later by name. They are usually added to the entity when loaded from file. For ab-initio model building, the torsions may be added manually or by an appropriate builder from the conop module such as conop::HeuristicBuilder.

The angle of the torsion may be adjusted with via a call to XCSEditor::SetTorsionAngle.

See also:
Roll Helix Example

Definition at line 44 of file torsion_handle.hh.


Constructor & Destructor Documentation

necessary dummy ctor, creates invalid handle

ctor for internal use, in public interface for convenience purposes


Member Function Documentation

void Apply ( EntityVisitor v)

entry point for entity visitor

void CheckValidity ( ) const
protected
Real GetAngle ( ) const

get dihedral angle based on whatever coordinate system is available

AtomHandle GetFirst ( ) const

return first atom

AtomHandle GetFourth ( ) const

return fourth atom

const String& GetName ( ) const
geom::Vec3 GetOriginalPos ( ) const

get position, i.e midpoint between the second and third atom (original coordinates)

geom::Vec3 GetPos ( ) const

get position, i.e midpoint between the second and third atom (transformed coordinates)

AtomHandle GetSecond ( ) const

return second atom

AtomHandle GetThird ( ) const

return third atom

impl::TorsionImplP& Impl ( )
inline

Definition at line 102 of file torsion_handle.hh.

const impl::TorsionImplP& Impl ( ) const
inline

Definition at line 106 of file torsion_handle.hh.

bool IsValid ( ) const

check validity of handle

See also:
operator bool()
operator bool ( ) const

check validity of handle

check, whether the torsion handle points to a valid torsion.

Note:
It is an error to use any method other than IsValid, Impl() and operator bool() when the handle is invalid. An InvalidHandle exception will be thrown.
void RotateAngle ( Real  angle,
bool  up = true 
)

relative rotation, either upstream or downstream

void SetAngle ( Real  a,
bool  up = true 
)

set absolute torsion angle

All connectors at the third atom (A3) will be adjusted accordingly. If you only want to adjust the bond between A3 and A4, and leave the other bonds untouched, use the ost::SetDihedralAngle() function

See also:
RotateAngle

The documentation for this class was generated from the following file: