read.prmtop(file)"print"(x, printseq=TRUE, ...)
read.prmtop
. pdbseq
. Read parameter and topology data from an AMBER PrmTop file.
This function provides basic functionality to read and parse a AMBER PrmTop file. The resulting prmtop object contains a complete list object of the information stored in the PrmTop file.
See examples for further details.
Selected components:
Grant, B.J. et al. (2006) Bioinformatics 22, 2695--2696. http://ambermd.org/formats.html
See AMBER documentation for PrmTop format description: http://ambermd.org/formats.html.
## Read a PRMTOP file prmtop <- read.prmtop(system.file("examples/crambin.prmtop", package="bio3d")) print(prmtop)Call: read.prmtop(file = system.file("examples/crambin.prmtop", package = "bio3d")) Class: amber, prmtop System information: Total number of atoms: 639 Solute residues: 46 Solute molecules: 1 Sequence: TTCCPSIVARSNFNVCRLPGTSEAICATYTGCIIIPGATCPGDYAN## Explore prmtop file head(prmtop$MASS)[1] 14.010 1.008 1.008 1.008 12.010 1.008head(prmtop$ATOM_NAME)[1] "N" "H1" "H2" "H3" "CA" "HA"## Read Amber coordinates crds <- read.crd(system.file("examples/crambin.inpcrd", package="bio3d")) ## Atom selection ca.inds <- atom.select(prmtop, "calpha")Summary of PDB generation: .. number of atoms in PDB determined by 'xyz' .. 46 atom(s) from 'string' selection .. 46 atom(s) in final combined selection .. number of atoms in PDB: 639 .. number of calphas in PDB: 46 .. number of residues in PDB: 46## Convert to PDB format pdb <- as.pdb(prmtop, crds)Summary of PDB generation: .. number of atoms in PDB determined by 'xyz' .. 46 atom(s) from 'string' selection .. 46 atom(s) in final combined selection .. number of atoms in PDB: 639 .. number of calphas in PDB: 46 .. number of residues in PDB: 46pdb.ca <- as.pdb(prmtop, crds, inds=ca.inds)Summary of PDB generation: .. number of atoms in PDB determined by 'xyz' .. 46 atom(s) from 'string' selection .. 46 atom(s) in final combined selection .. number of atoms in PDB: 46 .. number of calphas in PDB: 46 .. number of residues in PDB: 46## Trajectory processing #trj <- read.ncdf("traj.nc", at.sel=ca.inds) ## Convert to multimodel PDB format #pdb <- as.pdb(prmtop, trj[1:20,], inds=ca.inds, inds.crd=NULL) ## RMSD of trajectory #rd <- rmsd(crds$xyz[ca.inds$xyz], traj, fit=TRUE)