Installation Guide
Requirements
- Python: 3.10 or higher
- Operating System: macOS or Linux
- Dependencies: NumPy, Biotite, OpenMM (optional), Numba (optional)
Installation Methods
PyPI (Recommended)
The easiest way to install synth-pdb is via PyPI:
pip install synth-pdb
This installs:
- The synth-pdb command-line tool
- The synth_pdb Python library
- All required dependencies
From Source
For development or to get the latest features:
git clone https://github.com/elkins/synth-pdb.git
cd synth-pdb
pip install -e .
The -e flag installs in "editable" mode, so changes to the source code are immediately reflected.
Development Installation
To install with development dependencies (testing, linting, etc.):
git clone https://github.com/elkins/synth-pdb.git
cd synth-pdb
pip install -e ".[dev]"
Optional Dependencies
OpenMM (Physics Engine)
For energy minimization and MD equilibration:
pip install openmm
Or via conda (recommended for Apple Silicon):
conda install -c conda-forge openmm
!!! caution "OpenMM Version Warning"
Versions 8.5.0 and 8.5.1 have known memory leaks. synth-pdb excludes these versions. Please ensure you are using 8.4.x or older for production workloads.
!!! tip "Apple Silicon Users" OpenMM on M1/M2/M3/M4 Macs supports GPU acceleration via OpenCL/Metal, providing 5x speedup over CPU.
Numba (JIT Compilation)
For 50-100x speedup on geometry and NMR calculations:
pip install numba
Verification
Verify your installation:
synth-pdb --version
Expected output:
synth-pdb version 1.38.1
Test basic functionality:
synth-pdb --length 5 --output test.pdb
This should create a test.pdb file in the current directory.
Troubleshooting
ImportError: No module named 'openmm'
If you see this error when using --minimize:
pip install openmm
Or skip minimization:
synth-pdb --length 10 # Works without OpenMM
Apple Silicon: OpenMM Not Found
Use conda instead of pip:
conda install -c conda-forge openmm
Windows: Long Path Issues
Enable long paths in Windows:
# Run as Administrator
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
Next Steps
- Quick Start Guide - Generate your first structure
- First Structure Tutorial - Detailed walkthrough