Fixed calculation of neighbors index with pbc

I think the way pbc were applied was not correct (Fix #19).
Merge branch 'fix-19' into v2.0