Comment by JM on Sep2015 says that it gets at most 38 neighbours but paper says 44 with the same parameter set. I have counted them in pymol and 38 is correct, BUT the code is using a direct comparison test if (dij2 > dmin and dij2 < dmax), which fails sometimes due to c++ roundoff errors. I tried it in a small grid like the one in the picture and modifying the settings a bit:
a) replacing > and< by >= and <=, respectively.
b) setting GPmin=0 and GPmax=0.15
which should give max 6 neighbours and it gives max 4.
I replaced this if condition by a slightly more complex one:
Comment by JM on Sep2015 says that it gets at most 38 neighbours but paper says 44 with the same parameter set. I have counted them in pymol and 38 is correct, BUT the code is using a direct comparison test if (dij2 > dmin and dij2 < dmax), which fails sometimes due to c++ roundoff errors. I tried it in a small grid like the one in the picture and modifying the settings a bit:
a) replacing > and< by >= and <=, respectively. b) setting GPmin=0 and GPmax=0.15
which should give max 6 neighbours and it gives max 4. I replaced this if condition by a slightly more complex one:
if ( (dij2-dmin)>0.00001 and (dij2-dmax)<0.00001)
and that gives the correct number of neighbours