Hi Juuso,

Based on what you've described, I think you can use the canonical atom
ranks generated without tie breaking:

In [8]: m = Chem.MolFromSmiles('C[C@H]1OC[C@H](F)CC1(C)C')


In [9]: list(Chem.CanonicalRankAtoms(m,breakTies=False))
Out[9]: [0, 8, 6, 4, 7, 3, 5, 9, 1, 1]


This uses the same code that the canonical SMILES algorithm uses.

One thing to be aware of with this code: it does use atom map information
as part of the ranking. I don't think that this make sense for your use
case,  so if you have atom maps on the atoms, you probably want to remove
them before generating the ranks

Best,
-greg





On Mon, Dec 19, 2022 at 2:22 PM Juuso Lehtivarjo <juuso.lehtiva...@gmail.com>
wrote:

> Hi Greg,
>
> Thanks for your answer. After my post I got myself the Hanson et al.
> paper, and now understand better how the new algorithm works, and why there
> is no such thing as CIPRanks anymore.
>
> I use the CIPRanks for prochirality assignment, and subsequently those
> assignments in NMR grouping (=which nuclei are chemically equivalent in
> NMR). Briefly, I check if the neighbors of a stereogenic center have two
> equal CIPRanks, manipulate one of those to have priority over the other and
> re-calculate the stereochemical label, which then reveals the pro-R/pro-S
> assignment. I think the new code can be modified to do something similar,
> basically answering the question "These branches of the graph have the same
> priority, but what would be the stereo label if they would not?".
>
> Anyway, I hope that the legacy CIPRank code is not going to be removed in
> the future, since the subsequent part of my NMR grouping code still
> involves CIPRank manipulations & re-ranking - this can't be avoided since
> finally I still need a global ranking to tell which nuclei are chemically
> equivalent.
>
> Happy holidays!
> Juuso
>
> On Fri, Dec 16, 2022 at 5:24 PM Greg Landrum <greg.land...@gmail.com>
> wrote:
>
>> Hi Juuso,
>>
>> No, the new code does not calculate those ranks.
>> There may be alternatives though; what are you interested in using the
>> CIP ranks for?
>>
>> -greg
>>
>>
>> On Thu, Dec 15, 2022 at 3:45 PM Juuso Lehtivarjo <
>> juuso.lehtiva...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> According to my tests with the new CIPLabeler, it seems that it does not
>>> store the CIP ranking to any property, such as the _CIPRank prop that was
>>> filled in the legacy AssignStereochemisty, am I correct? Is it possible to
>>> retrieve this information somehow?
>>>
>>> Cheers,
>>> Juuso
>>> _______________________________________________
>>> Rdkit-discuss mailing list
>>> Rdkit-discuss@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>>
>>
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to