Registry / data / sumo
library2.4.0.post1pypypiunverified

Sumo provides heavy-weight plotting tools specifically designed for analyzing ab initio solid-state calculations. It focuses on generating high-quality visualizations for electronic band structures, density of states (DOS), and phonon properties, often integrating seamlessly with `pymatgen` objects. The current version is 2.4.0.post1, and the library maintains an active release cadence, frequently addressing compatibility with its core dependencies like `pymatgen` and `phonopy`.

pip install sumo
INSTALL
IMPORT
SIG · SUMO
S
sumo
datapythonv2.4.0.post1
Install
29.5s avg
Import
Disk
645MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.4.0.post1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 28.65s
py 3.11
✕ build_error
✓ 28.6s
py 3.12
✕ build_error
✓ 30.55s
py 3.13
✕ build_error
✓ 30.2s
py 3.9
✕ build_error
✕ build_error
645MB installed
● package 645MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plot_band
from sumo.plotting import plot_band
from sumo.plotting import plot_band

This quickstart demonstrates how to use `sumo.plotting` functions for a band structure and density of states. In a real application, the `BandStructure` and `Dos` objects would typically be loaded from DFT calculation outputs using `pymatgen` parsers (e.g., `pymatgen.io.vasp.Vasprun`). Sumo then takes these `pymatgen` objects to generate publication-quality plots. Note that `matplotlib.pyplot.close()` is used to prevent figures from blocking execution in environments without an active GUI.

import os from pymatgen.electronic_structure.band_structure import BandStructure, Kpoint from pymatgen.electronic_structure.dos import Dos, CompleteDos from sumo.plotting import plot_band, plot_dos import matplotlib.pyplot as plt import numpy as np # --- Create dummy data for demonstration --- # # In a real scenario, these would come from parsing DFT output (e.g., Vasprun.from_xml) # Dummy BandStructure object kpoints = [Kpoint([0,0,0], 0, '$\Gamma$'), Kpoint([0.5,0,0], 0.5, 'X')] eig_val = {('spin_up', 0): np.array([[-1.0, -0.5], [0.5, 1.0]]), ('spin_down', 0): np.array([[-1.1, -0.6], [0.4, 0.9]])} efermi = 0.0 bs = BandStructure(kpoints, eig_val, efermi, structure=None, labels_dict={'G': [0,0,0], 'X': [0.5,0,0]}) # Dummy Dos object energies = np.linspace(-2.0, 2.0, 200) total_densities = np.exp(-(energies - 0.5)**2 / 0.5) + np.exp(-(energies + 0.5)**2 / 0.5) tdos = Dos(efermi, energies, total_densities) cdos = CompleteDos(None, tdos.energies, {'total': tdos.densities}) print("Plotting dummy band structure...") fig_bs, ax_bs = plot_band(bs, dpi=150) # To save: fig_bs.savefig("band_structure.png") plt.close(fig_bs) # Close figure to avoid display issues in non-interactive environments print("Dummy band structure plot generated and closed.") print("Plotting dummy density of states...") fig_dos, ax_dos = plot_dos(cdos, dpi=150) # To save: fig_dos.savefig("dos.png") plt.close(fig_dos) print("Dummy DOS plot generated and closed.")
sumo --version
Debug
Known issues
breakingSumo v2.4.0 and later requires Python 3.10 or newer. Older Python versions are no longer supported.
fix
Upgrade your Python environment to 3.10 or later (`python -m pip install --upgrade python` or use `pyenv`/`conda`).
affects: >=2.4.0
breakingCompatibility issues frequently arise with specific versions of `pymatgen` and `phonopy` due to their own API changes. Sumo updates often patch these, but staying up-to-date is crucial.
fix
Ensure you are using a `sumo` version compatible with your `pymatgen` and `phonopy` versions. Check `sumo`'s `setup.py` or release notes for dependency requirements. Upgrade `sumo` and its dependencies regularly.
affects: All versions, especially with major `pymatgen`/`phonopy` updates.
deprecatedThe `phonopy.PhonopyAtoms.get_number_of_atoms()` method was deprecated and removed in recent `phonopy` versions, leading to errors in older `sumo` versions.
fix
Upgrade `sumo` to version 2.4.0 or newer to use an updated `phonopy` API (`pip install --upgrade sumo`).
affects: <2.4.0 with `phonopy` >=2.7.0
gotchaPost-release suffixes like `.post1` (e.g., v2.4.0.post1) typically indicate packaging or metadata fixes, not new features or critical bug fixes to the core functionality.
fix
Treat `2.4.0.post1` as functionally identical to `2.4.0` in terms of code behavior. There's no need to downgrade or worry about functional differences unless specifically mentioned in release notes.
affects: All post-releases
Upgrade
Version history
2.4.0.post1latest on PyPI · released Apr 9, 2026
Audit
Dependencies
pymatgenrequiredCore dependency for parsing DFT outputs and providing data structures for plotting (e.g., BandStructure, Dos objects).
phonopyrequiredRequired for phonon calculations and plotting phonon band structures/DOS.
matplotlibrequiredThe underlying plotting library used by Sumo.
numpyrequiredNumerical computing foundation.
Agent activity
17 hits · last 30 days
node
14
OpenAI (training)
1
Resources
sumo — pip install sumo · libregistry