Registry / ai-ml / dscribe

dscribe

JSON →
library2.1.2pypypiunverified

DScribe is a Python package (current version 2.1.2) designed for generating fixed-size numerical fingerprints, known as descriptors, from atomic structures. These descriptors are crucial for various applications in materials science, including machine learning, visualization, and similarity analysis. The library maintains an active development status with regular updates, including new descriptors and derivative functionalities. [1, 2, 5]

pip install dscribe
INSTALL
IMPORT
SIG · DSCRIBE
D
dscribe
ai-mlpythonv2.1.2
Install
18.8s avg
Import
3973ms
Disk
583MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.1.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.915 runs
build_error
glibc
py 3.103.915 runs
installs and imports cleanly · install 18.8s · import 3.973s · 569MB
583MB installed
● package 583MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SOAP
from dscribe.descriptors import SOAP
CoulombMatrix
from dscribe.descriptors import CoulombMatrix
ACSF
from dscribe.descriptors import ACSF
MBTR
from dscribe.descriptors import MBTR

This quickstart demonstrates how to initialize and use CoulombMatrix and SOAP descriptors for single and multiple atomic structures (represented by ASE Atoms objects). It also shows how to compute derivatives for a descriptor. Note the use of modern parameter names like `r_cut`, `n_max`, `l_max`, and the `compression` parameter for SOAP. [2, 3, 6]

import numpy as np from ase.build import molecule from dscribe.descriptors import SOAP, CoulombMatrix # Define atomic structures samples = [molecule("H2O"), molecule("NO2"), molecule("CO2")] # Setup CoulombMatrix descriptor cm_desc = CoulombMatrix(n_atoms_max=3, permutation="sorted_l2") # Setup SOAP descriptor (using modern parameter names and compression) soap_desc = SOAP(species=["C", "H", "O", "N"], r_cut=5, n_max=8, l_max=6, compression="crossover") # Create descriptors for a single system water = samples[0] coulomb_matrix_h2o = cm_desc.create(water) soap_h2o = soap_desc.create(water, centers=[0]) print("Coulomb Matrix for H2O:\n", coulomb_matrix_h2o) print("SOAP for Oxygen in H2O:\n", soap_h2o) # Create descriptors for multiple systems (can be parallelized) coulomb_matrices_all = cm_desc.create(samples, n_jobs=2) oxygen_indices = [np.where(x.get_atomic_numbers() == 8)[0] for x in samples] oxygen_soap_all = soap_desc.create(samples, oxygen_indices, n_jobs=2) print("Coulomb Matrices for all samples shape:", coulomb_matrices_all.shape) print("SOAP for Oxygen in all samples shape:", oxygen_soap_all.shape) # Descriptors also allow calculating derivatives der, des = soap_desc.derivatives(samples[0], return_descriptor=True) print("SOAP derivatives shape:", der.shape) print("SOAP descriptor from derivatives shape:", des.shape)
Debug
Known issues
breakingIn DScribe 2.0.0, the `positions` argument for local descriptors was renamed to `centers`. Code using `positions` will break. [1]
fix
Replace `positions` with `centers` when calling `.create()` or `.derivatives()` methods for local descriptors.
affects: >=2.0.0
breakingIn DScribe 2.0.0, global descriptors (CoulombMatrix, EwaldSumMatrix, SineMatrix, MBTR, LMBTR) no longer support 'unflattened' outputs. All global descriptors now produce 1D flattened output and local descriptors produce 2D flattened output. [1]
fix
Adjust code expecting specific output shapes. Outputs are consistently flattened by default.
affects: >=2.0.0
breakingIn DScribe 2.0.0, several SOAP descriptor parameters were renamed: `rcut` -> `r_cut`, `nmax` -> `n_max`, `lmax` -> `l_max`. Similarly for EwaldSumMatrix: `rcut` -> `r_cut`, `gcut` -> `g_max`. [1]
fix
Update descriptor initialization to use the new parameter names (e.g., `r_cut` instead of `rcut`).
affects: >=2.0.0
breakingIn DScribe 2.1.0, the `crossover` parameter in SOAP has been removed. Its functionality is now controlled by the `compression` parameter. [1, 3]
fix
Replace `crossover=True` with `compression="crossover"` in SOAP descriptor initialization. If `crossover=False` was used, either omit `compression` (defaults to 'off') or explicitly set `compression='off'`.
affects: >=2.1.0
gotchaDScribe relies on the Atomic Simulation Environment (ASE) for handling atomic structures. Ensure your atomic structures are correctly represented as `ase.Atoms` objects. [5]
fix
Convert your atomic structures to `ase.Atoms` objects before passing them to DScribe descriptors.
affects: All
Upgrade
Version history
2.1.2latest on PyPI · released Sep 27, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
18
Amazon
1
OpenAI (training)
1
Resources
dscribe — pip install dscribe · libregistry