OF-DFT using machine learning
Project description
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}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mldft-0.0.2.tar.gz.
File metadata
- Download URL: mldft-0.0.2.tar.gz
- Upload date:
- Size: 253.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07504f9d40e530a059b0b9a91b0a24aeafd5dd705a38f24f957144fa6b6fb8ae
|
|
| MD5 |
cf38f694e99728ac0a82ca349a2e5fd9
|
|
| BLAKE2b-256 |
877ab6574b779ecf6fab31b2afc165606e1039e444f73a8c640279156d655040
|
File details
Details for the file mldft-0.0.2-py3-none-any.whl.
File metadata
- Download URL: mldft-0.0.2-py3-none-any.whl
- Upload date:
- Size: 309.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf0ec5d7c025c82d120bed8fb5056940601e66ebed1656849763cf81215158bf
|
|
| MD5 |
e8a22535344d8710e9e6792d279770dc
|
|
| BLAKE2b-256 |
ae9a1f36a945293357f4f7236a895e2856acd668b9ba3f5fedc947efaf1e9f87
|