[Rdkit-discuss] GetReactingAtoms getting all atoms

2018-11-20 Thread James Conroy via Rdkit-discuss
Hi,Sorry to repost this - I posted it last week but no response and I have not 
been able to solve it since. The problem is GetReactingAtoms is getting many 
more atoms than I expected to get - any help would be much appreciated.

Hi,I have been using rdkit (thank you for creating this!) to get reacting atoms 
from an rxn but it is getting more atoms than I expected. As a test case I have 
tried this:
tsmi='[cH:1]1[cH:2][c:3]([F:4])[n:5][cH:6][cH:7]1>>[cH:1]1[cH:2][c:3]([Cl:4])[n:5][cH:6][cH:7]1'
rxn2 = AllChem.ReactionFromSmarts(tsmi)
rdChemReactions.ChemicalReaction.Initialize(rxn2)
reacts2=rdChemReactions.ChemicalReaction.GetReactingAtoms(rxn2,mappedAtomsOnly=True)
reacts2
((0, 1, 2, 3, 4, 5, 6),)
which is not what I had anticipated. I expected I would get indices for the F 
atom and c atom to which it is bonded but they all are returned
Googling led me to this https://github.com/rdkit/rdkit/issues/2031 but there 
the problem was different Kekule forms while the atoms are defined as aromatic 
in this case. Putting the reactant and product strings into a viewer looks OK.
why does it not give indices (2,3)?
thanks,James
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] GetReactingAtoms getting everything

2018-11-13 Thread James Conroy via Rdkit-discuss
Hi,I have been using rdkit (thank you for creating this!) to get reacting atoms 
from an rxn but it isn't behaving as I thought it would work. As a test case I 
have tried this:
tsmi='[cH:1]1[cH:2][c:3]([F:4])[n:5][cH:6][cH:7]1>>[cH:1]1[cH:2][c:3]([Cl:4])[n:5][cH:6][cH:7]1'
rxn2 = AllChem.ReactionFromSmarts(tsmi)
rdChemReactions.ChemicalReaction.Initialize(rxn2)
reacts2=rdChemReactions.ChemicalReaction.GetReactingAtoms(rxn2,mappedAtomsOnly=True)
reacts2
((0, 1, 2, 3, 4, 5, 6),)
which is not what I had anticipated. I imagined I would get indices for the F 
atom and c atom to which it is bonded but they all are returned
Googling led me to this https://github.com/rdkit/rdkit/issues/2031 but there 
the problem was different Kekule forms while the atoms are defined as aromatic 
in this case. Putting the reactant and product strings into a viewer looks OK.
why does it not give indices (2,3)?
thanks,James___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss