pdbs2pdb {bio3d} | R Documentation

## PDBs to PDB Converter

### Description

Convert a list of PDBs from an `"pdbs"` object to a list of `pdb` objects.

### Usage

    pdbs2pdb(pdbs, inds = NULL, rm.gaps = FALSE, all.atom=FALSE, ncore=NULL)

### Arguments

`pdbs` | a list of class `"pdbs"` containing PDB file data, as obtained from `read.fasta.pdb`, `pdbaln`, or `read.all`.
`inds` | a vector of indices that selects the PDB structures to convert.
`rm.gaps` | logical, if TRUE atoms in gap containing columns are removed in the output `pdb` objects.
`all.atom` | logical, if TRUE all atom data are converted (the ‘pdbs’ object must be obtained from `read.all`).
`ncore` | number of CPU cores used to do the calculation.

### Details

This function will generate a list of `pdb` objects from a `"pdbs"` class.

See examples for more details/

### Value

Returns a list of `pdb` objects.

### Author(s)

Lars Skjaerven

### References

Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.

### See Also

`read.pdb`, `pdbaln`, `read.fasta.pdb`.

### Examples

    ## Not run:
    ## Fetch PDBs
    pdb.ids <- c("1YX5_B", "3NOB", "1P3Q_U")
    #outdir <- paste(tempdir(), "/raw_pdbs", sep="")
    outdir = "raw_pdbs"
    raw.files <- get.pdb(pdb.ids, path = outdir)

    ## Split PDBs by chain ID and multi-model records
    all.files <- pdbsplit(raw.files, pdb.ids,
                    path =paste(outdir, "/split_chain", sep=""))

    ## Align and fit
    pdbs     <- pdbaln(all.files, fit=TRUE)

    ## Convert back to PDB objects
    all.pdbs <- pdbs2pdb(pdbs)

    ## Access the first PDB object
    ## all.pdbs[[1]]

    ## Return PDB objects consisting of only
    ## atoms in non-gap positions
    all.pdbs <- pdbs2pdb(pdbs, rm.gaps=TRUE)

    ## End(Not run)

[Package bio3d version 2.3-4 Index]