A weekend project creating a PyMol module and server API for the MASTER protein search database, enabling protein structure visualization and searching.

The Challenge
Finding backbone substructures that match an arbitrary query structural motif, composed of multiple disjoint segments, is a problem of growing relevance in protein research. As the Protein Data Bank expands, scientists need tools to rapidly search and examine protein structures.
Technical Implementation
Backend
- Flask framework for the web server
- Redis and python-rq for background worker processing
- Gunicorn as the application server for concurrent request handling
The architecture enables handling search operations that can last several seconds to minutes without blocking other requests.
PyMol Plugin
The module features a streamlined interface that:
- Submits queries via API
- Imports resulting protein structures into the visualization space
- Uses threading and long-polling for real-time progress updates
- Provides exact completion percentages (given the linear nature of MASTER searches)
Integration
The tool integrates with Gevorg Grigoryan’s MASTER database—a search engine for the Protein Data Bank.
Code
Prerelease code available at: github.com/timofei7/master_protein