Skip to main content

DescriptorDOS is a scheme to return phase free energies as smooth functions of MLIP parameters, for uncertainty quantification in forward propagation and inverse fine-tuning in back-propagation.

Details are provided in our paper:
Score matching the descriptor density of states for model-agnostic free energy estimation
Preprint:arXiv 2025

DescriptorDOS is designed for the wide variety of MLIPs that are linear in some set of descriptor features.
As we discuss in the paper, whilst this clearly includes ACE/SNAP/qSNAP/POD/MILADY "as-is", multiple applications to non-linear architectures are envisioned and will be available in the near future.

Further applications / demonstrations of DescriptorDOS are coming- watch this space!

Quick overview

See below for installation (mpi4py and lammps), and examples/ for detailed usage.

DescriptorDOS requires a LAMMPS input file which reads in the atomic structure, loads the reference potential energy function and defines a global descriptor compute, e.g. SNAP

# The descriptor compute
compute D all sna/atom 4.7 0.99363 8 0.5 1
compute aveD all reduce ave c_D[*]

The compute name is then passed by a YAML file or as an argument: Via configuration.yaml:

lammps_input_script: "configuration-files/in.lammps"
global_descriptor_compute_name : "aveD"

At initialization

from mpi4py import MPI
from DescriptorDOS import Manager 
DDOS_Manager = Manager( comm=MPI.COMM_WORLD,
                         global_descriptor_compute_name="aveD", # overwrites YAML
                        yaml_file="configuration.yaml")
DDOS_Manager.run()

Installation

DescriptorDOS uses LAMMPS and mpi4py, in addition to numpy and scipy. If you can run

from mpi4py import MPI
from lammps import lammps
lmp = lammps(comm=MPI.COMM_WORLD)
lmp.close()

Then you can install DescriptorDOS:

pip install DescriptorDOS

Scripts in testing/unittests.py to check everything is set up correctly. Check out examples/ for a simple application. For HPC use we recommend installing lammps and mpi4py as described here

For local testing you can install LAMMPS via @jan-janssen conda-lammps (one CPU/worker)

conda config --add channels conda-forge # add conda-forge channel
conda create -n ddos-env python=3.10 
conda activate ddos-env 
conda install mpi4py lammps
pip install DescriptorDOS

We emphasize conda-lammps will not give optimal performance on HPC!

Algorithm Overview

The DescriptorDOS algorithm leverages MPI parallelism for efficient sampling and tensor-compression for low-rank storage.

Running Descriptor DOS

See examples/. Whilst sampling is fully parallel, to generate samples with Hessian displacer, we require the reference system's Hessian.

Parallel batching of these tasks is simple but current implementation simply runs in serial for 5-10 minutes before batch submission (see examples/run.py):

python run.py # will store Hessian data and only run a few samples

We can then run the DDOS sampling in parallel:

mpirun -np ${NPROCS} python run.py

Whilst we provide many options in run.py, they can all be stored in a yaml file, so the python script can be as succinct as as snippet (first seen above)

from mpi4py import MPI
from DescriptorDOS import Manager 
DDOS_Manager = Manager( comm=MPI.COMM_WORLD,
                        yaml_file="configuration.yaml")
DDOS_Manager.run()

Analysing data

We provide a sample notebooks in analysis/ of our "world-first" result, inverse fine-tuning of a phase transition temperature.

More examples will be added in the coming months.

(c) MIT 2024 TD Swinburne thomas.swinburne@cnrs.fr

Metadata

Release files for DescriptorDOS 0.1.1

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

Source distribution (sdist)

Source distribution for DescriptorDOS 0.1.1
File Size Uploaded
descriptordos-0.1.1.tar.gz 28.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for DescriptorDOS 0.1.1
File Interpreter ABI Platform
descriptordos-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 61.5 kB

Release files / descriptordos-0.1.1.tar.gz

Download URL descriptordos-0.1.1.tar.gz
Size 28.7 kB
Tags Source
SHA-256 checksum
How to use checksums
362c2e402dc2f42f69649c8727f048908e1f8c0b3cdb9e993c7846c6c24dd369
BLAKE2b-256 checksum
How to use checksums
3d494161823ba370e6e60786f1de3fb1f4241461e959a6aad1d9e05e8c772d8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / descriptordos-0.1.1-py3-none-any.whl

Download URL descriptordos-0.1.1-py3-none-any.whl
Size 32.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6301b5060b04870726d52be44ebaa4415e551bc8b519b518ba6cb2490afe0720
BLAKE2b-256 checksum
How to use checksums
50087b33694f01fb96c69e51b53add5c0c0c7614763195b1970cdd57c8f2e7fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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