OpenStructure
Public Member Functions
TorsionHandle Class Reference

#include <torsion_handle.hh>

Public Member Functions

 TorsionHandle ()
 
 TorsionHandle (const impl::TorsionImplP &im)
 
Handle validity
 operator bool () const
 
bool IsValid () const
 
void Apply (EntityVisitor &v)
 
const StringGetName () const
 

Accessing atoms

AtomHandle GetFirst () const
 
AtomHandle GetSecond () const
 
AtomHandle GetThird () const
 
AtomHandle GetFourth () const
 
Real GetAngle () const
 
geom::Vec3 GetPos () const
 
geom::Vec3 GetOriginalPos () const
 
impl::TorsionImplPImpl ()
 
const impl::TorsionImplPImpl () const
 
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

◆ TorsionHandle() [1/2]

necessary dummy ctor, creates invalid handle

◆ TorsionHandle() [2/2]

ctor for internal use, in public interface for convenience purposes

Member Function Documentation

◆ Apply()

void Apply ( EntityVisitor v)

entry point for entity visitor

◆ CheckValidity()

void CheckValidity ( ) const
protected

◆ GetAngle()

Real GetAngle ( ) const

get dihedral angle based on whatever coordinate system is available

◆ GetFirst()

AtomHandle GetFirst ( ) const

return first atom

◆ GetFourth()

AtomHandle GetFourth ( ) const

return fourth atom

◆ GetName()

const String& GetName ( ) const

◆ GetOriginalPos()

geom::Vec3 GetOriginalPos ( ) const

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

◆ GetPos()

geom::Vec3 GetPos ( ) const

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

◆ GetSecond()

AtomHandle GetSecond ( ) const

return second atom

◆ GetThird()

AtomHandle GetThird ( ) const

return third atom

◆ Impl() [1/2]

impl::TorsionImplP& Impl ( )
inline

Definition at line 90 of file torsion_handle.hh.

◆ Impl() [2/2]

const impl::TorsionImplP& Impl ( ) const
inline

Definition at line 94 of file torsion_handle.hh.

◆ IsValid()

bool IsValid ( ) const

check validity of handle

See also
operator bool()

◆ 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.

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