Code Monkey home page Code Monkey logo

Comments (2)

Chronum94 avatar Chronum94 commented on August 20, 2024

Some more tests in 3D, since my previous comment on 0.1-1.0 is actually wrong. and is likely actually that scaled by the number of atoms (and can in principle be learned or kept as a user-input parameter. Some code:

from jax.ops import segment_sum, segment_min
import jax.numpy as jnp
import numpy as np

from matscipy.neighbours import neighbour_list

from scipy.stats.qmc import PoissonDisk

import matplotlib.pyplot as plt


np.random.seed(35280)


sampler = PoissonDisk(3)
points = sampler.fill_space()
num_points = len(points)
a = jnp.array(points)
i, j, dr = neighbour_list('ijd', cutoff=0.2, positions=np.array(a))
dr_mins = segment_min(dr, i, num_points)
repeats = jnp.bincount(i)
dr_mins = jnp.repeat(dr_mins, repeats)

for exp_denom in np.logspace(-4, -2, 3):
    softmaxed_dr = jnp.exp(-(dr - dr_mins) / exp_denom)
    softmax_weighted_dr = dr * softmaxed_dr / jnp.repeat(segment_sum(softmaxed_dr, i, num_points), repeats)
    strict_min_dr = segment_min(dr, i, num_points)
    soft_min_dr = segment_sum(softmax_weighted_dr, i, num_points)

    plt.scatter(strict_min_dr, soft_min_dr, s=1, label=f"{exp_denom:0.1e}")
plt.legend()
plt.show()

image

from apax.

M-R-Schaefer avatar M-R-Schaefer commented on August 20, 2024

after some discussion with Anubhab, this approach seems incomplete. We'll think off something else.

from apax.

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.