is there a way to precisely calculate the porosity in a box with periodic boundaries? I tried the commands
but it wouldn't take my input cell. In your examples you use an AlignedBox3 for the calculation.
Another question is how you compute the porosity in the box -- do you consider the overlap at the contacts?
Right now, I am calculating the porosity with, which does not consider the overlap:
vs=sum([p.shape.volume for p in S.dem.par])
porosity = (v-vs)/v