sisl
sisl copied to clipboard
MD return values -- what should they be
The problem is that we need to converge the returned values in some way.
Currently some methods returns
- lists
- collection
- geometrycollection
Now what should we do about multiple returns. See below for two ideas, which would we prefer.
Things to consider:
-
easy to work with
-
get performant code (ideally they could be
(md, ...)
arrays) -
consistency across the outputs
I've addressed all comments except this one as I am not sure we want/need to unpack. For instance, the current behaviour seems logical to me:
traj = stdoutSileVASP(f).read_trajectory[:3]()
for i in range(3):
print(traj[i].force)
# or
for step in traj:
print(step.force)
You would prefer this?
traj = stdoutSileVASP(f).read_trajectory[:3]()
for i in range(3):
print(traj.force[i])
# or
for F in traj.force:
print(F)
Originally posted by @tfrederiksen in https://github.com/zerothi/sisl/pull/573#discussion_r1235576392
List of actions:
- [x] #589 remove
Collection
and friends, users now need to manually write many geometries - [ ] Dataset attempt