Coder Social home page Coder Social logo

MBTR about dscribe HOT 3 CLOSED

mansoure37 avatar mansoure37 commented on June 20, 2024
MBTR

from dscribe.

Comments (3)

lauri-codes avatar lauri-codes commented on June 20, 2024

Hi @mansoure37!

The interface was changed in v2.0. You can see the new call syntax here. If you wish to compute different terms (k1, k2, k3), and combine them into a single vector, you would do something like this:

import numpy as np
from dscribe.descriptors import MBTR
from ase.build import bulk
import matplotlib.pyplot as mpl

# Define system
system = bulk('NaCl', crystalstructure='rocksalt', a=5.64)

# Setup and create
mbtr = MBTR(
    species=["Na", "Cl"],
    geometry={"function": "atomic_number"},
    grid={"min": 11, "max": 17, "n": 100, "sigma": 0.5},
    periodic=True,
    normalization="l2",
)
k1 = mbtr.create(system)
mbtr.geometry = {"function": "inverse_distance"}
mbtr.grid = {"min": 0, "max": 1, "n": 100, "sigma": 0.1}
mbtr.weighting = {"function": "exp", "scale": 0.5, "threshold": 1e-3}
k2 = mbtr.create(system)
mbtr.geometry = {"function": "cosine"}
mbtr.grid = {"min": 0, "max": 1, "n": 100, "sigma": 0.1}
mbtr.weighting = {"function": "exp", "scale": 0.5, "threshold": 1e-3}
k3 = mbtr.create(system)

# Combine along last axis
full = np.concatenate((k1, k2, k3), axis=-1)

# Plot
mpl.plot(full)
mpl.show()

from dscribe.

mansoure37 avatar mansoure37 commented on June 20, 2024

thanks.
Another question is: I want to compare the Fingerprint of 2 compounds with the same elements but different space group number.Is it correct to make mbtr in the way that you said above for 2 compounds and compare their plotting or do you have another suggestion for making a Fingerprint?

from dscribe.

lauri-codes avatar lauri-codes commented on June 20, 2024

If you normalize the outputs to unit length (normalizer='l2' in the MBTR constructor), then you can in principle compare structures coming from different spacegroups and importantly also the same structure in different supercells sizes (read more here)

from dscribe.

Related Issues (20)

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.