# Unified Pseudopotential Format
[](https://github.com/ShapelessCat/upf/actions/workflows/ci.yml)
[](https://crates.io/crates/upf)
[](https://docs.rs/upf)
[](https://opensource.org/licenses/MIT)
[](https://opensource.org/licenses/Apache-2.0)
The Unified Pseudopotential Format (UPF) specification is here:
<https://pseudopotentials.quantum-espresso.org/home/unified-pseudopotential-format>.
This repository provides a Rust library that reads Unified Pseudopotential
Format (UPF) text files into typed Rust structs and writes validated
`UpfData` values back to UPF text, enabling semantic round-trips between file
content and Rust data.
Project documentation:
- [Project guide](docs/PROJECT.md)
- [API documentation on docs.rs](https://docs.rs/upf)
- [Bundled UPF reference](docs/reference/upf-spec.html)
Local verification:
- `cargo fmt --check`
- `cargo clippy --all-targets -- -D warnings`
- `cargo test`
- `cargo doc --no-deps`
Core API:
- `upf::from_str`
- `upf::from_reader`
- `upf::from_file`
- `upf::to_string`
- `upf::to_writer`
- `upf::to_file`