
Last chance! 50% off unlimited learning
Sale ends in
wrap(x, ...)
"wrap"(x, cryst1, factor = NULL, ...)
"wrap"(x, cryst1, factor = NULL, ...)
"wrap"(x, cryst1 = x$cryst1, factor = NULL, ...)
wrap
function translates all atoms out of the unit cell back into the unit cell
using periodic boundary conditions. To do so, the wrap
function first converts Cartesian
into fractional coordinates. Then atoms with fractional coordinates greater than 1 or lower
than 0 are respectively translated by -1 or +1. Finally, if the original atomic coordinates
were Cartesian coordinates their are reconverted into Cartesian coordinates.
coords
, atoms
, pdb
, cryst1
, centres.pdb
, xyz2abc
,
x <- read.pdb(system.file("examples/PCBM_ODCB.pdb",package="Rpdb"))
# Translation of the atoms along x-axis
x$atoms$x1 <- x$atoms$x1 + 10
# Wrapping the structure
y <- wrap(x)
Run the code above in your browser using DataLab