Understanding binding affinity and specificity of modular protein domains: a focus in ligand design for the polyproline-binding families