aiqm / torchani

Accurate Neural Network Potential on PyTorch
https://aiqm.github.io/torchani/
MIT License
461 stars 127 forks source link

Creating datasets with variable length structures #623

Open rschireman opened 2 years ago

rschireman commented 2 years ago

HI all,

I'm attempting to create a dataset with differing sizes of structures. In other words, one structure may have 48 atoms, 96 atoms, etc. I've packed it into an h5py file correctly (at least I hope I did), but I'm encountering an error when the species_to_indices function is utilized. The specific error is:

d['species'] = numpy.array([idx[s] for s in d['species']]) TypeError: unhashable type: 'numpy.ndarray'

I've attached the output of the h5dump command on my dataset.

test.zip