struct Chem::Angle

Overview

An Angle provides a canonical representation of an angle between three bonded atoms.

An angle is defined by two contiguous bonds:

A       C
  \   /
    B

It measures the angle between the two vectors defined by the atoms (A,B) and (B,C).

Included Modules

Defined in:

chem/connectivity.cr

Constructors

Instance Method Summary

Instance methods inherited from module Chem::Connectivity({Chem::Atom, Chem::Atom, Chem::Atom})

<=>(rhs : self) : Int32 <=>, atoms : {Chem::Atom, Chem::Atom, Chem::Atom} atoms, includes?(atom : Atom) : Bool includes?, inspect(io : IO) : Nil inspect, measure : Float64 measure, to_s(io : IO) : Nil to_s

Constructor Detail

def self.new(a1 : Atom, a2 : Atom, a3 : Atom) #

Creates a new Angle with the given atoms.


[View source]

Instance Method Detail

def measure : Float64 #

Returns the current value of the angle in radians.


[View source]