Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_radial_basis_covariance gives error #428

Open
tavanfran opened this issue May 4, 2023 · 1 comment
Open

get_radial_basis_covariance gives error #428

tavanfran opened this issue May 4, 2023 · 1 comment

Comments

@tavanfran
Copy link

Dear librascal developers,

I am trying to use the jupyter notebook called "optimized_radial_basis_function" in your example directory. I get the following error:

cov = get_radial_basis_covariance(spex, feats)
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.10/site-packages/rascal/utils/radial_basis.py", line 258, in get_radial_basis_covariance
].reshape((n_environments, max_radial, (max_angular + 1) ** 2))
ValueError: cannot reshape array of size 0 into shape (1000,30,81)

The variable feats gives me:

feats
{(1,): array([[ 1.05488364e-06, 4.92687408e-09, -3.85978917e-10, ...,
6.56854997e-10, -1.71375982e-10, -1.80129393e-09],
[ 5.16306113e-07, 1.15980425e-08, -2.97132210e-09, ...,
-8.48864522e-08, 1.09817793e-08, 1.19521158e-07],
[ 3.02115704e-07, 1.14544918e-08, 4.79069661e-10, ...,
3.21842435e-11, 8.18395871e-12, -4.99493908e-11],
...,
[ 2.12966817e-04, -1.22929392e-19, -1.30212210e-19, ...,
3.61752414e-09, 3.84588223e-09, 5.44978080e-09],
[ 2.12966817e-04, -5.04722147e-15, 1.64968448e-15, ...,
-6.05091733e-09, -1.25810418e-09, 2.85810710e-09],
[ 2.12966817e-04, 5.04728299e-15, -1.64968696e-15, ...,
3.75128458e-13, -4.00480187e-13, 7.70920793e-14]]), (6,): array([], shape=(0, 0), dtype=float64), (8,): array([], shape=(0, 0), dtype=float64)}

which seems that it finds only H-atoms and not C and O atoms.
I tried with a different input structure, but I get the same error.

I am able to run librascal on my systems and get the output model in json format and when I load all packages I get no errors.

Could you help me?

Thank you

@Luthaf
Copy link
Contributor

Luthaf commented May 4, 2023

So this notebook runs fine for me with the latest master. Did you make any changes to it by chance? In particular to the spherical_expansion_hypers?

If not, what Os are you running on, and what's your Python version?

Running [print(k, v.shape) for k, v in feats.items()] gives me

(1,) (1000, 1620)
(6,) (1000, 1620)
(8,) (1000, 1620)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants