The current Gaussian_linking_number.jl script works with an AF structure where the residue index starts from 1. However, for crystal structure, the starting residue is often not 1.
Function get_contacts is fine since it uses the residue indices but function GLN only takes CA coordinates, it doesn't care about residue indices but it also takes the contacts list as input. This causes a mismatch between CA coordinate and contact.