trim(...)"trim"(pdb, ..., inds = NULL, sse = TRUE)
read.pdb
. atom.select
. If
inds
is also provided, these arguments will be ignored. atom.select
. If NULL, atom selection will be obtained
from calling atom.select(pdb, ...)
. Produce a new smaller PDB object, containing a subset of atoms, from a given larger PDB object.
This is a basic utility function for creating a new PDB object based on a selection of atoms.
"pdb"
with the following components:
atom
). nrow(atom)
with TRUE values indicating a C-alpha elety. Grant, B.J. et al. (2006) Bioinformatics 22, 2695--2696.
For a description of PDB format (version3.3) see: http://www.wwpdb.org/documentation/format33/v3.3.html. .
het
and seqres
list components are returned unmodified.
For both atom
and het
list components the column names can be
used as a convenient means of data access, namely:
Atom serial number eleno,
Atom type elety,
Alternate location indicator alt,
Residue name resid,
Chain identifier chain,
Residue sequence number resno,
Code for insertion of residues insert,
Orthogonal coordinates x,
Orthogonal coordinates y,
Orthogonal coordinates z,
Occupancy o, and
Temperature factor b.
See examples for further details.
## Read a PDB file from the RCSB online database pdb <- read.pdb("1bg2")Note: Accessing on-line PDB file## Select calpha atoms sele <- atom.select(pdb, "calpha") ## Trim PDB new.pdb <- trim.pdb(pdb, inds=sele) ## Or, simply #new.pdb <- trim.pdb(pdb, "calpha") ## Write to file write.pdb(new.pdb, file="calpha.pdb")