Skip to content

Not Unique SOAP element #153

@zbaibg

Description

@zbaibg

https://singroup.github.io/dscribe/latest/tutorials/descriptors/soap.html
in this page, it says the SOAP features only keep unique elements considering of symmetries.

But in the following pseudo-code (from the above page), some repetitive elements seems to be kept. e.g. when there are 2 species, n_max=2 and l_max=0, this will output 10 elements instead of 9.

for Z in atomic numbers in increasing order:
for Z' in atomic numbers in increasing order:
for l in range(l_max+1):
for n in range(n_max):
for n' in range(n_max):
if (n', Z') >= (n, Z):
append p(\chi)^{Z Z'}_{n n' l}` to output

This can also be checked from the following code, which output 10 instead of 9.

soap=SOAP(
species=['C','H'],
periodic=False,
r_cut=5.0,
n_max=2,
l_max=0,
sigma=0.5,)
soap.get_number_of_features()

The reason is from tuple comparision: (n', Z') >= (n, Z) in python. When n' is larger than n, it would not compare Z' and Z. So n,n',Z,Z' of (0,1,1,0) and (0,1,0,1) are both outputed, which I think is repetitive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions