implementing restraints in dsr.py