๐Ÿงฌ PDB & Visualization
HOME

๐Ÿง  PDB & Visualization Fundamentals

๐ŸŽฏ What is the Protein Data Bank?

The Protein Data Bank (PDB) is the single worldwide archive of experimentally determined 3D structures of biological macromolecules โ€” proteins, nucleic acids, and their complexes. Founded in 1971, it's now managed by the Worldwide PDB (wwPDB) consortium and contains over 200,000 structures. Molecular visualization is the art and science of rendering these 3D structures to understand their function, interactions, and dynamics.

Why It Matters

Archive: All structures. Discovery: Drug targets. Analysis: Function. Teaching: Molecular biology. Research: Interactions. Publication: Figures.

๐Ÿ“Œ 200K+ Structures๐Ÿ“Œ 3D Coordinates๐Ÿ“Œ Visualization๐Ÿ“Œ Function
# Protein Data Bank & Visualization โ€” the big picture # The archive of 3D structures and how to see them. # CONCEPTUAL OVERVIEW print(""" === Protein Data Bank & Visualization === What it is: - Archive of 3D structures - Proteins, DNA, RNA - Complexes, ligands - 200,000+ structures Why it matters: - Structure โ†’ function - Drug discovery - Disease mechanisms - Protein engineering - Teaching - Publication Data types: - X-ray crystallography - Cryo-EM - NMR - Integrative File formats: - PDB (classic) - mmCIF (modern) - PDBx - BinaryCIF Visualization: - PyMOL - ChimeraX - VMD - Jmol - NGL - Mol* Workflow: 1. Search PDB 2. Download structure 3. Parse file 4. Visualize 5. Analyze 6. Publish Applications: - Drug design - Protein engineering - Antibody design - Enzyme mechanism - Variant interpretation - Structural genomics """) # WHY IT MATTERS print("=== Why It Matters ===") print(""" Biological questions: - What is the 3D structure? - How does it fold? - What is the active site? - How do ligands bind? - How do mutations affect it? PDB & visualization answer: - Atomic coordinates - Fold - Active sites - Binding pockets - Interactions """) # HISTORICAL CONTEXT print("=== Historical Context ===") print(""" 1971: PDB founded (Brookhaven) 1973: First structures 1998: RCSB PDB (Rutgers) 2003: wwPDB (RCSB, PDBe, PDBj) 2006: mmCIF adoption 2011: PDB40 2016: Cryo-EM revolution 2020: AlphaFold2 2021: PDB50 2022: AlphaFold DB 2024: 200,000+ structures """) # CHALLENGES print("=== Challenges ===") print(""" 1. DATA QUALITY - Resolution - R-factor - Missing residues 2. LARGE STRUCTURES - Cryo-EM - Complexes - Virus capsids 3. VISUALIZATION - Large data - Performance - Clarity 4. ANALYSIS - Interactions - Dynamics - Function 5. INTEGRATION - AlphaFold - Cryo-EM - Other data """)

๐ŸŽฏ Why PDB & Visualization Matter

๐ŸŽฏ The Value of Structural Data

The PDB and visualization tools are foundational to structural biology, drug discovery, and molecular research.

Key Applications

Drugs: Targets. Disease: Mutations. Function: Mechanism. Teaching: Education. Publication: Figures. Design: Proteins.

๐ŸŽฏ Drug discovery๐ŸŽฏ Disease๐ŸŽฏ Function๐ŸŽฏ Teaching
# Why PDB & Visualization Matter print("=== 1. Drug Discovery ===") print(""" Drug discovery: - Target structure - Binding pockets - Virtual screening - Lead optimization Workflow: 1. Download structure 2. Identify pocket 3. Dock compounds 4. Optimize 5. Test Examples: - HIV protease - Kinases - GPCRs - SARS-CoV-2 Tools: - PyMOL - AutoDock - ChimeraX """) print("\n=== 2. Disease Mechanisms ===") print(""" Disease: - Mutation impact - Stability - Interactions Workflow: 1. Wild-type structure 2. Mutant model 3. Compare 4. Assess impact Examples: - Cancer mutations - Rare disease - Pharmacogenomics Tools: - PyMOL - FoldX - ChimeraX """) print("\n=== 3. Protein Function ===") print(""" Function: - Active site - Binding - Catalysis - Regulation Workflow: 1. Structure 2. Identify site 3. Analyze 4. Mechanism Examples: - Enzymes - Receptors - Transporters - Channels Tools: - PyMOL - ChimeraX - VMD """) print("\n=== 4. Teaching ===") print(""" Teaching: - Molecular biology - Biochemistry - Structural biology - Drug design Examples: - DNA structure - Hemoglobin - ATP synthase - Ribosome Tools: - Jmol - NGL - Mol* - PyMOL """) print("\n=== 5. Publication ===") print(""" Publication: - Figures - Cartoons - Surfaces - Ray-traced Workflow: 1. Load structure 2. Style 3. Color 4. Ray trace 5. Export Tools: - PyMOL - ChimeraX - VMD """) print("\n=== 6. Protein Engineering ===") print(""" Engineering: - Design - Stability - Activity Workflow: 1. Structure 2. Design 3. Model 4. Test Examples: - Enzymes - Antibodies - Biosensors Tools: - PyMOL - Rosetta - ChimeraX """) print("\n=== 7. Structural Genomics ===") print(""" Structural genomics: - Many structures - Coverage - Function Examples: - PDB (200K) - AlphaFold DB (200M) - Model organisms Tools: - RCSB PDB - PDBe - PDBj """) print("\n=== 8. Integrative Structural Biology ===") print(""" Integrative: - Combine methods - X-ray + cryo-EM - NMR + SAXS - Cross-linking Workflow: 1. Data 2. Integration 3. Model 4. Validate Tools: - ChimeraX - IMP - HADDOCK """)

๐Ÿ“œ PDB History & wwPDB

๐ŸŽฏ The Worldwide Archive

The PDB has grown from a small tape archive to a global consortium managing hundreds of thousands of structures.

History

1971: Founded. 1998: RCSB. 2003: wwPDB. 2006: mmCIF. 2020: AlphaFold. 2024: 200K+ structures.

๐Ÿ“œ 1971๐Ÿ“œ wwPDB๐Ÿ“œ RCSB๐Ÿ“œ PDBe
# PDB History & wwPDB print("=== History ===") print("" 1971: PDB founded at Brookhaven 1973: First structures (myoglobin, hemoglobin) 1998: RCSB PDB (Rutgers, UCSD) 2003: wwPDB formed 2006: mmCIF adopted 2011: PDB40 (40 years) 2016: Cryo-EM revolution 2020: AlphaFold2 2021: PDB50 (50 years) 2022: AlphaFold DB (200M) 2024: 200,000+ structures """) print("\n=== wwPDB Consortium ===") print("" wwPDB (Worldwide PDB): - Global organization - Single archive - Multiple sites Members: - RCSB PDB (USA) - PDBe (Europe) - PDBj (Japan) - BMRB (NMR) Functions: - Deposition - Annotation - Validation - Distribution """) print("\n=== RCSB PDB ===") print("" RCSB PDB: - USA - Rutgers, UCSD - Main portal Features: - Search - Browse - Download - Analyze - Visualize URL: www.rcsb.org """) print("\n=== PDBe ===") print("" PDBe: - Europe - EMBL-EBI - Comprehensive Features: - Search - Analysis - Validation - Integration URL: www.ebi.ac.uk/pdbe """) print("\n=== PDBj ===") print("" PDBj: - Japan - Osaka University - Asia-Pacific Features: - Search - Analysis - Tools - Integration URL: pdbj.org """) print("\n=== BMRB ===") print("" BMRB: - NMR data - Madison, WI - BioMagResBank Features: - NMR restraints - Chemical shifts - Dynamics """) print("\n=== Statistics ===") print("" Structures: - 200,000+ total - X-ray: ~85% - Cryo-EM: ~10% - NMR: ~5% Growth: - 1971: 7 - 1990: 500 - 2000: 13,000 - 2010: 65,000 - 2020: 160,000 - 2024: 200,000+ Cryo-EM: - Rapid growth - Large complexes - 2020: ~5,000 - 2024: ~20,000 """)

๐Ÿ“„ PDB Format

๐ŸŽฏ The Classic Format

The PDB format is a fixed-column text format for storing 3D structural data. It's the classic format, still widely used.

PDB Format

Records: HEADER, ATOM, HETATM. Columns: Fixed. 80 chars: Limit. Legacy: Classic. mmCIF: Modern.

๐Ÿ“„ Records๐Ÿ“„ ATOM๐Ÿ“„ HETATM๐Ÿ“„ Fixed columns
# PDB Format print("=== Records ===") print("" HEADER: Metadata TITLE: Title COMPND: Compound SOURCE: Source KEYWDS: Keywords EXPDTA: Experiment AUTHOR: Authors REVDAT: Revision SEQRES: Sequence HELIX: Helices SHEET: Sheets ATOM: Atoms HETATM: Ligands CONECT: Connectivity TER: Terminator END: End """) print("\n=== ATOM Record ===") print("" ATOM: - Atomic coordinates - 80 columns - Fixed format Columns: 1-6: Record name ("ATOM ") 7-11: Serial 13-16: Atom name 17: Alt loc 18-20: Residue name 22: Chain ID 23-26: Residue seq 27: Insertion 31-38: X 39-46: Y 47-54: Z 55-60: Occupancy 61-66: B-factor 77-78: Element 79-80: Charge Example: ATOM 1 N MET A 1 27.340 24.430 2.614 1.00 9.67 N """) print("\n=== HETATM Record ===") print("" HETATM: - Non-standard residues - Ligands - Water - Ions Example: HETATM 1000 O HOH A 101 20.000 30.000 15.000 1.00 20.00 O """) print("\n=== Example PDB ===") print("" HEADER HYDROLASE 01-JAN-00 1ABC TITLE CRYSTAL STRUCTURE OF PROTEIN COMPND MOL_ID: 1; COMPND 2 MOLECULE: PROTEIN; SOURCE MOL_ID: 1; SOURCE 2 ORGANISM_SCIENTIFIC: HOMO SAPIENS; EXPDTA X-RAY DIFFRACTION AUTHOR A.SMITH,B.JONES REVDAT 1 01-JAN-00 1ABC 0 SEQRES 1 A 100 MET VAL LEU SER PRO ALA ASP LYS THR ASN VAL LYS HELIX 1 1 ALA A 5 LEU A 15 1 11 SHEET 1 A 2 VAL A 20 ILE A 25 0 ATOM 1 N MET A 1 27.340 24.430 2.614 1.00 9.67 N ATOM 2 CA MET A 1 26.266 25.413 2.842 1.00 10.38 C ... HETATM 1000 O HOH A 101 20.000 30.000 15.000 1.00 20.00 O CONECT 1000 1001 TER 2000 MET A 1 END """) print("\n=== Limitations ===") print("" Limitations: - 80-column limit - Large structures truncated - No rich metadata - Ambiguous for some data - Legacy Solution: - mmCIF (modern) - PDBx - BinaryCIF """)

๐Ÿ“‹ mmCIF Format

๐ŸŽฏ The Modern Format

mmCIF (macromolecular Crystallographic Information File) is the modern, flexible, extensible format for structural data, now the recommended format.

mmCIF

Flexible: No column limit. Extensible: New categories. Rich: Metadata. Standard: wwPDB. Large: Structures. BinaryCIF: Compact.

๐Ÿ“‹ Flexible๐Ÿ“‹ Extensible๐Ÿ“‹ Rich metadata๐Ÿ“‹ Standard
# mmCIF Format print("=== mmCIF ===") print("" mmCIF: - Macromolecular CIF - Modern format - Recommended - PDBx Advantages: - No column limits - Extensible - Rich metadata - Data types - Large structures Categories: - _atom_site - _struct - _entity - _refine - _citation - _pdbx_* """) print("\n=== Atom Site ===") print("" _atom_site: - Atomic coordinates - Loop format Columns: - group_PDB - id - type_symbol - label_atom_id - label_comp_id - label_asym_id - label_seq_id - Cartn_x - Cartn_y - Cartn_z - occupancy - B_iso_or_equiv Example: loop_ _atom_site.group_PDB _atom_site.id _atom_site.type_symbol _atom_site.label_atom_id _atom_site.label_comp_id _atom_site.label_asym_id _atom_site.label_seq_id _atom_site.Cartn_x _atom_site.Cartn_y _atom_site.Cartn_z _atom_site.occupancy _atom_site.B_iso_or_equiv ATOM 1 N N MET A 1 27.340 24.430 2.614 1.00 9.67 ATOM 2 C CA MET A 1 26.266 25.413 2.842 1.00 10.38 """) print("\n=== Categories ===") print("" _struct: - Title - Keywords - Experiment _entity: - Molecules - Sequences _refine: - Refinement - R-factor - Resolution _citation: - Publication _pdbx_*: - Extensions - Validation - Metadata """) print("\n=== Example mmCIF ===") print("" data_1ABC # _entry.id 1ABC # _struct.title ;CRYSTAL STRUCTURE OF PROTEIN ; # _struct_keywords.entry_id 1ABC _struct_keywords.text "hydrolase, protein" # _cell.length_a 50.000 _cell.length_b 60.000 _cell.length_c 70.000 # loop_ _atom_site.group_PDB _atom_site.id _atom_site.type_symbol _atom_site.label_atom_id _atom_site.label_comp_id _atom_site.label_asym_id _atom_site.label_seq_id _atom_site.Cartn_x _atom_site.Cartn_y _atom_site.Cartn_z _atom_site.occupancy _atom_site.B_iso_or_equiv ATOM 1 N N MET A 1 27.340 24.430 2.614 1.00 9.67 ATOM 2 C CA MET A 1 26.266 25.413 2.842 1.00 10.38 # """) print("\n=== BinaryCIF ===") print("" BinaryCIF: - Binary version - Compact - Fast - Mol* Advantages: - Smaller files - Faster parsing - Web-friendly Use: - Mol* - RCSB PDB - Web viewers """) print("\n=== PDB vs mmCIF ===") print(f"{'Feature':<20} {'PDB':<20} {'mmCIF':<20}") print("-" * 60) print(f"{'Format':<20} {'Text':<20} {'Text':<20}") print(f"{'Columns':<20} {'Fixed':<20} {'Flexible':<20}") print(f"{'Limit':<20} {'80 chars':<20} {'None':<20}") print(f"{'Metadata':<20} {'Limited':<20} {'Rich':<20}") print(f"{'Large':<20} {'Truncated':<20} {'Supported':<20}") print(f"{'Standard':<20} {'Legacy':<20} {'Modern':<20}") print(f"{'Recommend':<20} {'No':<20} {'Yes':<20}")

๐ŸŒ Accessing PDB Data

๐ŸŽฏ Finding and Downloading Structures

There are many ways to search, browse, and download structures from the PDB archives.

Access

RCSB: Web portal. PDBe: Europe. PDBj: Japan. API: Programmatic. FTP: Bulk. AlphaFold: Predicted.

๐ŸŒ RCSB๐ŸŒ PDBe๐ŸŒ API๐ŸŒ FTP
# Accessing PDB Data print("=== RCSB PDB ===") print("" RCSB PDB: - Web portal - Search - Browse - Download Search: - By PDB ID - By sequence - By ligand - By keyword - Advanced URL: www.rcsb.org """) print("\n=== Download URLs ===") print("" PDB format: https://files.rcsb.org/download/1ABC.pdb mmCIF: https://files.rcsb.org/download/1ABC.cif Large: https://files.rcsb.org/download/1ABC.cif.gz Biological assembly: https://files.rcsb.org/download/1ABC.pdb1 Ligand: https://files.rcsb.org/ligands/download/ATP.cif """) print("\n=== RCSB API ===") print("" RCSB API: - REST - JSON - Programmatic Search: https://search.rcsb.org/rcsbsearch/v2/query Data: https://data.rcsb.org/rest/v1/core/entry/1ABC Examples: - Entry data - Polymer entity - Ligand - Assembly """) print("\n=== PDBe API ===") print("" PDBe API: - REST - JSON - Comprehensive Examples: https://www.ebi.ac.uk/pdbe/api/pdb/entry/summary/1abc Endpoints: - Summary - Molecules - Experiments - Validation """) print("\n=== Batch Download ===") print("" FTP: ftp.wwpdb.org Rsync: rsync.wwpdb.org Bulk: - All PDB: ~1 TB - All mmCIF: ~500 GB - Weekly updates """) print("\n=== AlphaFold DB ===") print("" AlphaFold DB: - 200M+ structures - Predicted - Free Access: https://alphafold.ebi.ac.uk/ Download: https://alphafold.ebi.ac.uk/files/AF-P12345-F1-model_v4.pdb API: https://alphafold.ebi.ac.uk/api/prediction/P12345 """) print("\n=== Search Examples ===") print("" By PDB ID: https://www.rcsb.org/structure/1ABC By sequence: https://www.rcsb.org/search?request=... By ligand: https://www.rcsb.org/search?request=... By UniProt: https://www.rcsb.org/search?request=... """) print("\n=== Python Access ===") print("" from Bio.PDB import PDBList pdbl = PDBList() # Download PDB pdbl.retrieve_pdb_file("1ABC", pdir=".", file_format="pdb") # Download mmCIF pdbl.retrieve_pdb_file("1ABC", pdir=".", file_format="mmCif") # Download all pdbl.download_pdb_files(["1ABC", "2DEF"], pdir=".") """)

๐Ÿ–ฅ๏ธ PyMOL

๐ŸŽฏ The Standard Visualization Tool

PyMOL is the most widely used molecular visualization tool, known for its scripting, ray tracing, and publication-quality images.

PyMOL

Visualization: Cartoon, sticks. Scripting: Python. Ray trace: Publication. Selection: Powerful. Align: Structures. Measure: Distances.

๐Ÿ–ฅ๏ธ Cartoon๐Ÿ–ฅ๏ธ Scripting๐Ÿ–ฅ๏ธ Ray trace๐Ÿ–ฅ๏ธ Selection
# PyMOL print("=== Basics ===") print("" PyMOL: - Most popular - Visualization - Scripting - Free (open-source) Features: - Cartoon, surface, sticks - Color by pLDDT - Align structures - Measure distances - Mutagenesis - Ray tracing Commands: load 1abc.pdb show cartoon color blue select active, resi 100-110 show sticks, active ray 1200, 900 png output.png """) print("\n=== Visualization Styles ===") print("" Cartoon: - Secondary structure - Default - Clear Surface: - Molecular surface - Binding - Electrostatics Sticks: - Bonds - Ligands - Side chains Spheres: - Atoms - Metal ions Ribbon: - Backbone - Smooth Lines: - Fast - Simple """) print("\n=== Coloring ===") print("" By chain: color red, chain A color blue, chain B By secondary structure: color red, ss h color yellow, ss s color green, ss l By pLDDT (AlphaFold): color red, b < 50 color yellow, b > 50 and b < 70 color green, b > 70 and b < 90 color blue, b > 90 By residue: color red, resn ASP color blue, resn LYS """) print("\n=== Selections ===") print("" Selection: select active, resi 100-110 select ligand, resn ATP select chainA, chain A select interface, byres (chain A within 5 of chain B) select pocket, byres (ligand around 5) Logic: and, or, not within, around byres """) print("\n=== Alignment ===") print("" Align: align 1abc, 2def Super: super 1abc, 2def RMSD: rms_cur 1abc, 2def Output: RMSD: 1.234 Aligned atoms: 100 """) print("\n=== Measurement ===") print("" Distance: distance d1, resi 100 and name CA, resi 200 and name CA Angle: angle a1, resi 100 and name CA, resi 101 and name CA, resi 102 and name CA Dihedral: dihedral d1, resi 100 and name N, resi 100 and name CA, resi 100 and name C, resi 101 and name N """) print("\n=== Ray Tracing ===") print("" Ray: ray 1200, 900 Settings: set ray_shadows, 0 set ray_opaque_background, 0 set antialias, 2 set ray_trace_mode, 1 Export: png output.png ray 3000, 2400 png high_res.png """) print("\n=== Scripting ===") print("" Script (script.pml): load 1abc.pdb show cartoon color blue select active, resi 100-110 show sticks, active ray 1200, 900 png output.png Run: pymol script.pml Python: from pymol import cmd cmd.load("1abc.pdb") cmd.show("cartoon") """) print("\n=== Session ===") print("" Save: save session.pse Load: load session.pse """)

๐Ÿงช ChimeraX

๐ŸŽฏ The Modern Successor

ChimeraX is the modern successor to Chimera, offering high-quality visualization, large structure support, and AlphaFold integration.

ChimeraX

Modern: 2020+. Large: Structures. AlphaFold: Integration. Volume: Cryo-EM. MD: Trajectories. Free: Academic.

๐Ÿงช Modern๐Ÿงช AlphaFold๐Ÿงช Cryo-EM๐Ÿงช Large structures
# ChimeraX print("=== Basics ===") print("" ChimeraX: - Modern - Visualization - Analysis - Free for academics Features: - High quality - Large structures - AlphaFold - Volume (cryo-EM) - MD - Python scripting Commands: open 1abc.pdb cartoon color bychain view save output.png """) print("\n=== Visualization ===") print("" Styles: cartoon atoms sticks surface ribbon spheres Color: color bychain color byhetero color byattribute bfactor palette alphafold color red """) print("\n=== AlphaFold ===") print("" Open AlphaFold: open alphafold_model.pdb Color by pLDDT: color byattribute bfactor palette alphafold Interpret: Blue: High confidence Green: Good Yellow: Low Red: Very low """) print("\n=== Selections ===") print("" Select: select #1/A:100-110 select ligand select protein select nucleic Commands: show sel hide sel color red sel """) print("\n=== Analysis ===") print("" Distances: distance #1/A:100@CA #1/B:200@CA H-bonds: hbonds Contacts: contacts Clashes: clashes Interfaces: interface #1 #2 """) print("\n=== Volume (Cryo-EM) ===") print("" Open map: open map.mrc Fit model: fitmap #1 inMap #2 Display: volume #2 molmap #1 3 Color: volume #2 color red """) print("\n=== MD Trajectories ===") print("" Open: open trajectory.dcd structure.pdb Play: coordset #1 1,100 Analysis: rmsd #1 rmsf #1 """) print("\n=== Python Scripting ===") print("" Command: runscript script.py Script: from chimerax.core.commands import run run(session, "open 1abc.pdb") run(session, "cartoon") run(session, "color blue") run(session, "save output.png") """) print("\n=== Comparison with PyMOL ===") print(f"{'Feature':<20} {'PyMOL':<20} {'ChimeraX':<20}") print("-" * 60) print(f"{'Visualization':<20} {'Excellent':<20} {'Excellent':<20}") print(f"{'Ray tracing':<20} {'Excellent':<20} {'Good':<20}") print(f"{'Large structures':<20} {'Limited':<20} {'Excellent':<20}") print(f"{'AlphaFold':<20} {'Good':<20} {'Excellent':<20}") print(f"{'Cryo-EM':<20} {'Limited':<20} {'Excellent':<20}") print(f"{'Scripting':<20} {'Python':<20} {'Python':<20}") print(f"{'Price':<20} {'Free':<20} {'Free (academic)':<20}")

๐ŸŒ€ VMD & Dynamics

๐ŸŽฏ Molecular Dynamics Visualization

VMD (Visual Molecular Dynamics) is designed for visualizing and analyzing molecular dynamics trajectories.

VMD

MD: Trajectories. Analysis: RMSD, RMSF. Visualization: High quality. Scripting: Tcl. Free: Academic. Large: Systems.

๐ŸŒ€ MD๐ŸŒ€ Trajectories๐ŸŒ€ RMSD๐ŸŒ€ Analysis
# VMD print("=== Basics ===") print("" VMD (Visual Molecular Dynamics): - MD visualization - Analysis - Free Features: - Trajectories - Analysis - Scripting (Tcl) - High quality Commands: mol new 1abc.pdb display projection orthographic color Display Background white """) print("\n=== MD Trajectories ===") print("" Load: mol new structure.pdb mol addfile trajectory.dcd waitfor all Play: animate forward animate goto 0 animate goto 100 Step: animate goto 50 """) print("\n=== Analysis ===") print("" RMSD: set sel [atomselect top "protein"] set ref [atomselect top "protein" frame 0] $sel frame 0 $sel move [measure fit $sel $ref] measure rmsd $sel $ref RMSF: set sel [atomselect top "protein"] measure rmsf $sel Radius of gyration: measure rgyr $sel H-bonds: measure hbonds 3.5 30 """) print("\n=== Visualization ===") print("" Styles: display representation NewCartoon display representation Licorice display representation Surf Color: color Display Background white color Structure color Chain color ResName """) print("\n=== Rendering ===") print("" Tachyon: render Tachyon internal output.tga POV-Ray: render POV3 output.pov povray output.pov Settings: display resize 1200 900 display ambientocclusion on """) print("\n=== Scripting ===") print("" Script (script.tcl): mol new 1abc.pdb display projection orthographic display resize 1200 900 color Display Background white display representation NewCartoon render Tachyon internal output.tga Run: vmd -e script.tcl """) print("\n=== Uses ===") print("" Applications: - MD trajectories - Conformational changes - Binding - Folding - Stability Examples: - Protein dynamics - Ligand binding - Membrane proteins - Nucleic acids """)

๐ŸŒ Web Viewers (Jmol, NGL, Mol*)

๐ŸŽฏ Visualization in the Browser

Web-based viewers allow interactive 3D visualization without installing software, making structural biology accessible to everyone.

Web Viewers

Jmol: Java. NGL: WebGL. Mol*: Modern. 3Dmol.js: JS. PV: Protein Viewer. Embed: Websites.

๐ŸŒ Jmol๐ŸŒ NGL๐ŸŒ Mol*๐ŸŒ 3Dmol.js
# Web Viewers print("=== Jmol ===") print("" Jmol: - Java - Web - Classic Features: - Interactive - Scripting - Wide support URL: jmol.sourceforge.net Embed: """) print("\n=== NGL ===") print("" NGL: - WebGL - Modern - Interactive Features: - Fast - Beautiful - Large structures - Mobile URL: nglviewer.org Embed:
""") print("\n=== Mol* ===") print("" Mol*: - Modern - WebGL - RCSB PDB Features: - Fast - Beautiful - Large structures - Annotations - AlphaFold URL: molstar.org Used by: - RCSB PDB - PDBe - AlphaFold DB """) print("\n=== 3Dmol.js ===") print("" 3Dmol.js: - JavaScript - WebGL - Lightweight Features: - Simple - Fast - Embeddable Embed:
""") print("\n=== Protein Viewer ===") print("" PV (Protein Viewer): - JavaScript - WebGL - Simple Features: - Lightweight - Fast - Embeddable URL: biojs.net """) print("\n=== Comparison ===") print(f"{'Viewer':<20} {'Tech':<15} {'Best For':<25}") print("-" * 60) print(f"{'Jmol':<20} {'Java':<15} {'Classic':<25}") print(f"{'NGL':<20} {'WebGL':<15} {'Modern web':<25}") print(f"{'Mol*':<20} {'WebGL':<15} {'RCSB, large':<25}") print(f"{'3Dmol.js':<20} {'JS':<15} {'Lightweight':<25}") print(f"{'PV':<20} {'JS':<15} {'Simple':<25}") print(f"{'PyMOL':<20} {'Desktop':<15} {'Publication':<25}") print("\n=== Embedding in Websites ===") print("" NGL example:
""")

๐Ÿ Python Integration

๐ŸŽฏ Structural Bioinformatics in Python

You can parse, analyze, and visualize PDB structures from Python using Biopython, PyMOL API, MDAnalysis, and ProDy.

Python

Biopython: Parse PDB. PyMOL: Visualize. MDAnalysis: Dynamics. ProDy: Analysis. Requests: Download. Pipeline: Automate.

๐Ÿ Biopython๐Ÿ PyMOL๐Ÿ MDAnalysis๐Ÿ ProDy
# Python Integration print("=== Parse PDB with Biopython ===") print("" from Bio.PDB import PDBParser def parse_pdb(pdb_file): \"\"\"Parse PDB file.\"\"\" parser = PDBParser() structure = parser.get_structure("protein", pdb_file) print(f"Model: {structure}") for model in structure: print(f"Chains: {len(model)}") for chain in model: print(f" Chain {chain.id}: {len(chain)} residues") for residue in chain: print(f" {residue.resname} {residue.id}") for atom in residue: print(f" {atom.name}: {atom.coord}") return structure # Use # structure = parse_pdb("1abc.pdb") """) print("\n=== Download from PDB ===") print("" from Bio.PDB import PDBList def download_pdb(pdb_id, output_dir="."): \"\"\"Download PDB file.\"\"\" pdbl = PDBList() file = pdbl.retrieve_pdb_file( pdb_id, pdir=output_dir, file_format="pdb" ) return file # Use # file = download_pdb("1ABC") """) print("\n=== Analyze Structure ===") print("" from Bio.PDB import PDBParser import numpy as np def analyze_structure(pdb_file): \"\"\"Analyze structure.\"\"\" parser = PDBParser() structure = parser.get_structure("protein", pdb_file) # Residue count residues = list(structure.get_residues()) print(f"Residues: {len(residues)}") # Atoms atoms = list(structure.get_atoms()) print(f"Atoms: {len(atoms)}") # CA coordinates ca_coords = [] for residue in residues: if "CA" in residue: ca_coords.append(residue["CA"].coord) # Center center = np.mean(ca_coords, axis=0) print(f"Center: {center}") # Radius of gyration rg = np.sqrt(np.mean(np.sum((ca_coords - center)**2, axis=1))) print(f"Radius of gyration: {rg:.2f} ร…") return structure # Use # structure = analyze_structure("1abc.pdb") """) print("\n=== PyMOL from Python ===") print("" import pymol from pymol import cmd def visualize_pymol(pdb_file, output_png="output.png"): \"\"\"Visualize with PyMOL.\"\"\" pymol.finish_launching(['pymol', '-qc']) cmd.load(pdb_file) cmd.show("cartoon") cmd.color("blue") cmd.bg_color("white") # Ray trace cmd.ray(1200, 900) cmd.png(output_png) print(f"Saved {output_png}") # Use # visualize_pymol("1abc.pdb") """) print("\n=== Color by pLDDT ===") print("" import pymol from pymol import cmd def color_plddt(pdb_file, output_png="alphafold.png"): \"\"\"Color AlphaFold model by pLDDT.\"\"\" pymol.finish_launching(['pymol', '-qc']) cmd.load(pdb_file) cmd.show("cartoon") # Color by pLDDT cmd.color("red", "b < 50") cmd.color("yellow", "b > 50 and b < 70") cmd.color("green", "b > 70 and b < 90") cmd.color("blue", "b > 90") cmd.bg_color("white") cmd.ray(1200, 900) cmd.png(output_png) # Use # color_plddt("alphafold_model.pdb") """) print("\n=== MDAnalysis ===") print("" import MDAnalysis as mda def analyze_md(topology, trajectory): \"\"\"Analyze MD trajectory.\"\"\" u = mda.Universe(topology, trajectory) print(f"Atoms: {len(u.atoms)}") print(f"Frames: {len(u.trajectory)}") # RMSD from MDAnalysis.analysis import rms R = rms.RMSD(u, u, select="backbone") R.run() print(f"RMSD: {R.rmsd[-1, 2]:.2f} ร…") # RMSF from MDAnalysis.analysis import rms c_alphas = u.select_atoms("name CA") R = rms.RMSF(c_alphas).run() print(f"Mean RMSF: {R.results.rmsf.mean():.2f} ร…") return u # Use # u = analyze_md("structure.pdb", "trajectory.dcd") """) print("\n=== ProDy ===") print("" import prody def analyze_prody(pdb_file): \"\"\"Analyze with ProDy.\"\"\" structure = prody.parsePDB(pdb_file) print(f"Atoms: {structure.numAtoms()}") print(f"Residues: {structure.numResidues()}") print(f"Chains: {structure.numChains()}") # CA atoms ca = structure.select("name CA") # ANM anm = prody.ANM("protein") anm.buildHessian(ca) anm.calcModes() print(f"Modes: {anm.numModes()}") return structure # Use # structure = analyze_prody("1abc.pdb") """) print("\n=== Complete Pipeline ===") print("" import subprocess from Bio.PDB import PDBList, PDBParser import numpy as np def pdb_pipeline(pdb_id, output_dir="pdb_output"): \"\"\"Complete PDB pipeline.\"\"\" import os os.makedirs(output_dir, exist_ok=True) # 1. Download print("Downloading...") pdbl = PDBList() pdb_file = pdbl.retrieve_pdb_file( pdb_id, pdir=output_dir, file_format="pdb" ) # 2. Parse print("Parsing...") parser = PDBParser() structure = parser.get_structure(pdb_id, pdb_file) # 3. Analyze residues = list(structure.get_residues()) atoms = list(structure.get_atoms()) print(f"Residues: {len(residues)}") print(f"Atoms: {len(atoms)}") return structure # Use # structure = pdb_pipeline("1ABC") """)

๐Ÿ”ฌ Structural Analysis

๐ŸŽฏ Beyond Visualization

Structural analysis extracts quantitative insights: interactions, cavities, interfaces, and dynamics.

Analysis

Interactions: H-bonds, salt bridges. Cavities: Pockets. Interfaces: Complexes. Dynamics: MD. Conservation: Evolution. Docking: Ligands.

๐Ÿ”ฌ Interactions๐Ÿ”ฌ Cavities๐Ÿ”ฌ Interfaces๐Ÿ”ฌ Dynamics
# Structural Analysis print("=== Interactions ===") print("" H-bonds: - Donor-acceptor - Distance < 3.5 ร… - Angle > 120ยฐ Salt bridges: - Opposite charges - Distance < 4 ร… Hydrophobic: - Nonpolar - Distance < 5 ร… Tools: - PyMOL - ChimeraX - HBPLUS - NACCESS """) print("\n=== Cavities & Pockets ===") print("" Cavities: - Internal voids - Ligand binding - Active sites Tools: - CASTp - fpocket - SiteMap - PyMOL Workflow: 1. Structure 2. Cavity detection 3. Analyze 4. Dock """) print("\n=== Interfaces ===") print("" Interface: - Protein-protein - Protein-ligand - Protein-DNA Analysis: - Buried surface area - H-bonds - Salt bridges - Hydrophobic Tools: - PISA - PDBePISA - jsPISA - NACCESS """) print("\n=== Dynamics ===") print("" Dynamics: - MD simulation - Conformational changes - Flexibility Analysis: - RMSD - RMSF - PCA - Correlation Tools: - GROMACS - AMBER - MDAnalysis - VMD """) print("\n=== Conservation ===") print("" Conservation: - Evolutionary - Functional sites - Binding Tools: - ConSurf - Rate4Site - JSD Workflow: 1. MSA 2. Tree 3. Rate 4. Map to structure """) print("\n=== Docking ===") print("" Docking: - Ligand-protein - Protein-protein - Virtual screening Tools: - AutoDock - AutoDock Vina - HADDOCK - Glide Workflow: 1. Receptor 2. Ligand 3. Docking 4. Scoring 5. Analysis """) print("\n=== Validation ===") print("" Validation: - Ramachandran - Rotamers - Clashes - Bonds Tools: - MolProbity - PROCHECK - QMEAN - ERRAT """) print("\n=== Best Practices ===") print("" 1. Use multiple tools 2. Check quality 3. Validate 4. Compare 5. Document 6. Report 7. Publish 8. Reproduce """)

โš–๏ธ Tool Comparison

๐ŸŽฏ Which Tool?

Choosing the right visualization tool depends on your needs: scripting, publication, MD, or web.

Comparison

PyMOL: Scripting. ChimeraX: Modern. VMD: MD. Jmol: Web. NGL: Web. Mol*: Modern web.

โš–๏ธ PyMOLโš–๏ธ ChimeraXโš–๏ธ VMDโš–๏ธ NGL
Tool Platform Best For Price Scripting
PyMOLDesktopPublication, scriptingFreePython
ChimeraXDesktopModern, large structuresFree (academic)Python
VMDDesktopMD trajectoriesFreeTcl
JmolWeb/JavaWeb, teachingFreeJmol
NGLWebModern webFreeJavaScript
Mol*WebRCSB PDB, largeFreeJavaScript
3Dmol.jsWebLightweightFreeJavaScript
CootDesktopCrystallographyFreeScheme
# Decision Guide print("=== Choose Tool ===") print("" Publication figures: โ†’ PyMOL (ray tracing) โ†’ ChimeraX Modern visualization: โ†’ ChimeraX Scripting: โ†’ PyMOL (Python) โ†’ ChimeraX (Python) MD trajectories: โ†’ VMD โ†’ PyMOL Web embedding: โ†’ NGL โ†’ Mol* โ†’ 3Dmol.js Teaching: โ†’ Jmol โ†’ NGL โ†’ Mol* Large structures: โ†’ ChimeraX โ†’ Mol* Crystallography: โ†’ Coot โ†’ PyMOL """) print("\n=== Feature Comparison ===") print(f"{'Feature':<20} {'PyMOL':<15} {'ChimeraX':<15} {'VMD':<15}") print("-" * 65) print(f"{'Visualization':<20} {'Excellent':<15} {'Excellent':<15} {'Good':<15}") print(f"{'Ray tracing':<20} {'Excellent':<15} {'Good':<15} {'Good':<15}") print(f"{'MD':<20} {'Good':<15} {'Good':<15} {'Excellent':<15}") print(f"{'Large':<20} {'Limited':<15} {'Excellent':<15} {'Good':<15}") print(f"{'AlphaFold':<20} {'Good':<15} {'Excellent':<15} {'Limited':<15}") print(f"{'Cryo-EM':<20} {'Limited':<15} {'Excellent':<15} {'Good':<15}") print(f"{'Web':<20} {'No':<15} {'No':<15} {'No':<15}") print(f"{'Scripting':<20} {'Python':<15} {'Python':<15} {'Tcl':<15}") print(f"{'Price':<20} {'Free':<15} {'Free*':<15} {'Free':<15}") print("\n=== When to Use Which ===") print("" USE PYMOL: โœ“ Publication โœ“ Scripting โœ“ Standard โœ“ Free USE CHIMERAX: โœ“ Modern โœ“ Large structures โœ“ AlphaFold โœ“ Cryo-EM USE VMD: โœ“ MD โœ“ Trajectories โœ“ Analysis USE JMOL/NGL/MOL*: โœ“ Web โœ“ Teaching โœ“ Embedding USE COOT: โœ“ Crystallography โœ“ Model building """)

๐Ÿ’ผ Use Cases

๐ŸŽฏ Where PDB & Visualization Are Used

PDB data and visualization are used in virtually every area of biology: drug discovery, disease, teaching, and more.

Use Cases

Drugs: Targets. Disease: Mutations. Function: Mechanism. Teaching: Education. Publication: Figures. Design: Proteins.

๐Ÿ’ผ Drug discovery๐Ÿ’ผ Disease๐Ÿ’ผ Teaching๐Ÿ’ผ Publication
# Use Cases print("=== 1. Drug Discovery ===") print("" Use case: - Target structure - Binding pockets - Virtual screening Workflow: 1. Download structure 2. Identify pocket 3. Dock compounds 4. Optimize 5. Test Examples: - HIV protease - Kinases - GPCRs - SARS-CoV-2 Tools: - PyMOL - AutoDock - ChimeraX """) print("\n=== 2. Disease Mechanisms ===") print("" Use case: - Mutation impact - Stability - Interactions Workflow: 1. Wild-type structure 2. Mutant model 3. Compare 4. Assess impact Examples: - Cancer mutations - Rare disease - Pharmacogenomics Tools: - PyMOL - FoldX - ChimeraX """) print("\n=== 3. Protein Function ===") print("" Use case: - Active site - Binding - Catalysis Workflow: 1. Structure 2. Identify site 3. Analyze 4. Mechanism Examples: - Enzymes - Receptors - Transporters Tools: - PyMOL - ChimeraX - VMD """) print("\n=== 4. Teaching ===") print("" Use case: - Molecular biology - Biochemistry - Structural biology Examples: - DNA structure - Hemoglobin - ATP synthase - Ribosome Tools: - Jmol - NGL - Mol* - PyMOL """) print("\n=== 5. Publication ===") print("" Use case: - Figures - Cartoons - Surfaces Workflow: 1. Load structure 2. Style 3. Color 4. Ray trace 5. Export Tools: - PyMOL - ChimeraX - VMD """) print("\n=== 6. Protein Engineering ===") print("" Use case: - Design - Stability - Activity Workflow: 1. Structure 2. Design 3. Model 4. Test Examples: - Enzymes - Antibodies - Biosensors Tools: - PyMOL - Rosetta - ChimeraX """) print("\n=== 7. Structural Genomics ===") print("" Use case: - Many structures - Coverage - Function Examples: - PDB (200K) - AlphaFold DB (200M) - Model organisms Tools: - RCSB PDB - PDBe - PDBj """) print("\n=== 8. Integrative Structural Biology ===") print("" Use case: - Combine methods - X-ray + cryo-EM - NMR + SAXS Workflow: 1. Data 2. Integration 3. Model 4. Validate Tools: - ChimeraX - IMP - HADDOCK """) print("\n=== Comparison ===") print(f"{'Use Case':<25} {'Tool':<20} {'Output':<20}") print("-" * 65) print(f"{'Drug discovery':<25} {'PyMOL':<20} {'Pocket':<20}") print(f"{'Disease':<25} {'FoldX':<20} {'Impact':<20}") print(f"{'Function':<25} {'ChimeraX':<20} {'Mechanism':<20}") print(f"{'Teaching':<25} {'Jmol':<20} {'Interactive':<20}") print(f"{'Publication':<25} {'PyMOL':<20} {'Figures':<20}") print(f"{'Engineering':<25} {'Rosetta':<20} {'Design':<20}") print(f"{'Structural genomics':<25} {'RCSB PDB':<20} {'Structures':<20}") print(f"{'Integrative':<25} {'ChimeraX':<20} {'Model':<20}")

โ“ FAQ

๐ŸŽฏ Frequently Asked Questions

Answers to common questions about the PDB and molecular visualization.

What is the Protein Data Bank (PDB)?

The Protein Data Bank (PDB) is the single worldwide archive of experimentally determined 3D structures of biological macromolecules โ€” proteins, nucleic acids, and complexes. Founded in 1971, it's now managed by the Worldwide PDB (wwPDB) consortium with RCSB PDB, PDBe, PDBj, and BMRB as member sites. It contains over 200,000 structures.

What is the difference between PDB and mmCIF formats?

PDB is the classic fixed-column text format with an 80-character limit per line, which restricts large structures. mmCIF (macromolecular Crystallographic Information File) is the modern, flexible, extensible format that has no column limits and supports rich metadata. mmCIF is now the recommended format, especially for large structures.

Which visualization tool should I use?

Use PyMOL for scripting, publication-quality ray-traced images, and a large user base. Use ChimeraX for modern, high-quality visualization, large structures, and AlphaFold models. Use VMD for molecular dynamics trajectories. Use Jmol/NGL/Mol* for web-based visualization. Coot is best for crystallographic model building.

How do I color a structure by AlphaFold pLDDT confidence?

In PyMOL, load the AlphaFold model and use: color red, b < 50; color yellow, b > 50 and b < 70; color green, b > 70 and b < 90; color blue, b > 90. In ChimeraX, use: color byattribute bfactor palette alphafold. pLDDT is stored in the B-factor column of AlphaFold PDB files.

What is the difference between ATOM and HETATM records?

ATOM records describe atoms of standard polymer residues (amino acids in proteins, nucleotides in nucleic acids). HETATM records describe non-standard residues including ligands, cofactors, metal ions, modified residues, and water molecules. Both use the same column format but differ in record type.

How do I download a structure from the PDB?

Use the RCSB PDB website (www.rcsb.org) and search by PDB ID. Direct download URLs: https://files.rcsb.org/download/1ABC.pdb (PDB format) or https://files.rcsb.org/download/1ABC.cif (mmCIF). In Python, use Bio.PDB.PDBList or the RCSB API.

What is the difference between X-ray, cryo-EM, and NMR structures?

X-ray crystallography provides high-resolution structures of crystallized proteins. Cryo-EM (cryo-electron microscopy) is ideal for large complexes and membrane proteins, with rapidly improving resolution. NMR provides structures in solution and is excellent for small proteins, dynamics, and disordered regions. Each has different resolution and data characteristics.

What is a biological assembly?

A biological assembly (or biological unit) is the functional form of a protein, which may be a multimer (dimer, tetramer, etc.) even if the asymmetric unit in the crystal contains only one chain. PDB files provide assembly definitions (REMARK 350 in PDB, _pdbx_struct_assembly in mmCIF) that describe how to generate the biological assembly.

How do I validate a PDB structure?

Use validation tools such as MolProbity (Ramachandran outliers, rotamers, clashes), PROCHECK, QMEAN, and ERRAT. Check the structure's resolution, R-factor, R-free, and validation reports available on RCSB PDB and PDBe. Validate any model you build against these criteria.

What is the difference between PyMOL and ChimeraX?

PyMOL is the long-standing standard, excellent for scripting and publication-quality ray-traced images with a vast user community. ChimeraX is the modern successor to Chimera, with superior handling of large structures, cryo-EM density maps, and AlphaFold models, plus a more modern interface and Python scripting.

# Quick Reference print("=== Quick Answers ===") print("" Q: What is PDB? A: Worldwide archive of 3D structures. Q: PDB vs mmCIF? A: mmCIF is modern, flexible, recommended. Q: Best visualization tool? A: PyMOL (scripting), ChimeraX (modern). Q: How to download? A: https://files.rcsb.org/download/1ABC.cif Q: ATOM vs HETATM? A: ATOM = standard residues; HETATM = ligands. Q: Color by pLDDT? A: Use B-factor column with color ranges. Q: Validate structure? A: MolProbity, PROCHECK, QMEAN. Q: Web viewers? A: Jmol, NGL, Mol*, 3Dmol.js. Q: MD trajectories? A: VMD. Q: Free tools? A: Yes โ€” PyMOL, ChimeraX, VMD, Jmol. """)

๐Ÿš€ Future

๐ŸŽฏ Where PDB & Visualization Are Going

The future is integrative, AI-driven, real-time, immersive, and cloud-native.

Future Directions

Integrative: Combine methods. AI: AlphaFold. Real-time: Interactive. VR/AR: Immersive. Cloud: Web-native. Multi-scale: Cells to atoms.

๐Ÿš€ Integrative๐Ÿš€ AI๐Ÿš€ Real-time๐Ÿš€ VR/AR
# Future of PDB & Visualization print("=== 1. Integrative Structural Biology ===") print("" Trend: Combine methods Current: - Single method - X-ray, cryo-EM, NMR Integrative: - Combine data - X-ray + cryo-EM - NMR + SAXS - Cross-linking + MS Tools: - ChimeraX - IMP - HADDOCK - PDB-Dev Future: - Unified models - Hybrid methods - Cellular context """) print("\n=== 2. AI-Driven Visualization ===") print("" Trend: AI in visualization Ideas: - AlphaFold integration - Automated analysis - Smart representations - AI assistants Examples: - AlphaFold DB - ChimeraX AI - PyMOL AI - Mol* Future: - Learned representations - Automated figures - Real-time prediction """) print("\n=== 3. Real-Time & Interactive ===") print("" Trend: Real-time Current: - Static figures - Batch rendering Future: - Real-time - Interactive - Web-native - Collaborative Tools: - Mol* - NGL - iTOL - Nextstrain Future: - Live data - Multi-user - Cloud rendering """) print("\n=== 4. VR/AR Visualization ===") print("" Trend: Immersive Current: - Desktop - 2D screen Future: - VR - AR - Haptic - Collaborative Examples: - ChimeraX VR - Nanome - Onshape - VRML Future: - Immersive - Interactive - Educational - Drug design """) print("\n=== 5. Cloud-Native ===") print("" Trend: Cloud Current: - Desktop - Local install Future: - Web-native - Serverless - GPU - Collaborative Examples: - Mol* - NGL - RCSB PDB - PDBe Future: - No install - Global - Fast - Collaborative """) print("\n=== 6. Multi-Scale ===") print("" Trend: Multi-scale Current: - Atoms - Molecules Future: - Atoms โ†’ cells - Tissues โ†’ organisms - Integrative Examples: - CellPACK - Mesoscale - Whole-cell - Tissue Future: - Cellular context - Systems biology - Drug design """) # TIMELINE print("\n=== Timeline ===") print("" Past: 1971: PDB founded 1998: RCSB 2003: wwPDB 2006: mmCIF 2016: Cryo-EM 2020: AlphaFold2 2022: AlphaFold DB 2024: 200K+ structures Present: 2025: Integrative 2026: AI-driven Future: 2030: VR/AR? 2035: Cloud-native? 2040: Multi-scale? """) print("\n=== Final Thoughts ===") print("" PDB & visualization are: - Fundamental to structural biology - Needed for drug discovery - Needed for teaching - Rapidly improving The future is: - Integrative - AI-driven - Real-time - VR/AR - Cloud-native - Multi-scale "Seeing is understanding. Visualization is how we see molecules." Keep exploring. Keep building. """)