libAtoms / workflow

python workflow toolkit
GNU General Public License v2.0
24 stars 17 forks source link

_ConfigSet_loc geting increasingly nested for no reason #287

Closed bernstei closed 5 months ago

bernstei commented 5 months ago

A script with multiple steps seems to add increasingly deep nesting levels to atoms.info["_ConfigSet_loc"].

bernstei commented 5 months ago

Also, ConfigSet.groups() iterator is broken, e.g. for this sequence

/ 0 / 5 / 3 / 150
/ 0 / 5 / 3 / 300
/ 1 / 5 / 3 / 150
/ 1 / 5 / 3 / 300
/ 2 / 5 / 3 / 150
/ 2 / 5 / 3 / 300
.
.
.
/ 10 / 5 / 43 / 150
/ 10 / 5 / 43 / 300
.
.
.
bernstei commented 5 months ago

Nesting appears to be intentional, because running optimization or MD nests the trajectories for each input config. Perhaps for optimization that only returns the final config (e.g. traj_select="last") it should not do this.

bernstei commented 5 months ago

Broken group iterator is caused by testing for correct level of nesting and positions with str.startswith(), so "/ 1 / 12" incorrectly matches when looking for "/ 1 / 1". PR is in progress.