Menu

#674 myAtom.IsConnected(myAtom) unexpected behaviour

2.3.x
open
nobody
5
2012-10-23
2010-11-11
No

From Andrew Dalke:

If you have something like "CNOS" then C.IsConnected(C) is
true. I did not expect that. This is because IsConnected checks
to see if the target is any of the atoms of either side of the
bonds that are connected to C. And of course, C is always one
of the atoms connected to a bond of C.

This has a downstream consequence in that

   C.IsOneFour(C) == True

If I read the code right, the C in "CN" will also be in a
1-4 relationship with itself.

Discussion