Hi there,
I was testing your code for some of the systems in S66 and found that for dimer 20 (acetic acid) it is possible to get a NaN error in the assignment "cosa = zj1/dist" in the function torsion. This happens because it calls the function with a pair of matching atoms, for which dist = 0.0, the division results in NaN for cosa. Because of the inherent logic behind NaN, sometimes it reassigns cosa to 1 (-1), other times leaves unchanged, as it should, and that causes problems in the code and leads to what I believe are wrong results (I would not trust a result based on a NaN). I suggest checking whether dist > 0 before doing the division.
Best
I have been using this very nice implementations of Martin's H+ for a while. Now I am interfacing this module to AMBER and I found that gfortran and ifort give different results for a large system (tests on dimers are all fine).
For this molecule big.xyz i get with
gfortran v6.3 and v4.8: -58.493085 kcal/mol
intel v15:-71.218593 kcal/mol
So far I noticed that different and a different amount of H-bonds are detected, but not why.
I also tried ifort -fp-model precise, but no change.
Can someone reproduce my findings?
And which result is correct?