while implementing the TIP4P lj/cut/long/coul version for the USER-CUDA package I stumbled over a small oddity. In order for the coulomb interaction between two particles (one of which being oxygen) to be calculated, both the modified and the unmodified "rsq" have to be smaller than the cutoff. I noticed that because in my implmentation I only checked the modified rsq against the coulomb cutoff to determine whether to calculate the interaction.
Since the modification is relatively small the differences are minimal but still I found that behaviour a bit odd. I would expect that one only checks against one of the two distances.
What do you think is the best way to proceed? Change the behaviour in the original tip4p, check against both cutoffs in my implementation as well, or live with some small deviations.
You're talking about the initial check of rsq vs cutsq[][] and then
the later check against cut_coulsq? I suppose this could
lead to an inconsistent decision about what is inside the cutoff.
Need to think about it a bit more. I think what is probably
better is to use the modified rsq for the Coul check
and the original rsq for the LJ check.
yes thats exactly what I am talking about. In my code I did only the two seperate checks (using the modified rsq for coulomb check) without the initial one. That lead to some discrepancies.