SINGROUP / dscribe

DScribe is a python package for creating machine learning descriptors for atomistic systems.
https://singroup.github.io/dscribe/
Apache License 2.0
395 stars 88 forks source link

formula for SOAP power spectrum in the tutorial. #54

Closed negf closed 3 years ago

negf commented 4 years ago

Hi,

In the tutorial the power spectrum as well as the expansion coefficients depend on r, however the r dependency should be integrated out. So the r dependency in p(r) and c^Z_nlm(r) should be dropped, shouldn't it?

lauri-codes commented 4 years ago

Hi @negf,

In this context, r does not refer to the integration variable. It instead refers to the position that you have chosen as a center for the SOAP spectrum. As you said, the radial variable in the integration has already been integrated out.

I can see that this is confusing. Do you think that renaming the variable to R and documenting the difference better would be a good idea?

negf commented 4 years ago

ok I see. That is indeed a bit confusing. Yes I think using R or R_i (where i is the i-th atom) would be more clear. Or as far as I understand the basis functions are always centered at the position R_i of the atom so simply i as index would suffice, because I could think of the power spectrum as a 2D matrix where the i-th row is given by the components of p(R_i), isn't this what you output anyways (in some flattened form).

lauri-codes commented 4 years ago

The SOAP spectrum can be calculated at any arbitrary point in space, so R does not have to correspond to an atomic position. But more generally R_i would refer to the ith position for which the spectrum was requested.

I will update the docs so that all this is clearer. Thanks again for the feedback!

Aki78 commented 4 years ago

That is a good point. r_i gives the impression of the spectrum always being on top of the atoms though, maybe x in vector format would be clearer, since it can be anywhere in space.

lauri-codes commented 3 years ago

Fixed in the upcoming version 1.1.0.