Metadata-Version: 2.4
Name: dscribe
Version: 2.1.3
Summary: A Python package for creating feature transformations in applications of machine learning to materials science.
License-Expression: Apache-2.0
Project-URL: Homepage, https://singroup.github.io/dscribe/latest/
Project-URL: Documentation, https://singroup.github.io/dscribe/latest/
Project-URL: Source, https://github.com/SINGROUP/dscribe
Project-URL: Issues, https://github.com/SINGROUP/dscribe/issues
Project-URL: Changelog, https://singroup.github.io/dscribe/latest/changelog.html
Keywords: descriptor,machine learning,atomistic structure,materials science
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Unix
Classifier: Programming Language :: C
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.23
Requires-Dist: scipy>=1.9
Requires-Dist: ase>=3.22
Requires-Dist: scikit-learn>=1.1
Requires-Dist: joblib>=1.1
Requires-Dist: sparse>=0.15
Dynamic: license-file

<img src="https://raw.githubusercontent.com/SINGROUP/dscribe/main/logo/dscribe_logo.png" width="400">

[![CI](https://github.com/SINGROUP/dscribe/actions/workflows/ci.yml/badge.svg)](https://github.com/SINGROUP/dscribe/actions/workflows/ci.yml)
[![Coverage Status](https://coveralls.io/repos/github/SINGROUP/dscribe/badge.svg?branch=main)](https://coveralls.io/github/SINGROUP/dscribe?branch=main)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

DScribe is a Python package for transforming atomic structures into fixed-size
numerical fingerprints. These fingerprints are often called "descriptors" and
they can be used in various tasks, including machine learning, visualization,
similarity analysis, etc.

# Documentation
For more details and tutorials, visit our documentation at:
[https://singroup.github.io/dscribe/](https://singroup.github.io/dscribe/)

You can find even more details in the following articles:

- [DScribe: Library of descriptors for machine learning in materials science](<https://doi.org/10.1016/j.cpc.2019.106949>)
- [Updates to the DScribe library: New descriptors and derivatives](https://doi.org/10.1063/5.0151031)


# Quick Example
```python
import numpy as np
from ase.build import molecule
from dscribe.descriptors import SOAP
from dscribe.descriptors import CoulombMatrix

# Define atomic structures
samples = [molecule("H2O"), molecule("NO2"), molecule("CO2")]

# Setup descriptors
cm_desc = CoulombMatrix(n_atoms_max=3, permutation="sorted_l2")
soap_desc = SOAP(
    species=["C", "H", "O", "N"], r_cut=5, n_max=8, l_max=6, crossover=True
)

# Create descriptors as numpy arrays or sparse arrays
water = samples[0]
coulomb_matrix = cm_desc.create(water)
soap = soap_desc.create(water, centers=[0])

# Easy to use also on multiple systems, can be parallelized across processes
coulomb_matrices = cm_desc.create(samples)
coulomb_matrices = cm_desc.create(samples, n_jobs=3)
oxygen_indices = [np.where(x.get_atomic_numbers() == 8)[0] for x in samples]
oxygen_soap = soap_desc.create(samples, oxygen_indices, n_jobs=3)

# Descriptors also allow calculating derivatives with respect to atomic
# positions
der, des = soap_desc.derivatives(samples, return_descriptor=True)
```

# Currently implemented descriptors
 | Descriptor                                    |  Spectrum | Derivatives |
 |-----------------------------------------------|-----|-------|
 | Coulomb matrix                                | :heavy_check_mark: | :heavy_check_mark: |
 | Sine matrix                                   | :heavy_check_mark: | :heavy_check_mark: |
 | Ewald matrix                                  | :heavy_check_mark: | :heavy_check_mark: |
 | Atom-centered Symmetry Functions (ACSF)       | :heavy_check_mark: | :heavy_check_mark: |
 | Smooth Overlap of Atomic Positions (SOAP)     | :heavy_check_mark: | :heavy_check_mark: |
 | Many-body Tensor Representation (MBTR)        | :heavy_check_mark: | :heavy_check_mark: |
 | Local Many-body Tensor Representation (LMBTR) | :heavy_check_mark: | :heavy_check_mark: |
 | Valle-Oganov descriptor                       | :heavy_check_mark: | :heavy_check_mark: |

# Installation
In-depth installation instructions can be found [in the
documentation](https://singroup.github.io/dscribe/latest/install.html), but in
short:

## pip
```sh
pip install dscribe
```

## conda
```sh
conda install -c conda-forge dscribe
```

## From source
```sh
git clone https://github.com/SINGROUP/dscribe.git
cd dscribe
git submodule update --init
pip install .
```
