This repository provides data-generation, training, density-optimization, and geometry-optimization workflows for developing and evaluating machine-learned orbital-free density functional theory (ML-OFDFT).
Clone the repository:
git clone git@github.com:sciai-lab/structures25-nuclear-gradients.git
cd structures25-nuclear-gradientsInstall the GPU-enabled environment with uv:
uv sync --extra cuda --extra devFor a CPU-only environment, replace cuda with cpu. Add the docs extra to build the
documentation.
Set the data and model directories before running the workflows:
export DFT_DATA="/path/to/data"
export DFT_MODELS="/path/to/models"Trained model checkpoints are available on Hugging Face.
The main command-line entry points are:
mldft_ks: generate Kohn-Sham DFT reference datamldft_labelgen: generate training labelsmldft_train: train ML-OFDFT modelsmldft_denop: optimize electron densitiesmldft_geomopt: optimize molecular geometries
Activate the environment and run an entry point, for example:
source .venv/bin/activate
mldft_geomoptThe workflows are configured with Hydra through the configuration files in
configs.
Benchmark inputs, numerical results, and reproduction commands are provided in
evaluation.
Install the docs extra and build the documentation locally:
uv sync --extra cuda --extra docs
make docsThe generated documentation is available at docs/build/html/index.html.
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.
