User 870ab5b546
30-07-2007 20:10:36
Now I'm trying to write a reaction that simply deprotonates the most acidic atom in a compound.
I figured out that I could write this selectivity rule that works most of the time:
However, the reaction fails for a simple terminal alkyne, which your plugin doesn't recognize as acidic (something I've been bugging you about for a long time...). So, I'm now trying to modify the rule so that if there is a terminal alkyne, and there is no other atom with pKa < 25, it deprotonates the alkyne. I tried these:
but it then just returns all deprotonation products. If I change the || to ;, it goes back to the previous behavior. Any help?
-- Bob
P.S. Is there any reason why you couldn't make these rules resemble simple Java grammar more closely? Like,
I figured out that I could write this selectivity rule that works most of the time:
Code: |
-pKa(ratom(1), "acidic") |
However, the reaction fails for a simple terminal alkyne, which your plugin doesn't recognize as acidic (something I've been bugging you about for a long time...). So, I'm now trying to modify the rule so that if there is a terminal alkyne, and there is no other atom with pKa < 25, it deprotonates the alkyne. I tried these:
Code: |
(match(ratom(1), "[C:1]#[C]", 1) && pKa(reactant(0), "acidic", 1) > 25) || -pKa(ratom(1), "acidic") |
but it then just returns all deprotonation products. If I change the || to ;, it goes back to the previous behavior. Any help?
-- Bob
P.S. Is there any reason why you couldn't make these rules resemble simple Java grammar more closely? Like,
Code: |
MolAtom[] ratom1 = match(ratom(1), "[C:1]#[C]", 1); MolAtom ratom2 = -largestpKa(reactant(0)); if (pKa(reactant(0), "acidic", 1) > 25 && ratom1 != null) ratom(1) = ratom1; else ratom(1)[0] = ratom2; |