Write AMBER Binary netCDF files

Usage

write.ncdf(x, trjfile = "R.ncdf", cell = NULL)

Arguments

x
A numeric matrix of xyz coordinates with a frame/structure per row and a Cartesian coordinate per column.
trjfile
name of the output trajectory file.
cell
A numeric matrix of cell information with a frame/structure per row and a cell length or angle per column. If NULL cell will not be written.

Description

Write coordinate data to a binary netCDF trajectory file.

Details

Writes an AMBER netCDF (Network Common Data Form) format trajectory file with the help of David W. Pierce's (UCSD) ncdf4 package available from CRAN.

Value

Called for its effect.

Note

See AMBER documentation for netCDF format description.

NetCDF binary trajectory files are supported by the AMBER modules sander, pmemd and ptraj. Compared to formatted trajectory files, the binary trajectory files are smaller, higher precision and significantly faster to read and write.

NetCDF provides for file portability across architectures, allows for backwards compatible extensibility of the format and enables the files to be self-describing. Support for this format is available in VMD.

Examples

##-- Read example trajectory file trtfile <- system.file("examples/hivp.dcd", package="bio3d") trj <- read.dcd(trtfile)
NATOM = 198 NFRAME= 117 ISTART= 0 last = 117 nstep = 117 nfile = 117 NSAVE = 1 NDEGF = 0 version 24 Reading (x100) |======================================================================| 100%
## Write to netCDF format write.ncdf(trj, "newtrj.nc") ## Read trj trj <- read.ncdf("newtrj.nc")
[1] "Reading file newtrj.nc" [1] "Produced by program: bio3d" [1] "File conventions AMBER version 1.0" [1] "Frames: 117" [1] "Atoms: 198"

See also

read.dcd, read.ncdf, read.pdb, write.pdb, atom.select

Author

Barry Grant