Skip to main content

STRUCTURES25

python pytorch lightning hydra black isort

figure1

This repository contains the code used in our publication Stable and Accurate Orbital-Free Density Functional Theory Powered by Machine Learning. Using equivariant graph neural networks, we enable Orbital-Free Density Functional Theory calculations by learning the kinetic energy functional from data.

Quickstart

Inference only (using PyPI)

Installation:

pip install mldft \
torch-scatter torch-sparse torch-cluster --find-links https://data.pyg.org/whl/torch-2.4.1+cu124.html \
git+https://github.com/sciai-lab/tensor_frames.git@cd1addfd3c82a47095c9961ab999dcabfab4c21d

Use our setup script to download models and set environment variables:

mldft_setup

Run inference on xyz files using our model either trained on QM9 (str25_qm9) or QMUGS (str25_qmugs):

mldft example.xyz --model str25_qm9

Full Research Workflow

Installation using uv:

git clone https://github.com/sciai-lab/structures25.git
cd structures25
uv sync

For installation instructions without uv or cpu support visit the Installation Guide. If you have built the docs locally, open docs/build/html/installation.html. Now you can either go to the replication guide REPLICATION_GUIDE.md to reproduce results from our paper or see the usage below.

Usage

The full usage manual now lives in our documentation. Visit the Usage Guide for detailed instructions on data generation, training, and density optimization workflows. To reproduce the results from our paper, continue to use REPLICATION_GUIDE.md. After building the docs locally, you can open docs/build/html/usage.html.

Additional information

Build documentation

make docs
# or to build from scratch:
make docs-clean

Template

For more details about the template, visit: https://github.com/ashleve/lightning-hydra-template

Third-party licenses

This code adapts code from the following third party libraries:

These are distributed under the

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Citation

If you use this repository in your research, please cite the following paper:

@article{Remme_Stable_and_Accurate_2025,
    author = {Remme, Roman and Kaczun, Tobias and Ebert, Tim and Gehrig, Christof A. and Geng, Dominik and Gerhartz, Gerrit and Ickler, Marc K. and Klockow, Manuel V. and Lippmann, Peter and Schmidt, Johannes S. and Wagner, Simon and Dreuw, Andreas and Hamprecht, Fred A.},
    doi = {10.1021/jacs.5c06219},
    journal = {Journal of the American Chemical Society},
    number = {32},
    pages = {28851--28859},
    title = {{Stable and Accurate Orbital-Free Density Functional Theory Powered by Machine Learning}},
    url = {https://doi.org/10.1021/jacs.5c06219},
    volume = {147},
    year = {2025}
}

Metadata

Release files for mldft 0.0.2

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

Source distribution (sdist)

Source distribution for mldft 0.0.2
File Size Uploaded Provenance Actions
mldft-0.0.2.tar.gz 253.9 kB Without provenance Details for mldft-0.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 562.9 kB

Release files / mldft-0.0.2.tar.gz

Download URL mldft-0.0.2.tar.gz
Size 253.9 kB
Tags Source
SHA-256 checksum
How to use checksums
07504f9d40e530a059b0b9a91b0a24aeafd5dd705a38f24f957144fa6b6fb8ae
BLAKE2b-256 checksum
How to use checksums
877ab6574b779ecf6fab31b2afc165606e1039e444f73a8c640279156d655040
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.0

Release files / mldft-0.0.2-py3-none-any.whl

Download URL mldft-0.0.2-py3-none-any.whl
Size 309.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf0ec5d7c025c82d120bed8fb5056940601e66ebed1656849763cf81215158bf
BLAKE2b-256 checksum
How to use checksums
ae9a1f36a945293357f4f7236a895e2856acd668b9ba3f5fedc947efaf1e9f87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.0

Security for mldft 0.0.2

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.0.2 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