openkim / kliff

KIM-based Learning-Integrated Fitting Framework for interatomic potentials.
https://kliff.readthedocs.io
GNU Lesser General Public License v2.1
34 stars 20 forks source link

Dataset object for v1 #135

Closed ipcamit closed 10 months ago

ipcamit commented 10 months ago

Summary

Include a summary of major changes in bullet points:

Additional dependencies introduced (if any)

ipcamit commented 10 months ago

Pushing new changes as per suggestions:

  1. make ASE import direct, and not conditional
  2. Fixed missing docs
  3. Changed Configuration to cls in classmethod
  4. Now that ase is a dependency, moved string based typehints to Atoms
  5. Added stress setter 6 Added metadata field to Configuration for colabfit dataset properties
  6. New dataset initialization methods
  7. fixed tests to reflect new dataset interface

On new dataset initialization: Now Dataset object supports three classmethods, from_colabfit, from_path, and from_ase, to initialize the dataset. Similarly, it has three additional methods called add_from_colabfit, add_from_path, and add_from_ase, to extend the datasets from these sources.

The main difference between *from_path and *from_ase is that ASE function can also accept list of ase.Atoms object to initialize the dataset. Another major difference is that while ase accepts Voigt notation in stress, it usually expects the xyz file to have full 9-member matrix. Therefore we have two functions, from_path, and from_ase, where from_ase will always stick to ase.io.read function.