Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dscribe

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dscribe

A Python package for creating feature transformations in applications of machine learning to materials science.

  • 2.1.1
  • PyPI
  • Socket score

Maintainers
1

Build status Coverage Status 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/

You can find even more details in the following articles:

Quick Example

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

DescriptorSpectrumDerivatives
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, but in short:

pip

pip install dscribe

conda

conda install -c conda-forge dscribe

From source

git clone https://github.com/SINGROUP/dscribe.git
cd dscribe
git submodule update --init
pip install .

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc