Thermodynamic compatibility of proteins in aqueous medium