Replicate Atomic Coordinates
Replicate atomic coordinates using periodic boundary conditions.
replicate(x, ...) ## S3 method for class 'coords' replicate(x, cryst1 = NULL, a.ind = 0, b.ind = 0, c.ind = 0, ...) ## S3 method for class 'atoms' replicate(x, cryst1 = NULL, a.ind = 0, b.ind = 0, c.ind = 0, ...) ## S3 method for class 'pdb' replicate(x, a.ind = 0, b.ind = 0, c.ind = 0, cryst1 = NULL, ...)
x |
an R object containing atomic coordinates to be replicated. |
cryst1 |
an object of class ‘cryst1’ containing periodical boundary conditions used for replicating. |
a.ind |
a vector of integers indicating the positions of the replicated cells along the a-axis. |
b.ind |
a vector of integers indicating the positions of the replicated cells along the b-axis. |
c.ind |
a vector of integers indicating the positions of the replicated cells along the c-axis. |
... |
further arguments passed to or from other methods. |
The replicate
function replicate a unit cell along the lattice vectors a, b and c
as as many times as indicated by the a.ind
, b.ind
and c.ind
arguments.
Discontinuous integer vectors can be used for a.ind
, b.ind
and c.ind
to create layered supercells (See examples).
Return an object of class ‘pdb’ with replicated atomic coordinates.
x <- read.pdb(system.file("examples/PCBM_ODCB.pdb",package="Rpdb")) # Create a 3x3 supercell y <- replicate(x, a.ind= 0:2, b.ind = 0:2, c.ind = 0:2) # Create a 3x3 supercell which might need to be wrapped (some molecules are ouside the cell) y <- replicate(x, a.ind= -1:1, b.ind = -1:1, c.ind = -1:1) # Create a layered supercell with a vacuum layer in the bc-plan y <- replicate(x, a.ind= c(0,2), b.ind = 0:2, c.ind = 0:2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.