ovito-org / ScoreBasedDenoising

This is a wrapper for OVITO around the "Score-based denoising for atomic structure identification" presented in this graphite repo. Further information and the official citation on arXiv.
Other
1 stars 1 forks source link
ovito ovito-extension python-modifier

Score-based Denoising

This is a wrapper for OVITO around the "Score-based denoising for atomic structure identification" presented in this graphite repo. Further information and the official citation on arXiv.

Description

Score-based denoising iteratively subtracts thermal vibrations or other pertubations from atomistic trajectories.

As described by the original authors in their abstract:

"We propose an effective method for removing thermal vibrations that complicate the task of analyzing complex dynamics in atomistic simulation of condensed matter. Our method iteratively subtracts thermal noises or perturbations in atomic positions using a denoising score function trained on synthetically noised but otherwise perfect crystal lattices. The resulting denoised structures clearly reveal underlying crystal order while retaining disorder associated with crystal defects. Purely geometric, agnostic to interatomic potentials, and trained without inputs from explicit simulations, our denoiser can be applied to simulation data generated from vastly different interatomic interactions. The denoiser is shown to improve existing classification methods such as common neighbor analysis and polyhedral template matching, reaching perfect classification accuracy on a recent benchmark dataset of thermally perturbed structures up to the melting point. Demonstrated here in a wide variety of atomistic simulation contexts, the denoiser is general, robust, and readily extendable to delineate order from disorder in structurally and chemically complex materials."

Hsu, T., Sadigh, B., Bertin, N., Park, C. W., Chapman, J., Bulatov, V., & Zhou, F. (2022). Score-based denoising for atomic structure identification (Version 3). arXiv. https://doi.org/10.48550/ARXIV.2212.02421

Parameters

The modifier can be found under the label "Denoise particle positions" in the OVITO Pro interface. The Python modifier class and the module are both called ScoreBasedDenoising.

Example

Score-based denoising

Installation

[!IMPORTANT]
This approach might not work depending on your plattform Please use conda if you encounter any issues

By default this will install the CPU version of PyTorch and PyG.

On Mac, the mps backend will also be presented. This is mostly for future proofing since currently not all required PyTorch and PyG methods have been ported to mps.

On other platforms you can install the cuda accelelerated versions of PyTorch and PyG yourself. At this point, you should be able to select cuda in the modifier device selection to run model inference on GPU.

Conda + cuda on Windows 11 example

conda create -n denoise -c conda-forge python=3.10
conda activate denoise
conda install --strict-channel-priority -c https://conda.ovito.org -c conda-forge ovito==3.10.5
conda install install pytorch pytorch-cuda=12.1 -c pytorch -c nvidia -c conda-forge
conda install pyg -c pyg -c conda-forge
conda install -c conda-forge ase pandas e3nn
pip install git+https://github.com/nnn911/ScoreBasedDenoising.git

Technical information / dependencies

Tested on (using conda):

Contact

Daniel Utt utt@ovito.org