read smiles and return smiles of canonical tautomer

User 162d60ff7f

30-01-2013 18:20:46

Dear support team,


I am struggling to add the neccesary assemblies and create a code for reading smiles and returning a SMILES for canonical tautomer.



TautomerizationPlugin plugin = new TautomerizationPlugin();


plugin.setProtectAllTetrahedralStereoCenters(true);


plugin.setProtectAromaticity(true);


plugin.setProtectDoubleBondStereo(true);


plugin.setProtectEsterGroups(true);


plugin.setProtectLabeledTetrahedralStereoCenters(true);


plugin.setTakeCanonicalForm(true);


plugin.setMolecule(??


 



Ken

ChemAxon bd13b5bd77

30-01-2013 19:51:06

Hi Karen,


in the license forum post I mentioned that you need to use the ChemAxon.IKVM.marvinbeans.dll.


However it will require dependencies as well. You had better add all the dlls from that folder JChem.NET API.


Namespace is:


using chemaxon.marvin.calculations;


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using chemaxon.marvin.calculations;


namespace TautomerPluginTest {
    class Program {
        static void Main(string[] args) {


            TautomerizationPlugin plugin = new TautomerizationPlugin();
            plugin.setProtectAllTetrahedralStereoCenters(true);
            plugin.setProtectAromaticity(true);
            plugin.setProtectDoubleBondStereo(true);
            plugin.setProtectEsterGroups(true);
            plugin.setProtectLabeledTetrahedralStereoCenters(true);
            plugin.setTakeCanonicalForm(true);
            //plugin.setMolecule(??
        }
    }
}


This code compiles on my machine after having added all dlls. The dll hell wil be resolved from 5.12 when you will be able to use 4 dlls ChemAxon .NET libraries and CalculationServices ..


Now for the time being the java code can used directly through these massive number of dlls.


 


Viktor

User 162d60ff7f

30-01-2013 20:17:11

Thanks, Victor. I'll add all DLLs.


So how do I pass smiles to plugin.setMolecule? And then get smiles out of plugin?

ChemAxon bd13b5bd77

30-01-2013 20:30:16

Basically this is java code you may find in the java documentation as well:


Please try out this:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using chemaxon.marvin.calculations;
using chemaxon.struc;
using chemaxon.formats;


namespace TautomerPluginTest {
    class Program {
        static void Main(string[] args) {


            TautomerizationPlugin plugin = new TautomerizationPlugin();
            plugin.setProtectAllTetrahedralStereoCenters(true);
            plugin.setProtectAromaticity(true);
            plugin.setProtectDoubleBondStereo(true);
            plugin.setProtectEsterGroups(true);
            plugin.setProtectLabeledTetrahedralStereoCenters(true);
            plugin.setTakeCanonicalForm(true);
            Molecule m = MolImporter.importMol("C=C");
            plugin.setMolecule(m);
            var ret =  plugin.run();
            Molecule[] molecules = plugin.getResultMolecules();
        }
    }
}


Viktor

ChemAxon bd13b5bd77

30-01-2013 20:31:08

If it does nto work, I will forward this whole topic to the Calc team to review.


Viktor

User 162d60ff7f

30-01-2013 20:47:27

Hmm.


plugin.getStructureCount() return 1, but plugin.getResultMolecules() returns null.


 


Here is my smiles


"CC(C)C[C@H](NC(=O)[C@@H](COC(C)(C)C)NC(=O)[C@H](CC1=CC=C(O)C=C1)NC(=O)[C@H](CO)NC(=O)[C@H](CC1=CNC2=CC=CC=C12)NC(=O)[C@H](CC1=CN=CN1)NC(=O)[C@@H]1CCC(=O)N1)C(=O)N[C@@H](CCCN=C(N)N)C(=O)N1CCC[C@H]1C(=O)NNC(N)=O"

ChemAxon bd13b5bd77

30-01-2013 20:58:01

Calcualtor team, please check this issue.


Thanks,


Viktor

ChemAxon d9100dae53

31-01-2013 10:32:35


Hi Karen,


the plugin.getResultMolecules() method is generally used to display plugin results on the GUI, and can't be used this way. You can use plugin.getStructure(int index) to get the index-th result structure. When you would like to generate the canonical tautomer (which is always one molecule), you can do it like:


Molecule canonicalForm = plugin.getStructure(0);


Rita



User 162d60ff7f

31-01-2013 11:49:03

Hi,


 


It took me 8 hours to generate canonical tautomers for 1000 records. Some of them taking ~40 minutes. Is there any way to speed up the process? Here is my plugin settings


 



plugin = new TautomerizationPlugin();


                plugin.setProtectAllTetrahedralStereoCenters(true);


                plugin.setProtectAromaticity(true);


                plugin.setProtectDoubleBondStereo(true);


                plugin.setProtectEsterGroups(true);


                plugin.setProtectLabeledTetrahedralStereoCenters(true);


                plugin.setTakeCanonicalForm(true);


                plugin.setExcludeAntiAromaticCompounds(true);


                plugin.setMaximumTautomerizationPathLength(0);


                plugin.setMaxStructureCount(1000);


                plugin.setRingChainTautomerizationAllowed(true);



 


According to your experience what would be a reasonbale path length so I can cover majority of fused aromatic heterocycles?


Also how expensive is setRingChainTautomerizationAllowed and does it involve paths through CH2 and CH3?

User 162d60ff7f

31-01-2013 11:51:37

We have 20+ millions of chemicals, ti is important for us to cover the majority of tautomeric space.

User 851ac690a0

31-01-2013 13:46:48

Hi,


 


You can increase the calculation speed of the canonic tautomer generation by setting of the "soft" mode of the tautomer  handling :


"plugin.setRationalTautomerGenerationMode(true);" Please insert this line into your code.


 


You can not change the optional length of the canonic tauotmer generation. So this line "plugin.setMaximumTautomerizationPathLength(0);" has no effect on the final result. 


 


The ring-chain tautomerization is not taken into account in the canonic tauotmer generation.


 


 


Jozsi