Luthaf / rascaline

Computing representations for atomistic machine learning
https://luthaf.fr/rascaline/
BSD 3-Clause "New" or "Revised" License
44 stars 13 forks source link

Allow for float exponentials in willatts radial scaling function #196

Closed bananenpampe closed 1 year ago

bananenpampe commented 1 year ago

Hello,

for better compatibility with librascal I propose to allow the use of non-integer exponentials in the calculation of the radial scaling functions.


:books: Documentation preview :books:: https://rascaline--196.org.readthedocs.build/en/196/

PicoCentauri commented 1 year ago

Very good change. Can you check the CI. There should be adjustments to the other tests

    |
836 |             radial_scaling: RadialScaling::Willatt2018 { scale: 1.5, rate: 0.8, exponent: 2},
    |                                                                                           ^
    |                                                                                           |
    |                                                                                           expected `f64`, found integer
    |                                                                                           help: use a float literal: `2.0`

error[E0308]: mismatched types
   --> rascaline/src/calculators/soap/spherical_expansion.rs:783:91
    |
783 |             radial_scaling: RadialScaling::Willatt2018 { scale: 1.5, rate: 0.8, exponent: 2},
    |                                                                                           ^
    |                                                                                           |
    |                                                                                           expected `f64`, found integer
    |                                                                                           help: use a float literal: `2.0`
bananenpampe commented 1 year ago

okay, tests are changed, the python examples should not be affected