Learn R Programming

bio3d (version 2.3-0)

convert.pdb: Renumber and Convert Between Various PDB formats

Description

Renumber and convert between CHARMM, Amber, Gromacs and Brookhaven PDB formats.

Usage

convert.pdb(pdb, type=c("original", "pdb", "charmm", "amber", "gromacs"), renumber = FALSE, first.resno = 1, first.eleno = 1, consecutive=TRUE, rm.h = TRUE, rm.wat = FALSE, verbose=TRUE)

Arguments

pdb
a structure object of class "pdb", obtained from read.pdb.
type
output format, one of ‘original’, ‘pdb’, ‘charmm’, ‘amber’, or ‘gromacs’. The default option of ‘original’ results in no conversion.
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.
consecutive
logical, if TRUE renumbering will result in consecutive residue numbers spanning all chains. Otherwise new residue numbers will begin at ‘first.resno’ for each chain.
rm.h
logical, if TRUE hydrogen atoms are removed.
rm.wat
logical, if TRUE water atoms are removed.
verbose
logical, if TRUE details of the conversion process are printed.

Value

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

Details

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

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
## Not run: 
# 
# # Read a PDB file
# pdb <- read.pdb("4q21")
# pdb
# head( pdb$atom[pdb$calpha,"resno"] )
# 
# # Convert to CHARMM format
# new <- convert.pdb(pdb, type="amber", renumber=TRUE, first.resno=22 )
# head( new$atom[new$calpha,"resno"] )
# 
# # Write a PDB file
# #write.pdb(new, file="tmp4amber.pdb")
# 
# ## End(Not run)

Run the code above in your browser using DataLab