Closed clpetix closed 1 day ago
All the has_ methods should check with return self._property is not None and self._N > 0 since .N can be zero else this will throw errors in the @property methods , as an array that is allocated to 0 should not be considered as being there.
has_
return self._property is not None and self._N > 0
.N
@property
https://github.com/mphowardlab/lammpsio/blob/3070f946570fda16a9881b78a35cd5153d406a5c/src/lammpsio/topology.py#L95C5-L104C40
Resolved in #68
All the
has_
methods should check withreturn self._property is not None and self._N > 0
since.N
can be zero else this will throw errors in the@property
methods , as an array that is allocated to 0 should not be considered as being there.https://github.com/mphowardlab/lammpsio/blob/3070f946570fda16a9881b78a35cd5153d406a5c/src/lammpsio/topology.py#L95C5-L104C40