Issue in reading the dataset
I downloaded one sub-dataset rattled-relax-val, and tried reading them using the code below
from fairchem.core.datasets import AseDBDataset
dataset_path = "C:/Users/HP/Desktop/Chem/rattled-relax-val/rattled-relax-val"
dataset = AseDBDataset(config=dict(src=dataset_path))
# Attempt to retrieve an Atoms object by index
try:
atoms = dataset.get_atoms(0)
print("Successfully retrieved Atoms object:", atoms)
except Exception as e:
print("Error loading dataset:", e)
I am getting this error. I read the documentation
https://fair-chem.github.io/autoapi/core/datasets/ase_datasets/index.html#core.datasets.ase_datasets.AseDBDataset
It seems the dataset is not in a valid AseDBDataset
"""
Traceback (most recent call last):
File "c:\Users\HP\Desktop\Chem\test.py", line 6, in
dataset = AseDBDataset(config=dict(src=dataset_path))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\HP\AppData\Roaming\Python\Python312\site-packages\fairchem\core\datasets\ase_datasets.py", line 107, in init
raise ValueError(
ValueError: No valid ase data found!Double check that the src path and/or glob search pattern gives ASE compatible data: C:/Users/HP/Desktop/Chem/rattled-relax-val/rattled-relax-val
"""
Hello @chandanwaa ,
Thanks for bringing this up. Let me trouble shoot on my end and see if I can reproduce.
Hi @chandanwaa ,
I can not reproduce your error on my end. This is what I tested on a Linux OS:
wget https://dl.fbaipublicfiles.com/opencatalystproject/data/omat/241018/omat/train/rattled-relax.tar.gz
tar -xf rattled-relax.tar.gz
Then this runs without error in a python shell
from fairchem.core.datasets import AseDBDataset
dataset = AseDBDataset(config=dict(src="rattled-relax"))