def calc_av_over_3aa_window(df, data_col, new_col, n_aa=4):
    """ Function to average the properties of an amino acid (conservation, disruption, etc) across a window, consisting
    of three amino acids on the same side of an alpha helix (i, i-4, i+4)
    INPUTS:
    df: dataframe
    data_col: string showing the column name, which contains the data to be averaged
    new_col: string for the new column name, containing the average
    n_aa: number of amino acids separating the aa. Default = 4 (e.g. i, i-4, i+4)
    OUTPUTS:
    The original dataframe, with an extra column.
    """
    import numpy as np
    for aa_pos in df.index:
        disrupt_centre = df.loc[aa_pos, data_col]
        if aa_pos - n_aa in df.index:
            disrupt_left = df.loc[aa_pos - n_aa, data_col]
        else:
            disrupt_left = np.nan
        if aa_pos + n_aa in df.index:
            disrupt_right = df.loc[aa_pos + n_aa, data_col]
        else:
            disrupt_right = np.nan
        av_disrupt = np.nanmean([disrupt_centre, disrupt_left, disrupt_right])
        df.loc[aa_pos, new_col] = av_disrupt
    return df
