rascaline icon indicating copy to clipboard operation
rascaline copied to clipboard

Tabulated pair functions calculator

Open Luthaf opened this issue 3 years ago • 5 comments

We need some calculator that can take in one or multiple splines, and compute a per atom/per structure functions summed over neighbors.

$$ < n | f > = \sum_j f(r_{ij}) $$

This would enable multiple things:

  • calculation of pair potential as a baseline potential (without requiring an external software)
  • calculation of basic pair descriptor (the G2 functions for BPSF would be a possibility)

Luthaf avatar Oct 04 '22 08:10 Luthaf

Before starting on this we might be decide on the parameter/hyper design. Here from the python side

class RadialTableCalculator:
    def __init__(self, cutoff, splines):

I would add a cutoff and list of splines:


splines = [{"species_center": 6,
                  "species_neighbor": 6,
                  "positions": np.array([1,2,3,4]),
                  "values": np.array([1,0.5,0.2,0.1]),
                  "gradients": np.array([1,0.5,0.2,0.1])},
    ...
}

we might also only take values and the calculate the the gradients using some finite difference scheme.

We throw an errors outside of interoplation range. No extrapolation.

PicoCentauri avatar Oct 04 '22 12:10 PicoCentauri

I think ideally we should take some hint from equistore. You can have e.g. labels that go "center_species" "species_neighbors_1", etc, and then match the samples or keys from a neighbor list. Possibly, the real question here is how we want to implement metadata and group selection for neighbor lists.

On Tue, 4 Oct 2022 at 14:42, Philip Loche @.***> wrote:

Before starting on this we might be decide on the parameter/hyper design. Here from the python side

class RadialTableCalculator: def init(self, cutoff, pairtable, kind):

I would add a cutoff, the interpolation kind and a pairtable dictioary. pairtable contains all elements as keys. Each element is dictionary itself containing the keys positions, energies, forces/gradients, where each of these is a 1D array.

pairtable = { "1": {"positions": np.array([1,2,3,4]), "energies": np.array([1,0.5,0.2,0.1]), "forces": np.array([1,0.5,0.2,0.1])}, ... }

we might also only take energies and the calculathe the gradients using some finite difference scheme.

Any comments?

— Reply to this email directly, view it on GitHub https://github.com/Luthaf/rascaline/issues/108#issuecomment-1266935993, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIREZY33DQOFHBUCCOCSJLWBQQ4PANCNFSM6AAAAAAQ4K3OMM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ceriottm avatar Oct 05 '22 23:10 ceriottm

I think ideally we should take some hint from equistore. You can have e.g. labels that go "center_species" "species_neighbors_1", etc, and then match the samples or keys from a neighbor list. Possibly, the real question here is how we want to implement metadata and group selection for neighbor lists.

I have no idea what you mean here. There is no neighbor list involved in the proposed calculator (from the user point of view). We should also have a separate NeighborList calculator that would just give a raw neighbor list in equistore format (I have this on a branch, I need to clean it up).

Luthaf avatar Oct 17 '22 16:10 Luthaf

What I meant is that in practice one will have a list of pair potentials, and they will have to be evaluated for a list of pairs. It would make sense IMO to have the pairs "exploded" into species - basically using the neighbor list to generate a list of pair distances broken down by species.

On Mon, 17 Oct 2022 at 18:31, Guillaume Fraux @.***> wrote:

I think ideally we should take some hint from equistore. You can have e.g. labels that go "center_species" "species_neighbors_1", etc, and then match the samples or keys from a neighbor list. Possibly, the real question here is how we want to implement metadata and group selection for neighbor lists.

I have no idea what you mean here. There is no neighbor list involved in the proposed calculator (from the user point of view). We should also have a separate NeighborList calculator that would just give a raw neighbor list in equistore format (I have this on a branch, I need to clean it up).

— Reply to this email directly, view it on GitHub https://github.com/Luthaf/rascaline/issues/108#issuecomment-1281142592, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIREZ6LWC6MDF3TXKE2HJTWDV5NBANCNFSM6AAAAAAQ4K3OMM . You are receiving this because you commented.Message ID: @.***>

ceriottm avatar Oct 17 '22 20:10 ceriottm

So my idea for this calculator would be to do the sum over pairs of the same species (allowing different splines for different species pairs). The output TensorMap would contain species_center and species_neighbor keys, but the samples would be per-atom and not per-pair.

Luthaf avatar Oct 18 '22 07:10 Luthaf