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.

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()
}