Learn R Programming

Rpdb (version 2.3.4)

atoms: Create ‘atoms’ Object

Description

Creates an object of class ‘atoms’ containing the data related to ATOM and HETATM records of a PDB file.

Usage

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)

Value

atoms returns a data.frame of class ‘atoms’ with the following components:

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 for each element.

x1, x2, x3

a numeric vector containing the first, second and third coordinate for each element.

occ

a numeric vector containing the occupencie 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.

is.atoms returns TRUE if x is an object of class ‘atoms’ and FALSE otherwise.

Arguments

...

arguments passed to methods.

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.

x

an R obecjt to be tested.

Details

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.

See Also

basis, coords, pdb

Examples

Run this code
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