Skip to main content

pseudohub

Fetch pseudopotential files from Pseudo-Dojo (and, eventually, other providers) — usable as a Python library or a CLI.

Install

pip install -e .

Library usage

from pseudohub import get_pseudo, get_pseudo_table, get_hints

# nc, sr, pbe, standard, upf, newest version, cached in the default
# per-user cache directory
path = get_pseudo("Si")

path = get_pseudo(
    14, kind="paw", generator="pbesol", accuracy="stringent",
    format="psp8", cache_dir="/scratch/me/pseudos",
)

# recommended plane-wave energy cutoff (Ha)
hints = get_hints("Si", level="high")
print(hints["ecut"])

# full table archive for every element
table_dir = get_pseudo_table(kind="nc", generator="pbe", accuracy="standard")

An invalid parameter combination raises InvalidParameterError with suggestions for the closest real option:

get_pseudo("Fe", kind="paw", generator="pw", accuracy="stringent")
# InvalidParameterError: No Pseudo-Dojo table for kind='paw', relativity='sr',
# version=None, generator='pw', accuracy='stringent'.
# did you mean one of:
#   - paw_pw_standard

CLI usage

pseudohub get Si --kind nc --generator pbesol --accuracy stringent --format psp8
pseudohub table --kind paw --generator pbe --accuracy standard --table-format upf
pseudohub hints Si --level high
pseudohub get La --version 04-3plus --format upf   # lanthanide semicore table

Global flags (get/table/hints all accept them, placed before the subcommand): --provider, --cache-dir, --no-cache, --force.

Caching

Downloads are cached by default in a per-user cache directory (via platformdirs, e.g. ~/.cache/pseudohub on Linux), so repeated calls across projects reuse files instead of re-downloading. Use cache_dir=/--cache-dir to point at your own location (e.g. shared HPC scratch space), or cache=False/--no-cache to skip caching entirely.

Development

pip install -e ".[test]"
pytest

Tests are fully offline — network calls are mocked at the requests.get seam in pseudohub.cache.

Adding a new provider

  1. Create src/pseudohub/providers/<name>.py with a class implementing pseudohub.providers.base.Provider (get_pseudo, optionally get_table / get_hints).
  2. Register it in src/pseudohub/providers/__init__.py's PROVIDER_REGISTRY.
  3. It's now available via get_pseudo(..., provider="<name>") and pseudohub --provider <name> get .... Provider-specific parameters don't need to match any other provider's — get_pseudo's **kwargs pass straight through, and an unsupported kwarg raises a normal TypeError.

Metadata

Release files for pseudohub 0.1.0

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

Source distribution (sdist)

Source distribution for pseudohub 0.1.0
File Size Uploaded Provenance Actions
pseudohub-0.1.0.tar.gz 15.3 kB Without provenance Details for pseudohub-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pseudohub 0.1.0
File Interpreter ABI Platform Actions
pseudohub-0.1.0-py3-none-any.whl Python 3 none any Details for pseudohub-0.1.0-py3-none-any.whl

Total release size: 29.7 kB

Release files / pseudohub-0.1.0.tar.gz

Download URL pseudohub-0.1.0.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fc7a489a9e9aca14bd3cefe79d6a2674284901be0676cb4cb9095f0f3579375a
BLAKE2b-256 checksum
How to use checksums
48c2cc678113251bc8ee2cb0558bfcb091b37bf97dcb83e25c4f015615ab2e1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release files / pseudohub-0.1.0-py3-none-any.whl

Download URL pseudohub-0.1.0-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3271761ab53869b14e018b0aa02d82c7be73a405b7b9c57abe056c8080201140
BLAKE2b-256 checksum
How to use checksums
21c17a09b3f347e455ce952705452b03c417a8f8e48aa83035214e55b4e92ddf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Security for pseudohub 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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