Creates an object of class ‘atoms’ containing the data related to ATOM and HETATM records of a PDB file.
atoms(...)# S3 method for default
atoms(
recname,
eleid,
elename,
alt,
resname,
chainid,
resid,
insert,
x1,
x2,
x3,
occ,
temp,
segid,
basis = "xyz",
...
)
is.atoms(x)
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.
arguments passed to methods.
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 of each element.
a numeric vector containing the first, second and third coordinate for each element.
a numeric vector containing the occupancie 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.
an R obecjt to be tested.
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 a 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
of class ‘atoms’, i.e. if it has a “class” attribute equal to
atoms
.
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)
Run the code above in your browser using DataLab