mirrorHelpers: Helper Functions for reflection of Atomic Coordinates

mirrorHelpersR Documentation

Helper Functions for reflection of Atomic Coordinates

Description

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

Usage

Mxy(...)

## S3 method for class 'coords'
Mxy(x, mask = TRUE, crystal = NULL, ...)

## S3 method for class 'pdb'
Mxy(x, mask = TRUE, crystal = x$crystal, ...)

Myz(...)

## S3 method for class 'coords'
Myz(x, mask = TRUE, crystal = NULL, ...)

## S3 method for class 'pdb'
Myz(x, mask = TRUE, crystal = x$crystal, ...)

Mzx(...)

## S3 method for class 'coords'
Mzx(x, mask = TRUE, crystal = NULL, ...)

## S3 method for class 'pdb'
Mzx(x, mask = TRUE, crystal = x$crystal, ...)

Mab(...)

## S3 method for class 'coords'
Mab(x, crystal, mask = TRUE, ...)

## S3 method for class 'pdb'
Mab(x, crystal = x$crystal, mask = TRUE, ...)

Mbc(...)

## S3 method for class 'coords'
Mbc(x, crystal, mask = TRUE, ...)

## S3 method for class 'pdb'
Mbc(x, crystal = x$crystal, mask = TRUE, ...)

Mca(...)

## S3 method for class 'coords'
Mca(x, crystal, mask = TRUE, ...)

## S3 method for class 'pdb'
Mca(x, crystal = x$crystal, mask = TRUE, ...)

Arguments

...

further arguments passed to or from other methods.

x

an R object containing atomic coordinates.

mask

a logical vector indicating the set of coordinates to which to apply the reflection.

crystal

an object of class ‘crystal’ used to convert fractional into Cartesian coordinates (when needed).

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.

Value

An object of the same class as x with reflected coordinates.

See Also

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

Examples

# 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-plane
visualize(Mab(x), mode = NULL)
# Mirror operation with respect to the ab-plane for residue 1
visualize(Mab(x, mask = x$atoms$resid == 1), mode = NULL)


Rpdb documentation built on March 16, 2026, 5:07 p.m.