Urgent: Is there a configuration xml for CFParamaters class?

User 3d07a7b484

23-02-2013 20:40:36

Hi to all,


I'm very new to ChemAxon Api and using 5.11.5.23 version of ChemAxon .NET.


I'm trying to get tanimato score of two SMILES formula. I'm trying to use code below,


 


             ChemicalFingerprint cf = new ChemicalFingerprint();


            ChemicalFingerprint cf2 = new ChemicalFingerprint();


            cf.generate(MolImporter.importMol("C1COCC[NH+]1CCS(=O)(=O)[O-]"));


            cf2.generate(MolImporter.importMol("C(C(CO)O)O"));


            float a = cf.getTanimoto(cf2);


But I have warning that parameters not set correctly - so I try to use below:


          CFParameters cfparams = new CFParameters("config.xml"); 


Here mentions about a config.xml (https://www.chemaxon.com/jchem/doc/dev/java/api/chemaxon/descriptors/ChemicalFingerprint.html) but I have no idea how to create that file. So is there an existing one? It would be very useful if you give me information about that.


Thanks anyway,




 

ChemAxon bd13b5bd77

24-02-2013 13:23:25

Peter, JChem team,


please comment on the code snippet above.


Thanks,


Viktor

ChemAxon abe887c64e

24-02-2013 15:16:53

Hello,


Please find an example chemical fingerprint configuration xml here: http://www.chemaxon.com/jchem/examples/config/cfp.xml


Further examples are included in the installed JChem under <JChemhome>/examples/config/ directory.


Best regards,


Krisztina


 

User 3d07a7b484

24-02-2013 17:19:33

Thanks to all for your help!


 


Regards,


Dolunay

User 3d07a7b484

24-02-2013 18:17:41










kvajda wrote:

Hello,


Please find an example chemical fingerprint configuration xml here: http://www.chemaxon.com/jchem/examples/config/cfp.xml


Further examples are included in the installed JChem under <JChemhome>/examples/config/ directory.


Best regards,


Krisztina


 



Hello Krisztina,


I'm bothering you again but I couldn't find a config folder under the examples directory.


So I tried to use the xml you linked but this time I'm having an exception like,


      MDParametersException was unhandled


Bad XML configuration string: config.xml


What should I do? Do you think it's because of .NET? Should I move my project to a java platform?


All I want  is to get similarity score of two SMILES :(




Thanks again,


Dolunay

User 3d07a7b484

24-02-2013 20:59:12

Additionally, I think I need to use some xsd file? I'm really confused :(

ChemAxon abe887c64e

25-02-2013 08:03:29

Hi Dolunay,


The other xml examples really are in 'JChem for end users and Java developers' package, you can download it from here: https://www.chemaxon.com/download/jchem/jchem-for-java/


If you need only the similarity value of two smiles we suggest to execute command line similarity search after installing 'JChem for end users and Java developers':


jcsearch -q "C(C(CO)O)O" "C1COCC[NH+]1CCS(=O)(=O)[O-]" -t:i:0.9 --similarity:s -f mrv |mview -


Here you find description of further search options:


http://www.chemaxon.com/jchem/doc/user/Jcsearch.html


https://www.chemaxon.com/jchem/doc/user/query_general_searchoptions.html#searchtype


https://www.chemaxon.com/jchem/doc/user/query_hitdisplay_searchoptions.html#similarity


www.chemaxon.com/jchem/doc/user/query_similarity_searchoptions.html


We will get back to you soon answering your questions regarding the code.


Best regards,


Krisztina

ChemAxon abe887c64e

25-02-2013 15:16:27

Hi Dolunay,


I move your topic to the experts of molecular descriptors.


Best regards,


Krisztina

User 3d07a7b484

25-02-2013 17:03:02










kvajda wrote:

Hi Dolunay,


I move your topic to the experts of molecular descriptors.


Best regards,


Krisztina



Hi Krisztina,


I really appreciate your interest. Thanks for your helps. I think the problem has been solved!


Instead of referring an xml file, I used the code below:


            CFParameters cfpConfig = new CFParameters();


            ChemicalFingerprint cf = new ChemicalFingerprint(cfpConfig);


Now it works fine! However, when I comprare tanimoto score of two SMILES that I get from my code with other online comparison tools' score,  they dont even close to each other! It seems very interesting to me? Is there any issues about it?


 


Best regards,


Dolunay

ChemAxon 60613ab728

26-02-2013 13:20:00


Hi Dolunay,


Usually concrete similarity/dissimilarity values generated by different descriptors (with different parametrization or implementations) for a structure pair can not be compared directly. We rather suggest to compare pairs of similarity/dissimilarity values coming from multiple methods. This is a possible way to evaluate the differences of methods regarding discrimination power and sensitivity for certain features.


Could you please tell us some more details about the tools that you used as reference for your studies?


If possible we are also interested in some exact query-target examples that you find very different for the various tools.


Let us know please if you have further questions.


Best Regards,


Miklos


User 3d07a7b484

27-02-2013 13:27:08

Hi Miklos,


 


I'm  using this website(http://chemmine.ucr.edu/iframe/similarity/) for pairwise ligand similarity for months. This online tool allows you to do manual similarity comparisons. But for my research I have to find the similarity scores of several compounds, so I try to develop a program to do it automatically. 


When I compare for example X and Y SMILES(formulas given below in the code),


this tool gives me similarity score of 0.03, and the code develop (given below) gives the similarity score of 0.9. There is a huge gap between these two! I really want to go on with chemaxon api which allows me to develop on .NET. But I'm confused a lot. So is there any methods( as you suggest me to use) rather than this I use,


 


            ChemicalFingerprint cf = new ChemicalFingerprint();


            ChemicalFingerprint cf2 = new ChemicalFingerprint();


            cf.generate(MolImporter.importMol("C1COCC[NH+]1CCS(=O)(=O)[O-]"));


            cf2.generate(MolImporter.importMol("C(C(CO)O)O"));


            float a = cf.getTanimoto(cf2);


Thanks for your consideration and helps,


Dolunay

ChemAxon 5fc3e8d7d0

27-02-2013 14:31:49

Hi Dolunay,


The float a = cf1.getTanimoto(cf2) method calculates Tanimoto distance (or dissimilarity coefficient) from cf2.
If you have to find similarity scores:


   float a = 1 - cf1.getTanimoto(cf2)


 


Best regards,


   Laszlo



User 3d07a7b484

27-02-2013 22:25:41

Hi Laszlo,


Thanks a lot. Now it all makes sense! Sorry for the trouble.


 


Best regards,


Dolunay