Merging Molecular Systems
Merge two objects contaning atomic coordinates
## S3 method for class 'coords' merge(x, y, ...) ## S3 method for class 'atoms' merge(x, y, reindex = TRUE, ...) ## S3 method for class 'pdb' merge(x, y, reindex = TRUE, ...)
x, y |
objects of class 'coords' to be merged. |
reindex |
a single element logical vector indicating if residue and element IDs have to be reindexed after merging. |
... |
further arguments passed to or from other methods. |
To merge x
and y
they must have the same basis
attributes (see basis
).
For objects of class
‘coords’ and ‘atoms’ the atomic coordinates are directly merged
by row.
For objects of class ‘pdb’, the atoms
and
conect
components of the two pdb
objects are merged by row and
the cryst1
components of x
is used to build the returned
object.
For objects of class ‘atoms’ and ‘pdb’ the
residue and element IDs of y
are shifted to avoid any confusion with
those of x
. If reindex==TRUE
the reindex
function
is called to reinitialize the indexing of the returned object.
Return a n object of the same class as x
and y
merging
x
and y
. If x
and y
have different basis
attributes an error is returned.
c1 <- coords( 1:3 , 4:6 , 7:9 , basis = "xyz") c2 <- coords(10:12, 13:15, 16:18, basis = "xyz") merge(c1,c2) ## Not run: ## Merging objects with different basis sets return an error. c2 <- coords(9:11, 12:14, 15:17, basis = "abc") merge(c1,c2) ## End(Not run) ## Prepare a Pentacene/C70 dimer C70 <- read.pdb(system.file("examples/C70.pdb",package="Rpdb")) Pen <- read.pdb(system.file("examples/Pentacene.pdb",package="Rpdb")) x <- merge(Tz(C70, 3.5, thickness=0.5),Pen)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.