Changed cutoff distance to not divide by atoms as then it doesn't work if the structure has a lot of atoms.