PDB (.pdb)
- Import supports Version 2.3 and previous versions of the PDB format, as well as several common variants.
- Export generates PDB 2.3 files.
Background & Context
-
- 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 & Export
- Import["file.pdb"] reads a PDB file and returns a symbolic representation of a biomolecule.
- The Wolfram Language provides a variety of 3D rendering styles for macromolecules.
- Export["file.pdb",expr] creates a PDB file from a biomolecule.
- Import["file.pdb"] returns a BioMolecule object.
- 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,…}].
- Export["file.pdb",biomol] exports the BioMolecule biomol.
- Export["file.pdb",{elem1->expr1,elem2->expr2,…}] uses rules to specify the elements to be exported.
- See the following reference pages for full general information:
-
Import, Export import from or export to a file CloudImport, CloudExport import from or export to a cloud object ImportString, ExportString import from or export to a string ImportByteArray, ExportByteArray import from or export to a byte array
Import Elements
- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements - Data elements:
-
"BioMolecule" a symbolic representation of the macromolecular model "Molecule" a symbolic representation of the molecular model - Import and Export use the "BioMolecule" element by default for the mmCIF format.
- A BioMolecule object contains information about the chains and residues, as well as atom types and coordinates. A Molecule object will assign bonds between atoms and discards metainformation such as residue and chain labels.
- Graphics element:
-
"Graphics3D" PDB file rendered as a Graphics3D object - Data representation elements:
-
"AdditionalAtoms" atoms that are not constituents of a chain "AdditionalCoordinates" 3D coordinates of additional atoms in angstroms "AdditionalIndex" index of additional atoms in VertexCoordinates and VertexTypes "AdditionalResidues" additional residue sequences given as an array of three-letter abbreviations "ResidueAtoms" list of residue atoms "ResidueChainLabels" list of chain labels "ResidueCoordinates" 3D coordinates of residue atoms "ResidueIndex" index of residue atoms in VertexCoordinates and VertexTypes "ResidueRoles" functional roles of residue atoms "Residues" residue sequences given as an array of three-letter abbreviations "Resolution" spatial resolution of the model coordinates in angstroms "SecondaryStructure" rules describing the large-scale structure of a chain "Sequence" residue sequences given as a list of strings "VertexCoordinates" atomic coordinates, typically given in angstroms "VertexTypes" all atoms or groups constituting the molecule, typically given as a list of chemical element abbreviations - The Wolfram Language uses the standard IUB/IUPAC abbreviations for amino acid residues.
- 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 in angstroms - Meta-information elements:
-
"Authors" author information as referenced in the file "Comments" comments and remarks stored in the file, given as a list of strings "DepositionDate" when the file was added to the database "PDBClassification" PDB classification from the file header "PDBID PDB structure identification string "References" bibliographic references, given as rules "Title" document title
Options
- The "BioMolecule" import element takes the following options:
-
"DetectSecondaryStructure" Automatic whether to scan the list of residues to detect helices and sheets - The "Graphics3D" import element takes the same options as BioMoleculePlot3D.
- Selecting a rendering style:
-
PlotTheme "Ribbons" specifies the visualization method - Supported plot themes include:
-
"Ribbons" display polymer chains as ribbons "Backbone" display polymer chains as ribbons "SolventAccessibleSurface" solvent accessible surface "GaussianSurface" Gaussian surface "VanDerWaalsSurface" van der Waals surface "BallAndStick" display atoms and bonds using Sphere and Cylinder primitives "Tubes" display bonds as tubes with no atoms "Spacefilling" atoms are depicted with spheres with radius matching the van der Waals radius
Examples
Basic Examples (7)
Import a large PDB file from the RCSB Protein Data Bank website:
Get the title of this PDB file:
Import the labels for each chain in the above molecule:
Show the Import elements available in a sample file:
Import the bibliographic references from this file:
Import the structure as a Molecule object:
Get the molecular mass and convert to kilodaltons:
This gives the same sequence as a string of single-character abbreviations:
Get structural information about this molecule:
Show the protein backbone in a stylized form:
Show the same protein, using standard colors for each residue:
This imports the sample file as a ball-and-stick graphic:
Import RNA and DNA sequences from this file:
Read all data from a PDB file and export it back to PDB:
Import a simple 3D model from a MOL file and export it to PDB:
Import the resulting PDB file as a 3D graphic:
Export a Molecule object as a PDB file: