% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rotationHelpers.R
\name{rotationHelpers}
\alias{rotationHelpers}
\alias{Rx}
\alias{Rx.coords}
\alias{Rx.pdb}
\alias{Ry}
\alias{Ry.coords}
\alias{Ry.pdb}
\alias{Rz}
\alias{Rz.coords}
\alias{Rz.pdb}
\title{Helper Functions for Rotation of Atomic Coordinates}
\usage{
Rx(...)

\method{Rx}{coords}(x, angle = 0, mask = TRUE, crystal = NULL, ...)

\method{Rx}{pdb}(x, angle = 0, mask = TRUE, crystal = x$crystal, ...)

Ry(...)

\method{Ry}{coords}(x, angle = 0, mask = TRUE, crystal = NULL, ...)

\method{Ry}{pdb}(x, angle = 0, mask = TRUE, crystal = x$crystal, ...)

Rz(...)

\method{Rz}{coords}(x, angle = 0, mask = TRUE, crystal = NULL, ...)

\method{Rz}{pdb}(x, angle = 0, mask = TRUE, crystal = x$crystal, ...)
}
\arguments{
\item{\dots}{further arguments passed to or from other methods.}

\item{x}{an R object containing atomic coordinates.}

\item{angle}{the angle of the rotation in degrees.}

\item{mask}{a logical vector indicating the set of coordinates to which the
rotation has to be applied.}

\item{crystal}{an object of class \sQuote{crystal} used to convert fractional
into Cartesian coordinates when needed.}
}
\value{
An object of the same class as \code{x} with rotated coordinates.
}
\description{
Rotation of atomic coordinates along a specific Cartesian vector.
}
\details{
These functions are helper functions to perform a rotation around a specific 
Cartesian vector. All of them call the \code{R} function.
}
\examples{
# First lets read a pdb file
x <- read.pdb(system.file("examples/PCBM_ODCB.pdb", package="Rpdb"))
cell <- cell.coords(x)
visualize(x, mode = NULL)

# Rotation of the structure around the z-axis
visualize(Rz(x, 90), mode = NULL)
# Rotation of the residue 1 around the c-axis
visualize(Rz(x, 90, mask = x$atoms$resid == 1), mode = NULL)

}
\seealso{
\code{\link{R}} and \code{\link{xyz2abc}}, \code{\link{abc2xyz}} for
  passing from Cartesian to fractional coordinates (or Vis Versa).
}
\keyword{manip}
