Create an Object of Class ‘pdb’
Creates an object of class 'pdb'.
pdb(...) ## Default S3 method: pdb(atoms, cryst1 = NULL, conect = NULL, remark = NULL, title = NULL, ...) is.pdb(x)
atoms |
a data.frame of class |
cryst1 |
a list of class |
conect |
a data.frame of class |
remark |
a character vector containing some REMARK records to be added to the |
title |
a character vector containing some TITLE records to be added to the |
x |
an R object to be tested |
... |
further arguments passed to or from other methods. |
This function is the generic function to create objects of class
‘pdb’. The purpose of this class is to store the data of molecular
systems contained in PDB files. The default method of the pdb
function
creates an object of class ‘pdb’ from its different components, i.e.:
title
, remark
, cryst1
, atoms
and conect
.
At least an object of class ‘atoms’ has to be specified. is.pdb
tests if x is an object of class ‘pdb’, i.e. if x has a
“class” attribute equal to pdb
.
pdb
returns a list of class ‘pdb’ with the following components:
title |
a character vector containing the TITLE records found in a PDB file. |
remark |
a character vector containing the REMARK records found in a PDB file. |
cryst1 |
a list of class ‘cryst1’ containing the first CRYST1 record found in a PDB file. All others are ignored. |
atoms |
a data.frame of class ‘atoms’ containing the ATOM and HETATM records found in a PDB file. |
conect |
a data.frame of class ‘conect’ containing the CONECT records found in a PDB file. |
is.pdb
returns TRUE if x is an object of class ‘pdb’ and FALSE otherwise.
title <- "This is just an example" remark <- NULL cryst1 <- cryst1(c(10,10,10)) atoms <- 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")) conect <- conect(eleid.1 = c(1), eleid.2 = c(2)) x <- pdb(atoms = atoms, cryst1 = cryst1, conect = conect, remark = remark, title = title) is.pdb(x)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.