The residues are determined from the first frame. This means that you will not be able to compute the contribution of residues that are initially farther away than the selected cutoff. However, you can specify which residues select. You can analyze your trajectory, determine the residues of interest and define them explicitly in the print_res variable. Please refer to how to define individual residues and ranges here.
Note that the bar chart represents the average over the trajectory. This means the result may not be accurate if the interaction changes considerably along the trajectory. However, such information is shown in line graphs for each selected residue.
HTH!