#954 MorganNumbersTool gives same number for different atoms

cdk-1.0.x
closed
None
5
2013-09-23
2009-08-28
Stefan Kuhn
No

See the attached test case

Discussion

  • Stefan Kuhn

    Stefan Kuhn - 2009-08-28

    Test case is in patch 2846218

     
  • Rajarshi Guha

    Rajarshi Guha - 2009-11-29

    Patch was applied

     
  • Stefan Kuhn

    Stefan Kuhn - 2009-11-30

    Rajarshi, did you actually fix the bug? Or is it working? If you just applied the patch (thanks for that anyway) and it fails, the bug should stay open, I think.

     
  • Rajarshi Guha

    Rajarshi Guha - 2010-10-17

    Reopening, since bug still remains

     
  • Rajarshi Guha

    Rajarshi Guha - 2010-10-17

    OK, as far as I can see this is not a bug. The two atoms that get labeled with the same morgan number appear to be equivalent as far as I can see. If I export the molecule as SMILES and label the supposedy equivalent atoms as P and S the SMILES is O=C2NCC(C=1[12P]=CC=C[12S]=1)(C)C2

    If you agree that the P & S (which are actually C's) are equiavlent then this bug should be deleted

     
  • Egon Willighagen

    So, the unit test was wrong?

     
  • Rajarshi Guha

    Rajarshi Guha - 2010-10-19

    OK,according to the input molecule in the unit test, which has explicit hydrogens, morgan numbering is indeed wrong.

    However, when the numbering is calculatd with hydrogens removed, the numbers are correct as far as I can see (with the two atoms I noted below, having the same number as they are equivalent)

    AFAIK, morgan numbering is performed on the heavy atoms; but the current code does not ignore H's. This is fine, but then the input to the argument should have H's removed.

    So if morgan numbering should only work on heavy atoms, the unit test is wrong

     
  • John May

    John May - 2013-08-08

    Just fixed this - the test was write. It was actually saying {P,S} here:
    CC1(PNC(=O)S1)C1=CC=CC=C1
    were the same. You can see the SMILES this is not the case.

    patch: /p/671

     
  • John May

    John May - 2013-09-23
    • status: open --> closed
    • Group: --> cdk-1.0.x
     
  • John May

    John May - 2013-09-23

    fixed