| atoms | R Documentation |
Creates an object of class ‘atoms’ containing the data related to ATOM and HETATM records of a PDB file.
atoms(...)
## S3 method for class 'pdb'
atoms(x, ...)
## S3 method for class 'atoms'
atoms(x, ...)
## Default S3 method:
atoms(
recname,
eleid,
elename,
alt,
resname,
chainid,
resid,
insert,
x1,
x2,
x3,
occ,
temp,
segid,
basis = "xyz",
symbol = NULL,
isHetero = NULL,
...
)
is.atoms(x)
## S3 method for class 'atoms'
x[i, j, drop = if (!missing(j) && length(j) == 1) TRUE else FALSE, ...]
... |
arguments passed to methods. |
x |
an R object to be tested or from whom to extract the |
recname |
a character vector containing the record name for each element. |
eleid |
a integer vector containing the element ID for each element. |
elename |
a character vector containing the element name for each element. |
alt |
a character vector containing the alternate location indicator for each element. |
resname |
a character vector containing the residue name for each element. |
chainid |
a character vector containing the chain ID for each element. |
resid |
a integer vector containing the residue ID for each element. |
insert |
a character vector containing the codes for insertion of residue of each element. |
x1, x2, x3 |
a numeric vector containing the first, second and third coordinate for each element. |
occ |
a numeric vector containing the occupancie for each element. |
temp |
a numeric vector containing the temperature factor for each element. |
segid |
a character vector containing the segment ID for each element. |
basis |
a single element character vector indicating the type of basis vector used to express the atomic coordinates. |
symbol |
the chemical symbol of the atom. |
isHetero |
logical indicating if the record corresponds to the non-protein ligands. |
i, j |
indexes indicating which rows and columns to extract from the |
drop |
logical indicating to coerce the result to the lowest possible dimension. |
atoms is a generic function to create objects of class ‘atoms’.
The purpose of this class is to store ATOM and HETATM records from PDB files.
The default method creates an atoms object from its different components, i.e.:
recname, eleid, elename, alt,
resname, chainid, resid, insert,
x1, x2, x3, occ, temp,
segid and basis.
All the arguments have to be specified, except basis, which by default
is set to "xyz" (Cartesian coordinates).
is.atoms tests if an object is of class ‘atoms’, i.e.
it only checks that the object inherits the “class” atoms.
atoms returns a data.frame of class ‘atoms’ with the following components:
a character vector containing the record name for each element.
a integer vector containing the element ID for each element.
a character vector containing the element name for each element.
a character vector containing the alternate location indicator for each element.
a character vector containing the residue name for each element.
a character vector containing the chain ID for each element.
a integer vector containing the residue ID for each element.
a character vector containing the codes for insertion of residue for each element.
a numeric vector containing the first, second and third coordinate for each element.
a numeric vector containing the occupencie for each element.
a numeric vector containing the temperature factor for each element.
a character vector containing the segment ID for each element.
a single element character vector indicating the type of basis vector used to express the atomic coordinates.
is.atoms returns TRUE if x is an object of class ‘atoms’ and FALSE otherwise.
basis, coords, pdb
x <- atoms(recname = c("ATOM","ATOM"), eleid = 1:2, elename = c("H","H"), alt = "",
resname = c("H2","H2"), chainid = "", resid = c(1,1), insert = "",
x1 = c(0,0), x2 = c(0,0), x3 = c(0,1), occ = c(0.0,0.0), temp = c(1.0,1.0),
segid = c("H2","H2"))
print(x)
is.atoms(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.