Learn R Programming

Rpdb (version 2.2)

mirrorHelpers: Helper Functions for reflection of Atomic Coordinates

Description

Reflection of atomic coordinates with respect to a specific Cartesian plan or a plan defined by two lattice vectors.

Usage

Mxy(...) Myz(...) Mzx(...) Mab(...) Mbc(...) Mca(...)
"Mxy"(x, mask = TRUE, cryst1 = NULL, ...) "Myz"(x, mask = TRUE, cryst1 = NULL, ...) "Mzx"(x, mask = TRUE, cryst1 = NULL, ...) "Mab"(x, cryst1, mask = TRUE, ...) "Mbc"(x, cryst1, mask = TRUE, ...) "Mca"(x, cryst1, mask = TRUE, ...)
"Mxy"(x, mask = TRUE, cryst1 = x$cryst1, ...) "Myz"(x, mask = TRUE, cryst1 = x$cryst1, ...) "Mzx"(x, mask = TRUE, cryst1 = x$cryst1, ...) "Mab"(x, cryst1 = x$cryst1, mask = TRUE, ...) "Mbc"(x, cryst1 = x$cryst1, mask = TRUE, ...) "Mca"(x, cryst1 = x$cryst1, mask = TRUE, ...)

Arguments

x
an R object containing atomic coordinates.
mask
a logical vector indicating the set of coordinates to which to apply the reflection.
cryst1
an object of class ‘cryst1’ use to convert fractional into Cartesian coordinates when need.
...
further arguments passed to or from other methods.

Value

x with reflected coordinates.

Details

These functions are helper functions to perform a reflection with respect to a specific Cartesian plan or a plan defined by two lattice vectors. All of them call the mirror function.

See Also

mirror and xyz2abc, abc2xyz for passing from Cartesian to fractional coordinates (or Vis Versa).

Examples

Run this code
# First lets read a pdb file
x <- read.pdb(system.file("examples/PCBM_ODCB.pdb",package="Rpdb"))
visualize(x,mode = NULL)
# Mirror operation with respect to the ab-plan
visualize(Mab(x), mode = NULL)
# Mirror operation with respect to the ab-plan for residue 1
visualize(Mab(x, mask=x$atoms$resid==1), mode = NULL)

Run the code above in your browser using DataLab