Coder Social home page Coder Social logo

singroup / dscribe Goto Github PK

View Code? Open in Web Editor NEW
383.0 20.0 86.0 17.17 MB

DScribe is a python package for creating machine learning descriptors for atomistic systems.

Home Page: https://singroup.github.io/dscribe/

License: Apache License 2.0

Python 41.67% Shell 0.11% C++ 58.10% C 0.12%
machine-learning atomistic-systems python descriptors materials-science

dscribe's Introduction

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

Descriptor Spectrum Derivatives
Coulomb matrix ✔️ ✔️
Sine matrix ✔️ ✔️
Ewald matrix ✔️ ✔️
Atom-centered Symmetry Functions (ACSF) ✔️ ✔️
Smooth Overlap of Atomic Positions (SOAP) ✔️ ✔️
Many-body Tensor Representation (MBTR) ✔️ ✔️
Local Many-body Tensor Representation (LMBTR) ✔️ ✔️
Valle-Oganov descriptor ✔️ ✔️

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 .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.