Skip to main content

A practical toolkit for Many-Body Expansion (MBE) workflows: cluster design, MBE input generation, output parsing, and analysis.

Project description

mbe-tools

mbe-tools is a Python command-line toolkit for Many-Body Expansion (MBE) workflows: fragment a cluster, prepare Q-Chem/ORCA/Molpro jobs, parse outputs, and assemble MBE energies or project-mode derivative properties.

Status: 0.5.0 release. License: MIT.

Quick Start

1. Install

cd mbe-tools
python3 -m pip install -e ".[analysis,cli]"
mbe --help

For development checks, install the test tools too:

python3 -m pip install -e ".[analysis,cli,dev]"

2. Run The Built-In Smoke Test

The synthetic example uses small committed Q-Chem-like and ORCA-like outputs, so it does not require external quantum-chemistry software.

python3 examples/synthetic/regenerate.py --check
python3 examples/synthetic/check_cli_workflow.py

The workflow smoke runs parse, validate, info, calc, and analyze. Success ends with:

synthetic CLI workflow ok

The example contract is recorded in examples/synthetic/manifest.json.

3. Direct Workflow In Five Commands

Use this when you want explicit control over each stage and do not need a central project file.

mbe fragment water7.xyz --out-xyz sampled.xyz --n 7 --seed 1
mbe gen water7.xyz --max-order 2 --backend orca --no-cp --out-dir geoms
mbe build-input geoms --glob "*.geom" --backend orca --method HF --basis STO-3G --out-dir inputs
mbe parse outputs --program auto --glob-pattern "*.out" --out parsed.jsonl
mbe calc parsed.jsonl --scheme strict --to 2

Typical direct stages are:

Stage Command Output
Fragment or sample mbe fragment sampled .xyz
Generate subsets mbe gen or mbe gen-from-monomer .geom files
Render inputs mbe build-input .inp files and optional sidecars
Parse outputs mbe parse parsed.jsonl
Inspect and assemble mbe validate, mbe info, mbe calc, mbe analyze summaries, CSV, plots

4. Project Workflow In One mbe.toml

Use this when you want one project file to plan jobs, write inputs, parse outputs, and assemble results. Project mode does not write intermediate .geom files.

[project]
name = "water7"
source_xyz = "water7.xyz"

[fragmentation]
scheme = "gmbe"      # mbe, screened_mbe, or gmbe
max_order = 1        # centered GMBE neighborhoods
cp = false

[fragmentation.gmbe]
cutoff_angstrom = 2.0
distance_metric = "closest_atom"

[software]
backend = "orca"
method = "HF"
basis = "STO-3G"
charge = 0
multiplicity = 1
orca_maxcore = 3000
orca_nprocs = 8
tole = 8
thresh = 14
orca_hessian_keyword = "AnFreq"  # omit for ORCA NumFreq default

[task]
type = "hessian"     # energy, gradient, or hessian

[paths]
inputs_dir = "inputs"
outputs_dir = "outputs"
manifest = "jobs.manifest.json"
parsed_jsonl = "parsed.jsonl"
array_dir = "arrays"
result_dir = "results"

Run the stages:

mbe project --config mbe.toml --stage plan
mbe project --config mbe.toml --stage inputs
# run the external Q-Chem or ORCA jobs yourself
mbe project --config mbe.toml --stage parse
mbe project --config mbe.toml --stage assemble
mbe calc --hessian-matrix results/hessian_mbe.npy --xyz water7.xyz --freq-out results/frequencies.csv

5. Read Next

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mbe_tools-0.5.0.tar.gz (424.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mbe_tools-0.5.0-py3-none-any.whl (185.0 kB view details)

Uploaded Python 3

File details

Details for the file mbe_tools-0.5.0.tar.gz.

File metadata

  • Download URL: mbe_tools-0.5.0.tar.gz
  • Upload date:
  • Size: 424.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mbe_tools-0.5.0.tar.gz
Algorithm Hash digest
SHA256 c2d1ff0092599347a4104825a3ee65f0eeef39772b471d4e5bd917a1807b8299
MD5 3d564fa3059312b3a94f4ec9bdfc4319
BLAKE2b-256 113a4fd824d672501c02cc833daa2e36b4f9f0435f123596995c7caaee9595a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for mbe_tools-0.5.0.tar.gz:

Publisher: publish-pypi.yml on JiaruiUNSW/mbe-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mbe_tools-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: mbe_tools-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 185.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mbe_tools-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f11aec581b4c5886eba98b2cddbf1009342c70f8c44dea6f7d88ba82e2dbc7a
MD5 dbb134e92e7da8565ca7ae801f29377c
BLAKE2b-256 2f75a13703675eb6caca81e7641505deb62dfc5aeca81824672250aaa6b82ef6

See more details on using hashes here.

Provenance

The following attestation bundles were made for mbe_tools-0.5.0-py3-none-any.whl:

Publisher: publish-pypi.yml on JiaruiUNSW/mbe-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page