Learn R Programming

Rpdb (version 2.2)

write.pdb: PDB File Writer

Description

Writes a Protein Data Bank (PDB) coordinate file from an object of class ‘pdb’.

Usage

write.pdb(x, file = "Rpdb.pdb")

Arguments

x
an object, or a list of objects, of class ‘pdb’.
file
a single element character vector containing the name of the PDB file to be created.

Details

All data stored in the ‘pdb’ object are written on a PDB file. A list of object of class ‘pdb’ can be provided to write multiple MODEL into a single file. In this case, each ‘pdb’ object of the list have to have the same cryst1 and conect components.

To write only a subset of a ‘pdb’ object see function subset.pdb.

References

PDB format has been taken from: http://www.wwpdb.org/documentation/format33/v3.3.html

See Also

read.pdb, pdb, cryst1, atoms, conect, subset.pdb

Examples

Run this code
## Read a PDB file included with the package
pdb <- read.pdb(system.file("examples/PCBM_ODCB.pdb",package="Rpdb"))

## Write the pdb object in file "Rpdb.pdb" into the current directory
write.pdb(pdb, file = "Rpdb.pdb")

Run the code above in your browser using DataLab