as.pdb(...)
"as.pdb"(mol2, ...)
"as.pdb"(prmtop, crd=NULL, inds=NULL, inds.crd=inds, ncore=NULL, ...)
"as.pdb"(pdb=NULL, xyz=NULL, type=NULL, resno=NULL, resid=NULL, eleno=NULL, elety=NULL, chain=NULL, insert=NULL, alt=NULL, o=NULL, b=NULL, segid=NULL, elesy=NULL, charge=NULL, verbose=TRUE, ...)
"mol2"
(obtained with
read.mol2
). "prmtop"
(obtained with
read.prmtop
). "crd"
(obtained with
read.crd.amber
). "select"
as obtained from
atom.select
. The indices points to which atoms in the
PRMTOP object to convert. ncore>1
requires package parallel installed. read.pdb
. ncol(as.xyz(xyz))/3
(see as.xyz
). If xyz
is not provided the number of atoms will be based on
the length of eleno
, resno
, or resid
(in that
order).
ncol(as.xyz(xyz))/3
. Alternatively, a single element
character vector can be provided which will be repeated to match
the number of atoms. ncol(as.xyz(xyz))/3
. ncol(as.xyz(xyz))/3
. Alternatively, a single element
character vector can be provided which will be repeated to match
the number of atoms. ncol(as.xyz(xyz))/3
. ncol(as.xyz(xyz))/3
. Alternatively, a single element
character vector can be provided which will be repeated to match
the number of atoms. ncol(as.xyz(xyz))/3
. Alternatively, a single element
character vector can be provided which will be repeated to match
the number of atoms. ncol(as.xyz(xyz))/3
. ncol(as.xyz(xyz))/3
. ncol(as.xyz(xyz))/3
. Alternatively, a single element
numeric vector can be provided which will be repeated for to match
the number of atoms. ncol(as.xyz(xyz))/3
.
Alternatively, a single element numeric vector can be provided
which will be repeated to match the number of atoms.ncol(as.xyz(xyz))/3
. Alternatively, a single element character vector can
be provided which will be repeated to match the number of
atoms. ncol(as.xyz(xyz))/3
. Alternatively, a single element character vector can
be provided which will be repeated to match the number of
atoms. ncol(as.xyz(xyz))/3
. "pdb"
with the following components:
xyz
. nrow(atom)
with TRUE values indicating a C-alpha elety. While as.pdb.mol2
and as.pdb.prmtop
converts specific
objects to a PDB object, as.pdb.default
provides basic
functionality to convert raw data such as vectors of e.g. residue numbers,
residue identifiers, Cartesian coordinates, etc to a PDB object. When
pdb
is provided the returned PDB object is built from the input
object with fields replaced by any input vector arguments.
e.g. as.pdb(pdb, xyz=crd)
will return the same PDB object, with
only the Cartesian coordinates changed to crd
.
read.crd
, read.ncdf
,
atom.select
, read.pdb
## Vector(s) to PDB object
pdb <- as.pdb(resno=1:6, elety="CA", resid="ALA", chain="A")
pdb
## Not run:
# ## Read a PRMTOP file
# prmtop <- read.prmtop("prot_solvated.prmtop")
#
# ## Atom selection
# ca.inds <- atom.select(prmtop, "calpha")
#
# ## 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 PDB format
# trj <- read.ncdf("traj.nc", at.sel=ca.inds)
# pdb <- as.pdb(prmtop, trj[20,], inds=ca.inds, inds.crd=NULL)
# ## End(Not run)
Run the code above in your browser using DataLab