Read AMBER Parameter/Topology files

Usage

read.prmtop(file)
"print"(x, printseq=TRUE, ...)

Arguments

file
a single element character vector containing the name of the PRMTOP file to be read.
x
a PRMTOP structure object obtained from read.prmtop.
printseq
logical, if TRUE the residue sequence will be printed to the screen. See also pdbseq.
...
additional arguments to ‘print’.

Description

Read parameter and topology data from an AMBER PrmTop file.

Details

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.

Value

Returns a list of class ‘prmtop’ (inherits class ‘amber’) with components according to the flags present in the PrmTop file. See the AMBER documentation for a complete list of flags/components: http://ambermd.org/formats.html.

Selected components:

ATOM_NAME
a character vector of atom names.

ATOMS_PER_MOLECULE
a numeric vector containing the number of atoms per molecule.

MASS
a numeric vector of atomic masses.

RESIDUE_LABEL
a character vector of residue labels.

RESIDUE_RESIDUE_POINTER
a numeric vector of pointers to the first atom in each residue.

call
the matched call.

References

Grant, B.J. et al. (2006) Bioinformatics 22, 2695--2696. http://ambermd.org/formats.html

Note

See AMBER documentation for PrmTop format description: http://ambermd.org/formats.html.

Examples

## 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.008
head(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: 46
pdb.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)

See also

read.crd, read.ncdf, as.pdb, atom.select, read.pdb

Author

Lars Skjaerven