Hi all,

Why does the following happen?

In [1]: from rdkit import Chem
In [2]: from rdkit.Chem import AllChem
In [3]: from rdkit.Chem import Draw

In [4]: patt = Chem.MolFromSmarts("[CH;D2;!$(C-[!#6;!#1])]=O")

In [5]: z2 = Chem.MolFromSmarts("[*]-C-C([H])(=O)", 1)
In [6]: print Chem.MolToSmiles(z2)
[*]CC=O
In [7]: print Chem.MolToSmarts(z2)
*-C-[C&!H0]=O
In [9]: z2.HasSubstructMatch(patt)
Out[9]: False

In [10]: z3 = Chem.MolFromSmiles(Chem.MolToSmiles(z2))
In [11]: print Chem.MolToSmiles(z3)
[*]CC=O
In [12]: print Chem.MolToSmarts(z3)
[*]-[#6]-[#6]=[#8]
In [13]: z3.HasSubstructMatch(patt)
Out[13]: True

Shouldn't be that z2 and z3 have the same information?

Thanks,

Christos

Christos Kannas

Researcher
Ph.D Student

Mob (UK): +44 (0) 7447700937
Mob (Cyprus): +357 99530608

[image: View Christos Kannas's profile on
LinkedIn]<http://cy.linkedin.com/in/christoskannas>
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&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