Learn R Programming

bio3d (version 2.3-0)

read.pdcBD: Read PQR output from pdcBD File

Description

Read a pdcBD PQR coordinate file.

Usage

read.pdcBD(file, maxlines = 50000, multi = FALSE, rm.insert = FALSE, rm.alt = TRUE, verbose = TRUE)

Arguments

file
the name of the pdcBD PQR file to be read.
maxlines
the maximum number of lines to read before giving up with large files. Default is 50,000 lines.
multi
logical, if TRUE multiple ATOM records are read for all models in multi-model files.
rm.insert
logical, if TRUE PDB insert records are ignored.
rm.alt
logical, if TRUE PDB alternate records are ignored.
verbose
print details of the reading process.

Value

Returns a list of class "pdb" with the following components:

Details

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).

References

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.

See Also

atom.select, write.pdb, read.dcd, read.fasta.pdb, read.fasta

Examples

Run this code

# PDB server connection required - testing excluded

# Read a PDB file
pdb <- read.pdb( "1bg2" )
  
# 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