Calculate and store structural statistics

Per #247.