<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def partial_charge(aa, pH):
 """Calculates the partial charge of the amino acid. Parameters aa : str Amino acid single-letter code. pH : float pH of interest. """

    difference = pH - residue_pka[aa]
    if residue_charge[aa] > 0:
        difference *= -1
    ratio = (10 ** difference) / (1 + 10 ** difference)
    return ratio