A method for partitioning the information contained in a protein sequence between its structure and function