R/read.crd.R

"read.crd" <- function(file, ...) {
  ## from tools package:
  pos <- regexpr("\\.([[:alnum:]]+)$", file)
  ext <- ifelse(pos > -1L, substring(file, pos + 1L), "")

  if(ext %in% c("crd")) {
    class(file)=c("character", "charmm")
  }

  if(ext %in% c("inpcrd", "rst")) {
    class(file)=c("character", "amber")
  }

  UseMethod("read.crd", file)
}

Try the bio3d package in your browser

Any scripts or data that you put into this service are public.

bio3d documentation built on Oct. 27, 2022, 1:06 a.m.