Esben,

We ended up with a glitch in the new RDKit code-review "process" with this,
but this has been fixed and the new version is checked in.

Please let me know if you still see problems,
-greg



On Wed, Dec 23, 2015 at 9:49 AM, Esben Jannik Bjerrum <
[email protected]> wrote:

> Thanks, sounds good if its a simple fix to the .ToBinary() function.
> Simple if you know ;-) "Interesting" explanation about the rB0 values, are
> they used at all in the RDkit code or are they just historic remnants?
>
> Esben Jannik Bjerrum
> cand.pharm, Ph.D
>
> /Sent from my Ubuntu Touch Phone
>
> Phone +45 2823 8009
> http://dk.linkedin.com/in/esbenbjerrum
> http://www.wildcardconsulting.dk
>
>
>
> On Tuesday, December 22, 2015 7:01 AM, Greg Landrum <
> [email protected]> wrote:
>
>
>
> Hi Esben,
>
>
> On Thu, Dec 17, 2015 at 12:04 PM, Esben Jannik Bjerrum <
> [email protected]> wrote:
>
>
> >
> >A problem is that in depictions the atomic number gets "wrapped" so it
> comes out as '*'
> >
> >I traced it down to a conversion in MolDrawing.py
> >
> >
> >mol = Chem.Mol(mol.ToBinary())
> >and it can be reproduced in the python session:
> >
> >
> >mol = Chem.Mol(mol.ToBinary())
> >mol.GetAtoms()[0].GetSymbol()
> >
> >returns '*' which is the pseudo atom with atomic number 0.
> >
> >My guess is that it has something to do with the atomic number being
> limited to 7 bit in the ToBinary() function? 128 = 10000000 => 0000000 = 0?
> Any .cpp guru who knows the ToBinary() who can help and suggest a solution?
> >
>
> You've hit the nail on the head. I think it's "just" a matter of changing
> To/FromBinary() to use all 8 bits when serializing/deserializing. I also
> think I can make this change easily without affecting backwards
> compatibility, but I'm going to have to confirm that.
>
> Also it would be best to start the atomic numbering of the pseudo atoms
> from 147 so that it matches MDL ISIS draw and Proteax pseudo atom
> numbering, but RDkit assumes that the atomic numbering are forth running. I
> guess its possible to add a lot of placeholders in between 112 and 147, but
> is there another solution?
> >
> >
>
> Unfortunately not. The periodic table data structure uses a vector to
> store the data which is indexed by atomic number.
>
>
> >Bonus question: What is the rB0 in the atomic_data.cpp file?
> >
>
> Hmm, the origin of some of that stuff is almost lost in antiquity. Here's
> an explanation:
> https://sourceforge.net/p/openbabel/mailman/message/7048411/
>
> -greg
>
>
>
>
> >P/S. don't use the above pseudo atoms for anything but tested, it need
> more testing with regard to the behavior of the combinations of outer shell
> electrons and allowed valences.
> >
> >Esben Jannik Bjerrum
> >cand.pharm, Ph.D
> >
> >/Sent from my Ubuntu Touch Phone
> >
> >Phone +45 2823 8009
> >http://dk.linkedin.com/in/esbenbjerrum
> >http://www.wildcardconsulting.dk
> >
>
> >------------------------------------------------------------------------------
> >
> >_______________________________________________
> >Rdkit-discuss mailing list
> >[email protected]
> >https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
> >
> >
> >
>
------------------------------------------------------------------------------
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to