clustering now writes the original restraints