read.pqr(file, maxlines = -1, multi = FALSE, rm.insert = FALSE,
rm.alt = TRUE, verbose = TRUE)
"pdb"
with the following components:atom
).nrow(atom)
with TRUE values indicating a C-alpha maxlines
may require increasing for some large multi-model files.
The preferred means of reading such data is via binary DCD format
trajectory files (see the read.dcd
function).atom.select
, write.pdb
,
read.dcd
, read.fasta.pdb
,
read.fasta
# Read a PDB file
pdb <- read.pdb( "4q21" )
# Print data for the first atom
pdb$atom[1,]
# Look at the first het atom
pdb$het[1,]
# Print some coordinate data
pdb$atom[1:20, c("x","y","z")]
# Print C-alpha coordinates (can also use 'atom.select')
##pdb$xyz[pdb$calpha, c("resid","x","y","z")]
# Print SSE data (for helix and sheet)
pdb$helix
pdb$sheet$start
# Print SEQRES data
pdb$seqres
# Renumber residues
nums <- as.numeric(pdb$atom[,"resno"])
pdb$atom[,"resno"] <- nums - (nums[1] - 1)
# Write out renumbered PDB file
#write.pdb(pdb=pdb,file="eg.pdb")
Run the code above in your browser using DataLab