#887 Difference in ConnectTheDots documentation and code

3.0
closed
None
1
2014-07-08
2013-08-12
Pierre B
No

ConnectTheDots documentation says it '..."cleans up" making sure bonded atoms are not closer than 0.4A....'. The code uses the square root of 0.4A.

        cutoff = SQUARE(rad[j] + rad[k] + 0.45);

        zd  = SQUARE(c[idx1*3+2] - c[idx2*3+2]);
        if (zd > 25.0 )
          break; // bigger than max cutoff

        d2  = SQUARE(c[idx1*3]   - c[idx2*3]);
        d2 += SQUARE(c[idx1*3+1] - c[idx2*3+1]);
        d2 += zd;

        if (d2 > cutoff)
          continue;
        if (d2 < 0.40)
          continue;

Not sure if the documentation is incorrect, or if it was the original intention.

Discussion

    • status: open --> closed
    • assigned_to: Geoff Hutchison
     
  • Thanks. This should now be fixed in the development Git master (0.16 = 0.4*0.4)