libAtoms / QUIP

libAtoms/QUIP molecular dynamics framework: https://libatoms.github.io
342 stars 124 forks source link

Descriptor gradients #256

Open albapa opened 3 years ago

albapa commented 3 years ago

There is something wrong with the gradients as returned from the calc(). They're not the appropriate shape: there is a dimension missing.

gabor1 commented 3 years ago

I thought that code is really really old

albapa commented 3 years ago

It can't be, because I had an earlier version (like a few months old) which worked perfectly.

albapa commented 3 years ago

I think I understand what's happening. The gradients are flattened out so there is only one index for the descriptor and the neighbours contributing to that descriptor. There is a map grad_index_0based provided that resolves this into (descriptor, neighbour pair).

I guess I am okay with this data structure but I suggest a wrapper function that returns these array elements in a more intuitive format.