Modeling diffusive systems using flat-bottom restraints