SMIRKS

38 views
Skip to first unread message

Kenneth (Karen) Karapetyan

unread,
May 21, 2012, 10:33:34 AM5/21/12
to indigo-...@googlegroups.com
I am trying transformation:
CH3C(O)OH + Na ->CH3C(O)O- + Na+

smirks:
[C:2](=[O:3])[OH:4].[Li,Na,K,Rb,Cs,Fr:5]>>[C:2](=[O:3])[O-:4].[Li+,Na+,K+,Rb+,Cs+,Fr+:5]

The input record is attached where valency on sodium is set to zero.

I get exception:

element: bad valence on Na having 0 drawn bonds, charge 1, and 1
radical electrons at com.ggasoftware.indigo.Indigo._handleError(SByte*
message, Indigo self) at IndigoLib_indigo_dll.indigoTransform(Int32 ,
Int32 )

Charge is not set to 1 in CTAB.

Same reaction with same input works fine with transform node in Knime.

Thanks
7_i_2_salt.mol

Mikhail Rybalkin

unread,
May 22, 2012, 2:32:31 AM5/22/12
to indigo-...@googlegroups.com
Hello Ken,

I checked previous released versions, and probably you are using indigo-1.1-beta7. Could you check the latest version: http://ggasoftware.com/accept?file=indigo-1.1-rc3%2Findigo-cs-1.1-rc3-win.zip ? I tested you example, and it works fine.

If you still can reproduce that issue, then could you try to execute the following code:

Indigo indigo = new Indigo();

IndigoObject reaction = indigo.loadReactionSmarts("[C:2](=[O:3])[OH:4].[Li,Na,K,Rb,Cs,Fr:5]>>[C:2](=[O:3])[O-:4].[Li+,Na+,K+,Rb+,Cs+,Fr+:5]");
IndigoObject m = indigo.loadMoleculeFromFile("7_i_2_salt.mol");

System.Console.WriteLine("Before:");
System.Console.WriteLine(m.smiles());
indigo.transform(reaction, m);
System.Console.WriteLine("After:");
System.Console.WriteLine(m.smiles());

m.saveMolfile("7_i_2_salt_transformed.mol");


Best regards,
Mikhail


Ken

unread,
May 23, 2012, 6:51:07 AM5/23/12
to indigo-...@googlegroups.com
Yes, we are using older version. We rolled back from indigo-cs-1.1-rc3-win due to the reported issue regarding indigo-renderer referencing older version of indigo-cs.

Ken

unread,
May 23, 2012, 5:06:52 PM5/23/12
to indigo-...@googlegroups.com
Meanwhile, I used your code example for other problem with chiral sulfur in sulfoxide group.  File is attached.
This works fine and stereo is sustained in smiles using mol.smiles(). However, mol.molfile() has no stereo on sulfur even after using layout method:

Indigo indigo2 = new Indigo();
IndigoObject reaction = indigo2.loadReactionSmarts("[*:1][S@;X3:2](=[O:3])[*:4]>>[*:1][S@+;X3:2]([O-:3])[*:4]");
IndigoObject mol = indigo2.loadMoleculeFromFile("5_g_i_esomeprazole.mol");
System.Console.WriteLine("Before:");
System.Console.WriteLine(mol.smiles());
indigo2.transform(reaction, mol);
System.Console.WriteLine("After:");
System.Console.WriteLine(mol.smiles());
System.Console.WriteLine(mol.molfile()); 

How do you suggest get the mol files with stereo correctly noted in smiles?
5_g_i_esomeprazole.mol

Mikhail Rybalkin

unread,
May 24, 2012, 4:29:53 AM5/24/12
to indigo-...@googlegroups.com
Here we can with a problem, that transformation function doesn't compute atom coordinates, and so it cannot mark up and down bonds. Sterecenters are present, but bonds are not marked. You can mol.layout() after call  transform  method, it starts work correct.

I see, that such behavior is not so clear, and will add implicit "layout" call in the transform methods in case source structure has coordinates. And also will add an option to disable it, in case of some complex structures where layout works too many time.

Mikhail Rybalkin

unread,
May 25, 2012, 5:54:31 AM5/25/12
to indigo-...@googlegroups.com
Hello Ken,

I have just uploaded an updated version for Indigo for .NET: http://ggasoftware.com/accept?file=indigo-1.1-rc3%2Findigo-dotnet-1.1-rc3r2-win.zip (or download from our site).
Thank you for reporting about this issue, we just missed this version inconsistency by mistake.

And I will add an automatic layout call within transform method soon, as wrote before.

Best regards,
Mikhial

Mikhail Rybalkin

unread,
May 25, 2012, 11:37:26 AM5/25/12
to indigo-...@googlegroups.com
I forgot to say that we renamed indigo-cs into indigo-dotnet.

Valery Tkachenko

unread,
May 25, 2012, 11:38:15 AM5/25/12
to indigo-...@googlegroups.com

And I didn’t dare to ask if this rename is permanent J

 

Thanks for fixing this!

Mikhail Rybalkin

unread,
May 30, 2012, 11:33:21 PM5/30/12
to indigo-...@googlegroups.com
Yes, because "cs" in the name meant C#, that it not correct because it can be used within .NET platform, and not in a particular language.
Sorry, if you need to change configuration, build script or similar things.
Reply all
Reply to author
Forward
0 new messages