Examples Overview¶
This section provides practical, real-world examples demonstrating various PRISM capabilities. Each example includes complete, runnable code and detailed explanations.
Available Examples¶
Basic Examples¶
-
Simple Protein-Ligand
Build and simulate a basic protein-ligand complex
-
Multiple Force Fields
Compare results across different force fields
-
Custom Configuration
Advanced system setup with custom parameters
Example Structure¶
Each example follows this structure:
- Overview - What the example demonstrates
- Prerequisites - Required files and dependencies
- Complete Code - Full working script
- Step-by-Step Explanation - Detailed walkthrough
- Expected Results - What you should see
- Troubleshooting - Common issues and solutions
Quick Start Template¶
Use this template as a starting point for your own projects:
#!/usr/bin/env python3
"""
PRISM Example Template
"""
import prism
# 1. Define inputs
protein_file = "protein.pdb"
ligand_file = "ligand.mol2"
output_directory = "my_simulation"
# 2. Create system
system = prism.system(
protein_file,
ligand_file,
output_dir=output_directory,
ligand_forcefield="gaff",
forcefield="amber99sb",
water_model="tip3p"
)
# 3. Build system
print("Building system...")
system.build()
# 4. Display information
print("\nSystem built successfully!")
print(f"Output directory: {output_directory}")
print(f"Next step: cd {output_directory}/GMX_PROLIG_MD && bash localrun.sh")
Example Datasets¶
All examples use freely available test systems:
T4 Lysozyme - Benzene¶
- Protein: T4 Lysozyme (PDB: 2LZM)
- Ligand: Benzene
- Use case: Small molecule binding, hydrophobic interactions
- Simulation time: ~2-4 hours on GPU
BACE1 - Inhibitor¶
- Protein: Beta-secretase 1 (PDB: 3L5D)
- Ligand: Small molecule inhibitor
- Use case: Drug design, hydrogen bonding
- Simulation time: ~4-6 hours on GPU
HSP90 - Geldanamycin¶
- Protein: Heat Shock Protein 90 (PDB: 1YET)
- Ligand: Geldanamycin
- Use case: Large ligand, complex binding
- Simulation time: ~6-8 hours on GPU
Running Examples¶
Option 1: Download and Run¶
# Clone examples repository
git clone https://github.com/AIB001/PRISM-examples.git
cd PRISM-examples
# Run specific example
cd simple-protein-ligand
python run_example.py
Option 2: Copy-Paste Code¶
Each example page includes complete, copy-paste ready code that you can run directly.
Option 3: Jupyter Notebooks¶
Interactive Jupyter notebooks are available for all examples:
Example Categories¶
System Building¶
- Simple Protein-Ligand - Basic workflow
- Custom Configuration - Advanced setup
- Multiple Force Fields - Force field comparison
Analysis¶
- Trajectory analysis and visualization
- Contact frequency mapping
- RMSD/RMSF calculations
- Hydrogen bond analysis
Advanced Calculations¶
- PMF/Umbrella sampling
- MM/PBSA binding energies
- Free energy perturbation
High-Throughput¶
- Batch processing
- Virtual screening workflows
- Parallel execution
Tips for Using Examples¶
- Start Simple: Begin with the Simple Example
- Modify Incrementally: Change one parameter at a time
- Check Dependencies: Ensure all required tools are installed
- Use Test Systems: Start with small systems before scaling up
- Read Error Messages: They usually point to the issue
Contributing Examples¶
Have a useful example to share? We welcome contributions!
- Fork the PRISM repository
- Create your example in
examples/ - Follow the standard structure
- Submit a pull request
For contributions, please open an issue or pull request on GitHub.
Getting Help¶
If you encounter issues with examples:
- Check the Troubleshooting Guide
- Search GitHub Issues
- Ask in GitHub Discussions
- Email: zshi268@wisc.edu