An explicit model for bacterial resistance: application to beta-lactam antibiotics.