PandaMap-Color: A versatile tool for protein-ligand interaction visualization with customizable color schemes.
Overview
PandaMap-Color is a powerful Python package for visualizing protein-ligand interactions in 2D with customizable color schemes. Generate publication-quality interaction diagrams directly from PDB files with minimal configuration.
Key Features
- Stunning Visualizations: Create detailed, publication-ready 2D diagrams of protein-ligand interactions
- Multiple Color Schemes: Choose from several pre-defined color schemes (Default, Colorblind-friendly, Monochrome, Dark mode, Publication-ready)
- Customizable Appearance: Easily modify colors and styling to match your publication or presentation needs
- Automatic Interaction Detection: Identifies hydrogen bonds, π-π stacking, hydrophobic interactions, and more
- Intuitive Representation: Clearly shows interaction types between protein residues and ligands
- Command Line Interface: Simple to use in scripts or from the terminal
Installation
pip install pandamap-color
Quick Start
PandaMapColor: Visualize protein-ligand interactions from PDB files with
customizable styling and coloring options.
pandamap-color -h
usage: pandamap-color [-h] [--output OUTPUT] [--ligand LIGAND] [--dpi DPI] [--title TITLE]
[--color-scheme {default,colorblind,monochrome,dark,publication}] [--custom-colors CUSTOM_COLORS]
[--simple-styling] [--no-color-by-type] [--jitter JITTER] [--h-bond-cutoff H_BOND_CUTOFF]
[--pi-stack-cutoff PI_STACK_CUTOFF] [--hydrophobic-cutoff HYDROPHOBIC_CUTOFF]
[--figsize FIGSIZE FIGSIZE] [--generate-report] [--report-file REPORT_FILE] [--use-dssp]
[--show-directionality] [--ionic-cutoff IONIC_CUTOFF] [--halogen-cutoff HALOGEN_CUTOFF]
pdb_file
PandaMap-Color: Visualize protein-ligand interactions from PDB files with customizable styling and coloring options.
positional arguments:
pdb_file Path to PDB file with protein-ligand complex
options:
-h, --help show this help message and exit
--output OUTPUT, -o OUTPUT
Output image file path
--ligand LIGAND, -l LIGAND
Specific ligand residue name to analyze
--dpi DPI Image resolution (default: 300 dpi)
--title TITLE, -t TITLE
Custom title for the visualization
--color-scheme {default,colorblind,monochrome,dark,publication}, -c {default,colorblind,monochrome,dark,publication}
Color scheme to use (default: default)
--custom-colors CUSTOM_COLORS
Path to JSON file with custom color scheme
--simple-styling Use simple styling instead of enhanced effects
--no-color-by-type Disable coloring residues by amino acid type
--jitter JITTER Amount of positional randomization (0.0-1.0) for more natural look
--h-bond-cutoff H_BOND_CUTOFF
Distance cutoff for hydrogen bonds in Angstroms
--pi-stack-cutoff PI_STACK_CUTOFF
Distance cutoff for pi-stacking interactions in Angstroms
--hydrophobic-cutoff HYDROPHOBIC_CUTOFF
Distance cutoff for hydrophobic interactions in Angstroms
--figsize FIGSIZE FIGSIZE
Figure size in inches (width height)
--generate-report Generate a detailed interaction report
--report-file REPORT_FILE
Path for the interaction report (default: <pdb_name>_interactions_report.txt)
--use-dssp Use DSSP for solvent accessibility calculation if available
--show-directionality
Show interaction directionality with arrows
--ionic-cutoff IONIC_CUTOFF
Distance cutoff for ionic interactions in Angstroms
--halogen-cutoff HALOGEN_CUTOFF
Distance cutoff for halogen bonds in Angstroms
Command Line Usage
# Basic usage
pandamap-color path/to/complex.pdb -o output_image.png
# Specify ligand residue name (if multiple ligands in file)
pandamap-color path/to/complex.pdb --ligand LIG -o output_image.png
# Change color scheme
pandamap-color path/to/complex.pdb --color-scheme publication -o output_image.png
pandamap-color path/to/complex.pdb --color-scheme monochrome -o output_image.png
pandamap-color path/to/complex.pdb --color-scheme colorblind -o output_image.png
pandamap-color path/to/complex.pdb --color-scheme dark -o output_image.png
#Jitter
pandamap-color path/to/complex.pdb --jitter 0.3 --color-scheme publication -o output_image.png
#Report file
pandamap-color path/to/complex.pdb --color-scheme publication -o output_image.png --generate-report
============================================================================= PandaMap-Color Interaction Report
Ligand: PFL:D:601 Name: PFL Type: LIGAND File: complex.pdb
Interacting Chains: D, C Interacting Residues: 13 Solvent Accessible Residues: 6
Interaction Summary: Hydrogen Bonds: 1 Hydrophobic Interactions: 4 π-π Stacking: 1 Carbon-π Interactions: 1 Donor-π Interactions: 1 Amide-π Interactions: 2 Alkyl-π Interactions: 7
Hydrogen Bonds:
- ILE228D -- 2.75Å -- PFL
Hydrophobic Interactions:
- MET286C -- 3.89Å -- PFL
- LEU285C -- 3.95Å -- PFL
- PHE289C (Solvent accessible) -- 3.61Å -- PFL
- MET236D (Solvent accessible) -- 3.55Å -- PFL
π-π Stacking:
- PHE289C (Solvent accessible) -- 3.61Å -- PFL
Carbon-π Interactions:
- PHE289C (Solvent accessible) -- 3.61Å -- PFL
Donor-π Interactions:
- ASP282C (Solvent accessible) -- 3.75Å -- PFL
Amide-π Interactions:
- ASN265C (Solvent accessible) -- 3.69Å -- PFL
- GLN229D (Solvent accessible) -- 3.35Å -- PFL
Alkyl-π Interactions:
- MET286C -- 3.89Å -- PFL
- ILE228D -- 4.06Å -- PFL
- LEU232D -- 4.01Å -- PFL
- PRO233D -- 4.03Å -- PFL
- LEU285C -- 3.95Å -- PFL
- MET261C -- 5.02Å -- PFL
- MET236D (Solvent accessible) -- 3.55Å -- PFL
=============================================================================
# Help
pandamap-color --help
Python API Usage
from pandamap_color import PandaMapColor
# Create a mapper instance
mapper = PandaMapColor(
pdb_file="path/to/complex.pdb",
ligand_resname="LIG", # Optional: specify ligand residue name
color_scheme="default",
use_enhanced_styling=True
)
# Detect interactions
mapper.detect_interactions()
# Identify solvent-accessible residues
mapper.estimate_solvent_accessibility()
# Generate visualization
mapper.visualize(output_file="interaction_diagram.png")
Examples
Monochrome Mode
Dark Style
Default Style
Colorblind-Friendly Style
Publication Mode
No Color By Type Mode
No Color By Type Mode
Available Color Schemes
PandaMap-Color comes with multiple built-in color schemes:
default: Standard vibrant colorscolorblind: Colorblind-friendly palettemonochrome: Grayscale for simple publicationsdark: Dark background for presentationspublication: Clean style for scientific publications
Custom Color Schemes
You can define custom color schemes using JSON:
import json
from pandamap_color import PandaMapColor
# Define a custom color scheme
custom_colors = {
"element_colors": {
"C": "#333333",
"N": "#3060F0",
"O": "#FF2010",
# Add more elements...
},
"interaction_styles": {
"hydrogen_bonds": {
"color": "#2E8B57",
"linestyle": "-",
# More styling options...
},
# More interaction types...
}
}
# Save to a file (optional)
with open("my_colors.json", "w") as f:
json.dump(custom_colors, f, indent=2)
# Use with the mapper
mapper = PandaMapColor(
pdb_file="path/to/complex.pdb",
color_scheme=custom_colors # Pass the dictionary directly
)
# Or load from file
mapper = PandaMapColor(
pdb_file="path/to/complex.pdb",
color_scheme="my_colors.json" # Or path to JSON file
)
Documentation
For detailed documentation, see:
Package Structure
PandaMap-Color is organized into modular components:
- pandamap.py: Main
PandaMapColorclass for protein-ligand interaction analysis - visualization.py: Visualization functionality for creating beautiful diagrams
- ligand.py: Ligand structure representation and 2D projection
- colorschemes.py: Pre-defined color schemes and customization utilities
- cli.py: Command-line interface
- utils.py: Utility functions and helper classes
Requirements
- Python 3.7+
- NumPy
- Matplotlib
- BioPython
Citing PandaMap-Color
If you use PandaMap-Color in your research, please cite:
Pritam Kumar Panda. (2025). PandaMap-Color: A versatile tool for protein-ligand interaction visualization with customizable color schemes.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Metadata
Release files for pandamap-color 2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pandamap_color-2.1.tar.gz | 37.1 kB | Without provenance | Details for pandamap_color-2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pandamap_color-2.1-py3-none-any.whl | Python 3 | none | any | Details for pandamap_color-2.1-py3-none-any.whl |
Total release size: 74.1 kB
Release files / pandamap_color-2.1.tar.gz
| Download URL | pandamap_color-2.1.tar.gz |
|---|---|
| Size | 37.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bdb4eddd0bb5bf088edd8d3aa094426e51ffde830530421c6ac83c7f48cc4e5c
|
|
BLAKE2b-256 checksum How to use checksums |
ffe033700bb88001b86c58f3c1c1688429f03c151961718ab7068f7c5c84469f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / pandamap_color-2.1-py3-none-any.whl
| Download URL | pandamap_color-2.1-py3-none-any.whl |
|---|---|
| Size | 37.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0b0b57fca71dfbd44a223f4437c71a6a1ea874340d9d2ea30b1954f313f9b109
|
|
BLAKE2b-256 checksum How to use checksums |
872bf44f7cef51fd7ac7407b8c0398e437364ab5508fbd559383efee194d5d0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Security for pandamap-color 2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.