Added PBC extraction to create_cell()