write.ncdf {bio3d} | R Documentation |
Write coordinate data to a binary netCDF trajectory file.
write.ncdf(x, trjfile = "R.ncdf")
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. |
Writes an AMBER netCDF (Network Common Data Form) format trajectory file with the help of David W. Pierce's (UCSD) ncdf package available from CRAN.
Called for its effect.
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.
Barry Grant
Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696. http://www.unidata.ucar.edu/packages/netcdf/ http://cirrus.ucsd.edu/~pierce/ncdf/ http://amber.scripps.edu/netcdf/nctraj.html
read.dcd
, read.ncdf
,
read.pdb
, write.pdb
,
atom.select
## Not run: ##-- Read example trajectory file trtfile <- system.file("examples/hivp.dcd", package="bio3d") trj <- read.dcd(trtfile) ## Write to netCDF format write.ncdf(trj, "newtrj.nc") ## Read trj trj <- read.ncdf("newtrj.nc") ## End(Not run)