Rational design of antimicrobial nanomedicines