This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
Mathematica Import/Export Format

PDB (.pdb)

MIME type: chemical/x-pdb
Protein Data Bank PDB files.
3D molecular model file.
Used in bioinformatics applications and on the web for storing and exchanging molecule models.
PDB is an acronym for Protein Data Bank.
Plain text format.
Stores structure information for large biological molecules such as proteins and nucleic acids.
Does not store chemical bond information.
Developed in 1971 at Brookhaven National Laboratory.
Maintained by the Research Collaboratory for Structural Bioinformatics (RCSB).
  • Import supports Version 2.3 and previous versions of the PDB format, as well as several common variants.
  • Import["file.pdb"] reads a PDB file and returns a stylized rendering of the protein.
  • Mathematica provides a variety of 3D rendering styles for macromolecules.
  • Import["file.pdb", elem] imports the specified element from a PDB file.
  • Import["file.pdb", {elem, suba, subb, ...}] imports a subelement.
  • Import["file.pdb", {{elem1, elem2, ...}}] imports multiple elements.
  • The import format can be specified with Import["file", "PDB"] or Import["file", {"PDB", elem, ...}].
  • See the reference pages for full general information on Import.
"Elements"list of elements and options available in this file
"Rules"full list of rules for each element and option
"Options"list of rules for options, properties, and settings
  • Graphics element:
"Graphics3D"PDB file rendered as a Graphics3D object
  • Import uses the "Graphics3D" element by default for the PDB format.
  • Data representation elements:
"Residues"residue sequences as an array of three-letter abbreviations
"Sequence"residue sequences given as a list of strings
"ResidueAtoms"list of residue atoms
"ResidueChainLabels"list of chain labels
"ResidueRoles"functional roles of residue atoms
"ResidueCoordinates"3D coordinates of residue atoms
"AdditionalAtoms"atoms that are not constituents of a chain
"AdditionalCoordinates"3D coordinates of additional atoms
"SecondaryStructure"rules describing the large-scale structure of a chain
"VertexCoordinates"atomic coordinates, typically given in picometers
"VertexTypes"all atoms or groups constituting the molecule, typically given as a list of chemical element abbreviations
  • When reading an incomplete chain which is missing one or more residues from PDB, Mathematica will represent it as a sequence of individual subchains.
  • Mathematica uses the standard IUB/IUPAC abbreviations for amino acid residues:
Aalanine (Ala)
Ccysteine (Cys)
Daspartic acid (Asp)
Eglutamic acid (Glu)
Fphenylalanine (Phe)
Gglycine (Gly)
Hhistidine (His)
Iisoleucine (Ile)
Klysine (Lys)
Lleucine (Leu)
Mmethionine (Met)
Nasparagine (Asn)
Pproline (Pro)
Qglutamine (Gln)
Rarginine (Arg)
Sserine (Ser)
Tthreonine (Thr)
Vvaline (Val)
Wtryptophan (Trp)
Ytyrosine (Tyr)
Xunspecified or unknown amino acid (Unk)
  • The following abbreviations are used to represent nucleic acids:
Aadenosine
Ccytidine
Gguanosine
Iinosine
Tthymidine
Uuridine
Xunspecified or unknown nucleic acid
  • When importing a PDB file that describes multiple 3D models of the same molecule, the following Import elements can be used to read the geometries of all models:
"ResidueCoordinatesList"residue coordinates for each model
"AdditionalCoordinatesList"3D coordinates of additional atoms for each model
"VertexCoordinatesList"atomic coordinates for each model, typically given in picometers
  • Meta-information elements:
"Author"author information as referenced in the file
"Comments"user comments stored in the file, given as a list of strings
"DepositionDate"when the file was added to the database
"Organism"organism in which this protein occurs
"References"bibliographic references, given as a list of rules
"Title"document title
  • General rendering options:
ImageSizeAutomaticspecifies the overall size of the graphics to display
BackgroundWhitespecifies what background color to use
ColorFunctionAutomaticfunction to apply to determine the coloring of secondary structure visualizations
ViewPointAutomaticpoint in space from which the 3D model is to be viewed
  • With the default setting "ViewPoint"->Automatic, Mathematica automatically calculates the optimal viewing angle for the imported molecule model.
  • Selecting a rendering style:
"Rendering""Structure"specifies the visualization method
  • Possible settings for "Rendering" are:
"BallAndStick"displays atoms and bonds as a ball-and-stick model
"Structure"stylized rendering of the protein backbone
"Spacefilling"atoms shown as overlapping spheres
"Wireframe"bonds rendered as lines