For the past weeks I have been trying to reproduce Agarwala's results but I've been unsuccessful. From this paper I am trying to reproduce the first and last columns of Fig.2, by implementing eq.2; The image below is the crystalline case from the paper:
The code is made of two parts mostly: the building of the system and the method that checks which sites are connected to which. The latter method I have checked, tested and improved it and it appears to be 100% functional. The building of the system, although appears to be correct, is likely the part where the issue arises.
I have tried several things and changed the code a whole lot but the results are always incompatible with the reference. My output is:
The results are clearly different but I cannot find any issues in the code and bear in mind that since it is a crystalline structure the result are supposed to be, at least, very similar to one another. Here's my github with the code I implemented and two images: one for the crystal case and another for the random case.
Thanks in advance
PS: I was going to post this on physics exchange but apparently since it is about writing a code I am supposed to ask here.