Latest release | |
---|---|
Status | |
Community |
Warning: This package is under active development and is not yet ready for production use. API changes are expected and any feedback is welcome. See a list of TODO list in the project board.
GGMolVis is a Python package that provides a high-level interface to MolecularNodes in Blender for molecular visualization.
It is inspired by the design patterns of ggplot2 and matplotlib. The goal is to create a stable Python API that enables users to visualize molecular trajectories (and potentially other entities in MN) with both automation and customization. Everything is designed to be dynamic during frame changes. The package also includes capabilities to visualize protein features and analysis results---such as distances, angles, and dihedrals---with texts, lines, and shapes.
-
API Development: We will create a stable API for Molecular Nodes, empowering users to automate molecular rendering with minimal effort.
-
Interactive Jupyter Integration: A Jupyter widget will be built to integrate with MDAnalysis, providing an interactive environment for controlling and rendering molecular objects directly within notebooks via Blender.
-
Advanced Visualization Tools: We will develop tools for visualizing basic geometric features and even complex analysis results from MDAnalysis.
ggmolvis is bound by a Code of Conduct.
Follow the installation instructions in the documentation.
import MDAnalysis as mda
from MDAnalysis.tests.datafiles import PSF, DCD
from MDAnalysis.analysis.rms import RMSD
from ggmolvis.ggmolvis import GGMolVis
ggmv = GGMolVis()
u = mda.Universe(PSF, DCD)
# Trajectory visualization
residues_ag = u.select_atoms("resid 127 40")
residues_ag.visualize()
# Feature visualization
res_1 = residues_ag.residues[0].atoms
res_2 = residues_ag.residues[1].atoms
line = ggmv.distance(res_1, res_2, location=(5,0,0))
line.render()
# Analysis result visualization
rmsd = RMSD(u.select_atoms('name CA'))
rmsd.run()
vis = rmsd.visualize()
vis.render(mode='movie')
The ggmolvis source code is hosted at https://github.com/yuxuanzhuang/ggmolvis and is available under the GNU General Public License, version 3 (see the file LICENSE).
Copyright (c) 2025, Yuxuan Zhuang
Project based on the MDAnalysis Cookiecutter version 0.1. Please cite MDAnalysis when using ggmolvis in published work.