read_pdb: Read PDB File

View source: R/read_pdb.R

read_pdbR Documentation

Read PDB File

Description

Reads an PDB file and extracts the atom locations and bonds (does not include any other structual information currently). This pulls out ATOM and HETAHM records by default, along with available connections.

Usage

read_pdb(filename, atom = TRUE, nsr = TRUE)

Arguments

filename

Path to the PDB file.

atom

Default 'TRUE'. Whether to pull out standard residue (ATOM) records.

nsr

Default 'TRUE'. Whether to pull out nonstandard residue (HETAHM) records.

Value

List giving the atom locations.

Examples

#This assumes a hypothetical PDB file in your working directory:
if(file.exists("3nir.pdb")) {
  read_pdb("3nir.pdb") %>%
    generate_full_scene() %>%
    render_model()
}

raymolecule documentation built on May 29, 2024, 1:13 a.m.