Moved restrict() to topology, added test for number of bonds after restriction