Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

buhito

Logo

buhito is a Python library for enumerating graphlets and analyzing graphlet-based features from graphs.

Installation

git clone https://github.com/lanl/buhito.git
cd buhito
uv sync --all-extras

Quick Start

Enumerate graphlets with BFS

import networkx as nx
from buhito import generate_subgraphs_breadthwise

G = nx.petersen_graph()

nx.set_node_attributes(G, {n: "C" for n in G.nodes}, "atom_key")
nx.set_edge_attributes(G, {e: "1" for e in G.edges}, "bond_key")

fp, bitinfo = generate_subgraphs_breadthwise(
    G,
    depth=4,
    return_nodewise=False,
    full_hash=True,
    node_key="atom_key",
    edge_key="bond_key"
)

print("Graphlet fingerprint length:", len(fp))

Enumerate graphlets with DFS

from buhito import generate_subgraphs_depthwise

subsets, counts = generate_subgraphs_depthwise(G, maxlen=4)
print("Found graphlet subsets:", len(subsets))

Examples

Available example scripts:

  • examples/plotting_example.py — visualize graphlets from the Petersen graph
  • examples/qm9/benchmark_graphlet_featurizers_train_test.py — benchmark featurizers on QM9 chemical properties data

Run Examples

QM9

python examples/qm9/benchmark_graphlet_featurizers_train_test.py \
  --data examples/qm9/qm9data/qm9_processed.csv \
  --max-len 2 3 4 5 6 \
  --repeats 3 \
  --n-jobs -1 \
  --outdir bench_qm9

Testing

pytest tests/

Package structure

  • src/buhito/ — core features
  • src/buhito/converters.py — converters to NetworkX graphs
  • src/buhito/plotting.py — graphlet visualization helpers

Authors

  • Yulia Pimonova (LANL)
  • Nicholas Lubbers (LANL)
  • Nathan Lemons (LANL)
  • Pieter Swart (LANL)

Citation

If you use buhito in your work, please cite this repository. A publication citation is coming.

buhito is released under the BSD-3 License. See LICENSE.txt for the full license.

The copyright to buhito is owned by Triad National Security, LLC and is released for open source use as project number O5043.

© 2026. Triad National Security, LLC. All rights reserved. This program was produced under U.S. Government contract 89233218CNA000001 for Los Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC for the U.S. Department of Energy/National Nuclear Security Administration. All rights in the program are. reserved by Triad National Security, LLC, and the U.S. Department of Energy/National Nuclear Security Administration. The Government is granted for itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this material to reproduce, prepare. derivative works, distribute copies to the public, perform publicly and display publicly, and to permit. others to do so.

Release files for buhito 0.0.1a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for buhito 0.0.1a1
File Size Uploaded
buhito-0.0.1a1.tar.gz 10.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for buhito 0.0.1a1
File Interpreter ABI Platform
buhito-0.0.1a1-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 MB

Release files / buhito-0.0.1a1.tar.gz

Download URL buhito-0.0.1a1.tar.gz
Size 10.9 MB
Tags Source
SHA-256 checksum
How to use checksums
78258fd62e9cbbd0b7cc135aefd7cca849f51a21252fb6a84eff40b6a3aa3f4b
BLAKE2b-256 checksum
How to use checksums
2da2745952078f7004bb04fba26944cae264a27fb05a66f2a69a40d102a15d78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.

Transparency log

Release files / buhito-0.0.1a1-py3-none-any.whl

Download URL buhito-0.0.1a1-py3-none-any.whl
Size 22.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
042b307462e0dd6751de7a6a7531a810e938fd4037f3cffae7bb0e957f5255ee
BLAKE2b-256 checksum
How to use checksums
7fa528605fbc3e0838cbc35c64638a6210071aed1eb0f48f3014f81453f05bce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.1a1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page