Learn R Programming

Rpdb (version 2.0)

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 class 'default': atoms(recname, eleid, elename, alt, resname, chainid, resid, insert, x1, x2, x3, occ, temp, segid, basis = "xyz", ...)

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.

Value

  • Return a data.frame of class atoms with the following components:
  • recnamea character vector containing the record name for each element.
  • eleida integer vector containing the element ID for each element.
  • elenamea character vector containing the element name for each element.
  • alta character vector containing the alternate location indicator for each element.
  • resnamea character vector containing the residue name for each element.
  • chainida character vector containing the chain ID for each element.
  • resida integer vector containing the residue ID for each element.
  • inserta character vector containing the codes for insertion of residue for each element.
  • x1, x2, x3a numeric vector containing the first, second and third coordinate for each element.
  • occa numeric vector containing the occupencie for each element.
  • tempa numeric vector containing the temperature factor for each element.
  • segida character vector containing the segment ID for each element.
  • basisa single element character vector indicating the type of basis vector used to express the atomic coordinates.

encoding

UTF-8

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).

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)
class(x)

Run the code above in your browser using DataLab