% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{torsion}
\alias{torsion}
\title{Calculate dihedral angle formed by four atoms}
\usage{
torsion(a, b, c, d)
}
\arguments{
\item{a}{length 3 vector of coordinates of atom A}

\item{b}{length 3 vector of coordinates of atom B}

\item{c}{length 3 vector of coordinates of atom C}

\item{d}{length 3 vector of coordinates of atom D}
}
\value{
Returns the dihedral angle (in degrees between -180 and 180).
}
\description{
For Cartesian coordinates of atoms A-B-C-D, calculate the dihedral angle formed by viewing down the B-C axis.
}
\details{
Similar to \link[bio3d]{torsion.xyz}, but with implementation in C++.
}
\examples{
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))

}
