scikit-learn-contrib / scikit-matter

A collection of scikit-learn compatible utilities that implement methods born out of the materials science and chemistry communities
https://scikit-matter.readthedocs.io/en/v0.2.0/
BSD 3-Clause "New" or "Revised" License
70 stars 18 forks source link

Remove optional ase dependency #231

Open agoscinski opened 3 weeks ago

agoscinski commented 3 weeks ago

The new ase release break some example notebooks. The ase dependency comes from one roy dataset (see https://github.com/scikit-learn-contrib/scikit-matter/blob/bc76938d481fe41a7279b5d79ce07ae6671924e5/src/skmatter/datasets/_base.py#L121) and can easily removed as dependency by just storing the arrays inside the ase frames. We could even try to just use numpys loadtxt, then we don't need to change the binary data file.

PicoCentauri commented 3 weeks ago

I would extract the arrays and keep them either as plain ascii files or in the numpy format. We can keep the xyz file if we like.

PicoCentauri commented 3 weeks ago

What basically is to be done is saving the energies as an .npz to /src/skmatter/datasets/data and change the code loading the energies via ase to pure numpy:

https://github.com/scikit-learn-contrib/scikit-matter/blob/bc76938d481fe41a7279b5d79ce07ae6671924e5/src/skmatter/datasets/_base.py#L121-L150