Giter Club home page Giter Club logo

Comments (3)

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

Hi @pujaltes!

Thank you for your note and keen observations on the code.

I had a quick look on the subject, and found a probable explanation. The equation by Bartok et. al. in the original paper has a small problem in that the integrals over the radial component do not contain the spherical coordinate Jacobian (r^2). This is mentioned in the errata that the authors have posted, and you can find it here. After you include it, you should find that our implementation is correct (when checking orthogonality, you also have to include the r^2 in the integration).

I'm not sure about the figures in our paper: I will have to take a deeper look at whether we have plotted them with the incorrect data.

from dscribe.

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

Here is an example that demonstrates that the radial basis functions are orthonormal (within numerical accuracy) when integrated under spherical coordinates:

import numpy as np
import matplotlib.pyplot as plt
from dscribe.descriptors import SOAP

n_max = 4
soap = SOAP(
    species=["H"],
    r_cut=3,
    n_max=n_max,
    l_max=2,
    rbf="polynomial",
)
r, g = soap.get_basis_poly(3, n_max)

integrals = np.empty((n_max, n_max))
for i in range(n_max):
    for j in range(n_max):
        # note the r^2 coming from the Jacobian of the spherical coordinates
        integrals[i, j] = np.trapz(g[i, :]*g[j, :]*r**2, r) 
print(integrals)

This means that the plot in our original paper is done using the incorrect basis set, but our current implementation should be correct.

from dscribe.

pujaltes avatar pujaltes commented on June 21, 2024

@lauri-codes thank you very much for taking a look at this and for your detailed response! This makes a lot of sense, thanks for clearing it up.

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.