Skip to main content

UPF to JSON converter

UPF is a file format to describe atomic pseudo-potentials used by (DFT) density functional theory codes. This package provides scripts for converting UPF v1 and UPF v2 (Unified Pseudopotential Format) to json format as required by the SIRIUS DFT library SIRIUS github.

More information about the unified pseudopotential format can be found here: https://www.quantum-espresso.org/pseudopotentials/unified-pseudopotential-format

Installation

From PyPI:

# as a standalone CLI tool
uv tool install upf_to_json
# or run it once without installing
uvx --from upf_to_json upf2json --help
# or as a library in a uv project / with pip
uv add upf_to_json
pip install upf_to_json

From a local checkout:

uv tool install .

CLI interface

The package installs the upf2json command:

Usage: upf2json [OPTIONS] COMMAND [ARGS]...

  Convert UPF v1/v2 pseudopotentials to SIRIUS JSON.

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  convert  Convert UPF file INFILE to JSON (OUTFILE, default: stdout).
  summary  Print header, cutoff radius and lmax info of INFILE.

Examples

# convert, writing to a file (omit OUTFILE to write to stdout)
upf2json convert Al.pbe-n-kjpaw_psl.1.0.0.UPF Al.json

# inspect a pseudopotential: header fields, cutoff radius, lmax
upf2json summary Al.pbe-n-kjpaw_psl.1.0.0.UPF

upf2json --version

Warnings about inconsistent UPF metadata are printed to stderr.

Python API

from upf_to_json import upf_to_json

with open("Al.pbe-n-kjpaw_psl.1.0.0.UPF") as fh:
    pp_dict = upf_to_json(fh.read(), fname="Al.pbe-n-kjpaw_psl.1.0.0.UPF")

Metadata

Release files for upf_to_json 1.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 upf_to_json 1.1.0
File Size Uploaded Provenance Actions
upf_to_json-1.1.0.tar.gz 11.0 kB Without provenance Details for upf_to_json-1.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 23.6 kB

Release files / upf_to_json-1.1.0.tar.gz

Download URL upf_to_json-1.1.0.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
46e089626c72e9c0e55b76290cf44fbfd751d3734dfcdb84de4ae2cd752c7978
BLAKE2b-256 checksum
How to use checksums
c02db393b2834f7c64243bc94206c342cb1ed7b75c4f434739bdc95720c5efcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / upf_to_json-1.1.0-py3-none-any.whl

Download URL upf_to_json-1.1.0-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d2a03a30e625fbc4ee10a7fdcd2ffd417f70017a1b90513850149b734c51933
BLAKE2b-256 checksum
How to use checksums
c90b65cdec2e6a12afb1423f170594bc1a9daddfe235184c02efb1f194f45701
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for upf_to_json 1.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.

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