Write a PQR file for a given ‘xyz’ Cartesian coordinate vector or matrix.
write.pqr(pdb = NULL, xyz = pdb$xyz, resno = NULL, resid = NULL, eleno =
NULL, elety = NULL, chain = NULL, o = NULL, b = NULL,
append = FALSE, verbose = FALSE, chainter = FALSE, file = "R.pdb")
Cartesian coordinates as a vector or 3xN matrix.
vector of residue numbers of length equal to length(xyz)/3.
vector of residue types/ids of length equal to length(xyz)/3.
vector of element/atom numbers of length equal to length(xyz)/3.
vector of element/atom types of length equal to length(xyz)/3.
vector of chain identifiers with length equal to length(xyz)/3.
atomic partial charge values of length equal to length(xyz)/3.
atomic radii values of length equal to length(xyz)/3.
logical, if TRUE output is appended to the bottom of an existing file (used primarly for writing multi-model files).
logical, if TRUE progress details are printed.
logical, if TRUE a TER line is inserted between chains.
the output file name.
Called for its effect.
PQR file format is basically the same as PDB format except for the fields of
o
and b
. In PDB, these two fields are filled with ‘Occupancy’
and ‘B-factor’ values, respectively, with each field 6-column long.
In PQR, they are atomic ‘partial charge’ and ‘radii’
values, respectively, with each field 8-column long.
Only the xyz
argument is strictly required. Other arguments
assume a default poly-ALA C-alpha structure with a blank chain id,
atomic charge values of 0.00 and atomic radii equal to 1.00.
If the input argument xyz
is a matrix then each row is assumed
to be a different structure/frame to be written to a
“multimodel” PDB file, with frames separated by “END”
records.
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.
read.pqr
, read.pdb
,
write.pdb
, read.dcd
,
read.fasta.pdb
, read.fasta
# NOT RUN {
# PDB server connection required - testing excluded
# Read a PDB file
pdb <- read.pdb( "1bg2" )
# Write out in PQR format
outfile = file.path(tempdir(), "eg.pqr")
write.pqr(pdb=pdb, file = outfile)
invisible( cat("\nSee the output file:", outfile, sep = "\n") )
# }
Run the code above in your browser using DataLab