atomistic-machine-learning / schnetpack

SchNetPack - Deep Neural Networks for Atomistic Systems
Other
751 stars 210 forks source link

Schnetpack version change: AtomsData #619

Closed librame17 closed 3 months ago

librame17 commented 3 months ago

Hi, I am currently running a program that is using schnetpack (qm7-x) and I think they are used the old version which comes up with this error when I try to use it with the new schnetpack version:

module 'schnetpack.data' has no attribute 'AtomsData'

the line in the code is: 
## initialize database
dataset = schnetpack.data.AtomsData(dbname, available_properties=['Eat','EMBD']) #use this line depending on SchNetPack version 
#dataset = schnetpack.data.AtomsData(dbname)

I am wondering what the equivalent of AtomsData would be in the new version.

Many thanks

Stefaanhess commented 3 months ago

Hi @librame17,

for any dataset that is provided as an ase-database, you can use schnetpack.data.ASEAtomsData which should be more or less equivalent to the old AtomsData. For QM7-X we already have a proper implementation of a dataset class (see PR #616) which we will soon merge into the master branch. Feel free to have a look at it.

Best, Stefaan