atomistic-machine-learning/G-SchNet

About current tokens in get_random_walk func

Closed this issue · 2 comments

wxx07 commented

current += [cur_i]

It seems to me that current here should be appended by indices of atoms, instead of sampled index from avail, right?
Is that a mistake or a misunderstanding of mine?

Hey,
the line should be correct. The naming and comments might be a little confusing.
The positions and types of atoms are sorted at the end of the function according to the order in which they appear in the generation trace:

mol_dict.update({'pred_types': pred_types,
'current': current,
Properties.R: mol_dict[Properties.R][order],
Properties.Z: mol_dict[Properties.Z][order]})

The indices in current correspond to the atoms after they have been sorted according to order and not to the original atom indices in the input.
Hope this helps!

wxx07 commented

I get it now. Thanks!