translationHelpers {Rpdb}R Documentation

Helper Functions for Translation of Atomic Coordinates

Description

Translation of atomic coordinates along a specific Cartesian or lattice vector.

Usage

Tx(...)

## S3 method for class 'coords'
Tx(obj, x = 0, mask = TRUE, thickness = NULL, cryst1 = NULL, ...)

## S3 method for class 'pdb'
Tx(obj, x = 0, mask = TRUE, thickness = NULL, cryst1 = obj$cryst1, ...)

Ty(...)

## S3 method for class 'coords'
Ty(obj, y = 0, mask = TRUE, thickness = NULL, cryst1 = NULL, ...)

## S3 method for class 'pdb'
Ty(obj, y = 0, mask = TRUE, thickness = NULL, cryst1 = obj$cryst1, ...)

Tz(...)

## S3 method for class 'coords'
Tz(obj, z = 0, mask = TRUE, thickness = NULL, cryst1 = NULL, ...)

## S3 method for class 'pdb'
Tz(obj, z = 0, mask = TRUE, thickness = NULL, cryst1 = obj$cryst1, ...)

Ta(...)

## S3 method for class 'coords'
Ta(obj, a = 0, mask = TRUE, cryst1 = NULL, ...)

## S3 method for class 'pdb'
Ta(obj, a = 0, mask = TRUE, cryst1 = obj$cryst1, ...)

Tb(...)

## S3 method for class 'coords'
Tb(obj, b = 0, mask = TRUE, cryst1 = NULL, ...)

## S3 method for class 'pdb'
Tb(obj, b = 0, mask = TRUE, cryst1 = obj$cryst1, ...)

Tc(...)

## S3 method for class 'coords'
Tc(obj, c = 0, mask = TRUE, cryst1 = NULL, ...)

## S3 method for class 'pdb'
Tc(obj, c = 0, mask = TRUE, cryst1 = obj$cryst1, ...)

Arguments

...

further arguments passed to or from other methods.

obj

an R object containing atomic coordinates.

x

the x-component of the translation vector.

mask

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

thickness

a numeric value indicating the fraction of the thicknees of the selected atom to be added to the translation vector (Usually 0, 0.5 or 1. See details).

cryst1

an object of class ‘cryst1’ use to convert Cartesian into fraction coordinates (or Vis Versa) when need.

y

the y-component of the translation vector.

z

the z-component of the translation vector.

a

the a-component of the translation vector.

b

the b-component of the translation vector.

c

the c-component of the translation vector.

Details

These functions are helper functions to perform a translation along a specific Cartesian or lattice vector. All of them call either the Txyz or Tabc function.

Value

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

See Also

Txyz, Tabc
Passing from Cartesian to fractional coordinates (or Vis Versa):
xyz2abc, abc2xyz

Examples

x <- read.pdb(system.file("examples/PCBM_ODCB.pdb", package="Rpdb"))
visualize(x, mode = NULL)
visualize(Ty(x, 10), mode = NULL)
visualize(Ty(x, 10, mask = x$atoms$resid==1), mode = NULL)
visualize(Tb(x, 1 ), mode = NULL)
visualize(Tb(x, 1 , mask = x$atoms$resid==1), mode = NULL)

# Lets build a C70/Pentacene dimer with an inter-molecular distance equal to 3.5
C70 <- read.pdb(system.file("examples/C70.pdb", package="Rpdb"))
Pen <- read.pdb(system.file("examples/Pentacene.pdb", package="Rpdb"))
x <- merge(C70, Pen)
visualize(x, mode = NULL)
viewXY()
visualize(Tz(x, z=3.5, mask = x$atoms$resname == "C70", thickness=0.5), mode = NULL)
viewXY()


[Package Rpdb version 2.3.4 Index]