convert.pdb {bio3d} | R Documentation |
Convert between CHARMM, Amber, Gromacs and Brookhaven PDB formats.
convert.pdb(pdb, type, renumber = FALSE, first.resno = 1, first.eleno = 1, rm.h = TRUE, rm.wat = FALSE)
pdb |
a structure object of class "pdb" , obtained from
read.pdb . |
type |
output format. |
renumber |
logical, if TRUE atom and residue records are renumbered using ‘first.resno’ and ‘first.eleno’. |
first.resno |
first residue number to be used if ‘renumber’ is TRUE. |
first.eleno |
first element number to be used if ‘renumber’ is TRUE. |
rm.h |
logical, if TRUE hydrogen atoms are removed. |
rm.wat |
logical, if TRUE water atoms are removed. |
Convert atom names and residue names, renumber atom and residue
records, strip water and hydrogen atoms from pdb
objects.
Format type
can be one of “ori”, “pdb”, “charmm”,
“amber” or “gromacs”.
Returns a list of class "pdb"
, with the following components:
atom |
a character matrix containing all atomic coordinate ATOM data, with a row per ATOM and a column per record type. See below for details of the record type naming convention (useful for accessing columns). |
het |
a character matrix containing atomic coordinate records
for atoms within “non-standard” HET groups (see atom ). |
helix |
‘start’, ‘end’ and ‘length’ of H type sse, where start and end are residue numbers “resno”. |
sheet |
‘start’, ‘end’ and ‘length’ of E type sse, where start and end are residue numbers “resno”. |
seqres |
sequence from SEQRES field. |
xyz |
a numeric vector of ATOM coordinate data. |
calpha |
logical vector with length equal to nrow(atom)
with TRUE values indicating a C-alpha “elety”. |
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.
Barry Grant
Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.
For a description of PDB format (version2.2) see:
http://www.rcsb.org/pdb/file_formats/pdb/pdbguide2.2/guide2.2_frame.html.
atom.select
, write.pdb
,
read.dcd
, read.fasta.pdb
,
read.fasta
# Read a PDB file pdb <- read.pdb( system.file("examples/1bg2.pdb", package="bio3d") ) pdb.summary(pdb) # Convert to CHARMM format new <- convert.pdb(pdb, type="charmm") pdb.summary(new) # Write a PDB and CRD file #write.pdb(new, file="4charmm.pdb") #write.crd(new, file="4charmm.crd")