add python create_restraint

close #598