I do not know the valence model of RDkit. Therefore below there is an ugly but working solution: set to the S+ atom NoImplicit.

mol = Chem.MolFromSmiles('CC(C)(C)SC')

rxn = AllChem.ReactionFromSmarts('[CH0:1][S:2][CH3:3]>>[C:1][SH0+:2].[CH3-:3]')
ps = rxn.RunReactants((mol,))

print(Chem.MolToSmiles(ps[0][0]))
print(Chem.MolToSmiles(ps[0][1]))

for a in ps[0][0].GetAtoms():
    if a.GetAtomicNum() == 16 and a.GetFormalCharge() == 1:
        a.SetNoImplicit(True)

print(Chem.MolToSmiles(ps[0][0]))
print(Chem.MolToSmiles(ps[0][1]))

Pavel.


On 05/28/2017 08:26 AM, Nitzan Tzanani wrote:

mol = Chem.MolFromSmiles('CC(C)(C)SC')
rxn = AllChem.ReactionFromSmarts('[CH0:1][S:2][CH3:3]>>[C:1][SH0+:2].[CH3-:3]')
      ps = rxn.RunReactants((mol,))

      print Chem.MolToSmiles(ps[0][0])
      print Chem.MolToSmiles(ps[0][1])

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to