torsion: Calculate dihedral angle formed by four atoms

Description Usage Arguments Details Value Examples

View source: R/RcppExports.R

Description

For Cartesian coordinates of atoms A-B-C-D, calculate the dihedral angle formed by viewing down the B-C axis.

Usage

1
torsion(a, b, c, d)

Arguments

a

length 3 vector of coordinates of atom A

b

length 3 vector of coordinates of atom B

c

length 3 vector of coordinates of atom C

d

length 3 vector of coordinates of atom D

Details

Similar to torsion.xyz, but with implementation in C++.

Value

Returns the dihedral angle (in degrees between -180 and 180).

Examples

1
2
torsion(c(50.051, 37.144, -4.723), c(50.044, 36.248, -3.559),
        c(51.296, 35.369, -3.476), c(51.930,35.119,-4.618))

compas documentation built on Jan. 9, 2022, 1:06 a.m.

Related to torsion in compas...