Hello,
Substructure matching with SMARTS behaves strangely sometimes - see code below.
The pattern with [H] matches, but the pattern with [H,F] does not
(both should match).

from rdkit import Chem
mol=Chem.MolFromSmiles('Clc2sccc2[H]')
mol=Chem.AddHs(mol)
p1=Chem.MolFromSmarts('c2sccc2[H]')
p2=Chem.MolFromSmarts('c2sccc2[H,F]')
print(mol.HasSubstructMatch(p1))
print(mol.HasSubstructMatch(p2))

Best wishes,
Michal

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to