Luthaf/rascaline

'index out of bounds: the len is 41 but the index is 41', rascaline/src/math/splines.rs:229:26

Closed this issue · 6 comments

I attach a reproduce_bug.txt (.py) and 2 frame.txt files (.xyz) for which there is a bug in the computation of SoapPowerSpectrum()

thread '<unnamed>' panicked at 'index out of bounds: the len is 41 but the index is 41', rascaline/src/math/splines.rs:229:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
  
    descriptor_sr = SoapPowerSpectrum(**HYPERS).compute(**compute_args)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/rascaline/calculators.py", line 263, in compute
    self._lib.rascal_calculator_compute(
  File "/rascaline/status.py", line 31, in _check_rascal_status_t
    raise RascalError(last_error(), status)
rascaline.status.RascalError: internal error (this is likely a bug, please report it): index out of bounds: the len is 41 but the index is 41


problematic_frame382.txt
problematic_frame294.txt
reproduce_bug.txt

Hello! Thanks for reporting the bug. At some point I obtained something similar when using custom splines... Are you using rascaline's custom splines by any chance?

Luthaf commented

No, this is using the rust-side spliner. The issue is actually that the cutoff is set to 5.0, and there is a pair exactly at 5.0, which we did not support. #174 should fix this, but in the mean time you can use a cutoff of 5.00001 @ThorbenF

Ok, then it makes sense that it's also happening with the custom splines, as the evaluation should happen from the same problematic rust function

Luthaf commented

@ThorbenF are you building rascaline from source or using the version in https://github.com/Luthaf/temporary-wheels?

Luthaf commented

Ok, I've updated the equisolve branch with this fix, you should be able to re-install rascaline.