๐งฌ Pocket Visualizer is a Streamlit-powered workflow that highlights hydrogen bond interactions in docked protein-ligand complexes and automatically identifies the interacting protein residues.
It leverages PyMOL for high-quality molecular visualization, operating entirely through PyMOL command-line functions, without requiring the PyMOL GUI, to efficiently render and generate publication-ready figures. Designed for fast-paced workflows, it enables quick, automated analysis of large numbers of complexes with minimal user intervention.
For each input complex, the app:
- Generates a zoomed-in image of the ligand-binding pocket, showing:
a). Protein-ligand interactions (Hydrogen bonds)
b). Bond lengths
c). Interacting residues
- ๐ Creates a surface view image of the complete protein-ligand complex.
- ๐ป Saves PyMOL session files (.pse) for both views.
- ๐ Outputs a CSV file listing the names and positions of interacting protein residues for each complex.
This tool is ideal for analyzing docking results and gaining insights into molecular interactions in drug discovery workflows.
If you use Pocket Visualizer in your research, presentations, or publications, please consider citing it to acknowledge the effort behind its development.
Pocket Visualizer. GitHub. https://github.com/usman4373/Pocket-Visualizer
To run Pocket Visualizer, you need to have the following Python packages installed:
- Biopython (for parsing protein structure files)
- PyMOL (for molecular visualization)
- Streamlit (for the web-based interface)
You can install the required packages as follows:
-
Biopython:
pip install biopython -
Streamlit:
pip install streamlit -
PyMOL:
PyMOL is not available via standard pip in some environments. You can install it using one of the following methods:
If you're using Anaconda, run:
conda install -c schrodinger pymol
For the open-source version, you can try:
pip install pymol-open-source
Note: Ensure that the PyMOL GUI is installed and properly configured if you plan to use the session (.pse) file generation.
You can download the official installer for PyMOL from the Schrรถdinger website:
๐ PyMOL Download
After installation, add the PyMOL installation directory to your system's PATH so that it can be accessed from the terminal or command line.
Please ensure the following conditions are met before using Pocket Visualizer:
๐น Accepted format: Only .pdb (Protein Data Bank) files are supported.
๐น Each .pdb file must contain a single header.
๐น The app can process a single complex containing upto 6 proteins within a single .pdb file.
๐น Protein chains must be explicitly defined within the .pdb file.
๐น Ligand identifiers must also be correctly annotated in the .pdb file.
These requirements ensure correct parsing and accurate visualization of interactions.
Pocket Visualizer offers five pre-defined color themes for customizing the appearance of your protein-ligand complexes:
| Theme | Description |
|---|---|
| Ocean | Blue-based color palette |
| Verdant | Green color scheme for a natural look |
| Crimson | Bold red-themed appearance |
| Ash | Clean and minimal white theme |
| Blossom | Vibrant hot pink color palette for eye-catching visualization |
Each theme adjusts molecular surfaces, backgrounds, and highlights to enhance interpretability.
- Navigate to the directory containing the
main.pyfile using your terminal or command prompt, then execute the following command to start the app:
streamlit run main.py
This will launch Pocket Visualizer in your default web browser at http://localhost:8501/.

- Specify the input directory where your
.pdbfiles are located. - Specify the output directory where results will be saved (images, session files, CSV).
- Select a visualization theme from the available options.
- Set custom image parameters, including size and DPI.
- Click "Run Visualizations" to generate figures:
For optimal performance, especially with higher resolutions and DPI settings, it's recommended to use a system equipped with a GPU.
It shows interacting protein residue (three letter code) with position followed by the Chain ID.