libAtoms / matscipy

Materials science with Python at the atomic-scale
http://libatoms.github.io/matscipy/
GNU Lesser General Public License v2.1
188 stars 55 forks source link

always return array of length maxlength #158

Closed richardjana closed 1 year ago

richardjana commented 1 year ago

The size of the array returned by matscipy.rings.ring_statistics depends on the structure that the ring statistics were computed for, i.e. the largest ring found (limited by maxlength). For example, the ring statistics returned for a graphene sheet would always be [0, 0, 0, 0, 0, n] for any maxlength >= 6. I believe the function should have predictable return to avoid errors on the user side.

pastewka commented 1 year ago

Looks good, thanks for the contribution.

pastewka commented 1 year ago

Looks good, thansk for the contribution @richardjana