atom.select(...)"atom.select"(pdb, string = NULL, type = NULL, eleno = NULL, elety = NULL, resid = NULL, chain = NULL, resno = NULL, insert = NULL, segid = NULL, operator = "AND", inverse = FALSE, value = FALSE, verbose=FALSE, ...)"atom.select"(mol, string=NULL, eleno = NULL, elena = NULL, elety = NULL, resid = NULL, chain = NULL, resno = NULL, statbit = NULL, operator = "AND", inverse = FALSE, value = FALSE, verbose=FALSE, ...)"atom.select"(prmtop, ...)"print"(x, ...)
atom.select.pdb
,
atom.select.prmtop
, or print
. "pdb"
, obtained from
read.pdb
. calpha
cbeta
backbone
sidechain
protein
nucleic
ligand
water
h
or noh
. NA
or values. The default value
of NULL
will select both insert and non-insert residues. atom.select
are returned, and if TRUE,
a pdb
object containing the matching atoms themselves is
returned. "mol2"
, obtained from
read.mol2
. "prmtop"
, obtained from
read.prmtop
. atom.select
. Return the atom and xyz coordinate indices of pdb or prmtop structure objects corresponding to the intersection of a hierarchical selection.
This function allows for the selection of atom and coordinate data corresponding to the intersection of various input criteria.
Input selection criteria include selection string
keywords (such as
"calpha"
, "backbone"
, "sidechain"
, "protein"
,
"nucleic"
, "ligand"
, etc.) and individual named
selection components (including chain, resno,
resid, elety etc.).
For example, atom.select(pdb, "calpha")
will return indices for
all C-alpha (CA) atoms found in protein residues in the pdb
object, atom.select(pdb, "backbone")
will return indices
for all protein N,CA,C,O atoms, and atom.select(pdb, "cbeta")
for all protein N,CA,C,O,CB atoms.
Note that keyword string
shortcuts can be combined with individual
selection components, e.g. atom.select(pdb, "protein", chain="A")
will select all protein atoms found in chain A.
Selection criteria are combined according to the provided
operator
argument. The default operator AND
(or &
) will
combine by intersection while OR
(or |
) will take the union.
For example, atom.select(pdb, "protein", elety=c("N", "CA", "C"),
resno=65:103)
will select the N, CA, C atoms in the protein residues
65 through 103, while atom.select(pdb, "protein", resid="ATP",
operator="OR")
will select all protein atoms as well as any ATP
residue(s).
Other string
shortcuts include:
"calpha"
, "back"
, "backbone"
, "cbeta"
,
"protein"
, "notprotein"
, "ligand"
,
"water"
, "notwater"
, "h"
, "noh"
,
"nucleic"
, and "notnucleic"
.
In addition, the combine.select
function can further combine atom
selections using AND, OR, or NOT logical
operations.
Protein atoms are defined as any atom in a residue matching the
residue name in the attached aa.table
data frame. See
aa.table$aa3
for a complete list of residue names.
Nucleic atoms are defined as all atoms found in residues with names A, U, G, C, T, I, DA, DU, DG, DC, DT, or DI.
Water atoms/residues are defined as those with residue names H2O, OH2, HOH, HHO, OHH, SOL, WAT, TIP, TIP, TIP3, or TIP4.
"select"
with the following components:
Grant, B.J. et al. (2006) Bioinformatics 22, 2695--2696.
##- PDB example # Read a PDB file pdb <- read.pdb( system.file("examples/1hel.pdb", package="bio3d") ) # Select protein atoms of chain A atom.select(pdb, "protein", chain="A")Call: atom.select.pdb(pdb = pdb, string = "protein", chain = "A") Atom Indices#: 1001 ($atom) XYZ Indices#: 3003 ($xyz) + attr: atom, xyz, call# Select all atoms except from the protein atom.select(pdb, "protein", inverse=TRUE, verbose=TRUE).. 1001 atom(s) from 'string' selection .. 1001 atom(s) in final combined selection .. 0 atom(s) in inversed selectionCall: atom.select.pdb(pdb = pdb, string = "protein", inverse = TRUE, verbose = TRUE) Atom Indices#: 0 ($atom) XYZ Indices#: 0 ($xyz) + attr: atom, xyz, call# Select all C-alpha atoms with residues numbers between 43 and 54 sele <- atom.select(pdb, "calpha", resno=43:54, verbose=TRUE).. 129 atom(s) from 'string' selection .. 90 atom(s) from 'resno' selection .. 12 atom(s) in final combined selection# Access the PDB data with the selection indices print( pdb$atom[ sele$atom, "resid" ] )[1] "THR" "ASN" "ARG" "ASN" "THR" "ASP" "GLY" "SER" "THR" "ASP" "TYR" "GLY"print( pdb$xyz[ sele$xyz ] )[1] 10.705 15.992 17.773 12.828 18.909 18.863 15.061 19.112 21.827 15.247 [11] 22.135 24.062 18.108 23.768 25.931 16.626 22.832 29.261 16.950 19.205 [21] 28.182 13.311 18.716 27.712 11.958 17.610 24.179 8.767 18.608 22.181 [31] 6.899 15.745 20.548 4.390 15.347 17.710# Trim PDB to selection ca.pdb <- trim.pdb(pdb, sele) ##- PRMTOP example prmtop <- read.prmtop(system.file("examples/crambin.prmtop", package="bio3d")) ## Atom selection ca.inds <- atom.select(prmtop, "calpha")Summary of PDB generation: .. number of atoms in PDB determined by 'xyz' .. 46 atom(s) from 'string' selection .. 46 atom(s) in final combined selection .. number of atoms in PDB: 639 .. number of calphas in PDB: 46 .. number of residues in PDB: 46
read.pdb
, as.select
,
combine.select
, trim.pdb
,
write.pdb
, read.prmtop
,
read.crd
, read.dcd
,
read.ncdf
.