Usage
as.pdb(...)
"as.pdb"(mol, ...)
"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, ...)
Arguments
...
arguments passed to and from functions.
mol
a list object of type "mol2" (obtained with
read.mol2). prmtop
a list object of type "prmtop" (obtained with
read.prmtop). inds
a list object of type "select" as obtained from
atom.select. The indices points to which atoms in the
PRMTOP object to convert. inds.crd
same as the inds argument, but pointing to
the atoms in CRD object to convert. By default, this argument equals
to inds, assuming the same number and sequence of atoms in the
PRMTOP and CRD objects.
ncore
number of CPU cores used to do the calculation.
ncore>1 requires package parallel installed.
pdb
an object of class pdb as obtained from
read.pdb. xyz
a numeric vector/matrix of Cartesian coordinates. If
provided, the number of atoms in the new PDB object will be set to
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).
type
a character vector of record types, i.e. "ATOM" or "HETATM",
with length equal to ncol(as.xyz(xyz))/3. Alternatively, a single element
character vector can be provided which will be repeated to match
the number of atoms.
resno
a numeric vector of residue numbers of length equal to
ncol(as.xyz(xyz))/3.
resid
a character vector of residue types/ids of length equal to
ncol(as.xyz(xyz))/3. Alternatively, a single element
character vector can be provided which will be repeated to match
the number of atoms.
eleno
a numeric vector of element/atom numbers of length equal to
ncol(as.xyz(xyz))/3.
elety
a character vector of element/atom types of length equal to
ncol(as.xyz(xyz))/3. Alternatively, a single element
character vector can be provided which will be repeated to match
the number of atoms.
chain
a character vector of chain identifiers with length equal to
ncol(as.xyz(xyz))/3. Alternatively, a single element
character vector can be provided which will be repeated to match
the number of atoms.
insert
a character vector of insertion code with length equal to
ncol(as.xyz(xyz))/3.
alt
a character vector of alternate record with length equal to
ncol(as.xyz(xyz))/3.
o
a numeric vector of occupancy values of length equal to
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.
b
a numeric vector of B-factors of length equal to ncol(as.xyz(xyz))/3.
Alternatively, a single element numeric vector can be provided
which will be repeated to match the number of atoms.
segid
a character vector of segment id of length equal to
ncol(as.xyz(xyz))/3. Alternatively, a single element character vector can
be provided which will be repeated to match the number of
atoms.
elesy
a character vector of element symbol of length equal to
ncol(as.xyz(xyz))/3. Alternatively, a single element character vector can
be provided which will be repeated to match the number of
atoms.
charge
a numeric vector of atomic charge of length equal to
ncol(as.xyz(xyz))/3.
verbose
logical, if TRUE details of the PDB generation process
is printed to screen.