add function to add restraints as bonds

close #661