Learn R Programming

bio3d (version 2.2-4)

read.prmtop: Read AMBER Parameter/Topology files

Description

Read parameter and topology data from an AMBER PrmTop file.

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

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.

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.

References

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

See Also

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

Examples

Run this code
## Not run: 
# ## Read a PRMTOP file
# prmtop <- read.prmtop("prot_solvated.prmtop")
# print(prmtop)
# 
# ## Explore parameters
# prmtop$MASS
# prmtop$ATOM_NAME
# 
# ## Atom selection
# ca.inds <- atom.select(prmtop, "calpha")
# 
# ## Trajectory processing
# trj <- read.ncdf("traj.nc", at.sel=ca.inds)
# 
# ## Read a Amber CRD file
# crds <- read.crd("prot_solvated.inpcrd")
# 
# ## Convert to PDB format
# pdb <- as.pdb(prmtop, crds, inds=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)
# ## End(Not run)

Run the code above in your browser using DataLab