Structure to SMILES fails with enhanced stereochemistry

User 8717ac71bd

09-04-2014 17:22:53

Hi all,


I am finally reporting an issue that has existed for as long as I have been using JChem for Excel (3+ yrs).


Converting a structure containing enhanced stereochemistry to smiles using the "To Smiles" button on the ribbon fails in JChem for Excel. 


For example, try loading the following cxsmiles:


C[C@H]1CCCCN1 |a:1|


Use "From Smiles" and you will successfully see:



Now use "To Smiles" and it will fail. 


In versions before 6.2.0, you wouldnt see any error at all but now in 6.2.2 I get the following error message:



If I edit the structure and turn off Enhanced Stereochemistry, the "To Smiles" function will work correctly but you will not get the |a:1| cxsmiles extension. 


Thanks for looking into this.  We have a large number of compounds in our database with enhanced stereochemistry and having to fix them manually in jchem for excel to get SMILES is tedious.


Thanks,


David

ChemAxon bd13b5bd77

09-04-2014 18:34:43

Hi David,


 


could you please try out to switch off the 2D cleaning option when converting the SMILES?


http://www.chemaxon.com/jchem4excel/userguide/general_settings.html


 


please check the 4. point Misc:


 



 


Viktor

User 8717ac71bd

09-04-2014 18:46:56

Hi Viktor,


My installation was set to "False" but I tried changing to to both "True" and "False" for the 2D clean on string conversion setting and still get the same error message for both.  The error is only going from structure -> string and I think it has to do with parsing the | | delimiters for the smiles string. 


If you notice in the error window attached in my original message you will see that the cxsmiles string was actually generated correctly by ToSmiles, it is something after that that thinks it has failed.


Thanks,
David

ChemAxon bd13b5bd77

09-04-2014 18:52:52

Yes,


 


sorry for the extra round, I could not convert it either with a later version of JChem 4 Excel.


Then you cannnot convert it to smiles but CXSMILES again:


 


 


Viktor

User 8717ac71bd

09-04-2014 21:46:23

Thanks Viktor. 


I'll use the "Convert" menu to generate CXSMILES if I need to. 


It does make sense that SMILES fails because I am asking it to capture information that the format doesnt support, I just never liked that in versions before 6.2 I never even received an error, it just left the structure image.


Is there a way to change the default action of the "To Smiles" ribbon button so I can either get CXSMILES or explicit tell it to just return the SMILES portion (without the | | ) part?


David

ChemAxon bd13b5bd77

09-04-2014 22:13:28

Thank you for the positive words re warning or no warning topic,


 


we agreed then warning should be dropped in such a case!


http://www.chemaxon.com/jchem4excel/userguide/actions.html


the new three state option is what you perceived and a better defaulting of this new setting.


Other customers sometimes vote for leaving the structure in the cell with no warning, someone does not like the dialogs, maybe.



  1. Convert To Structure


 


Display Statistics: The system collects and displays the detailed summary and exceptions about the conversion if this option is set to On. No conversion report will appear if the option is set to Off. If it is set to Warnings, it means that all issues occurred during conversion will be displayed, but no conversion report (no numeric information about converted structures).


 



ChemAxon bd13b5bd77

09-04-2014 22:26:13

Hi David,


 


in terms of your combined TOSMILES, TOCXSMILES I would sugget the following solution:


please find the JChemforExcel user folder in your local machine:


C:\Users\<your user name>\AppData\Roaming\ChemAxon\JChem for Excel


and then


create a copy in place from your ChemExcelRibbon xml and rename the copy to JChemExcelRibbon_Custom ,


find the button descriptor block ConvertToSMILES and replace this with ConvertToCXSMILESAction text.


Save it. Please reboot Excel afterwards.


 


Now we have assigned a new action to the one-click Ribbon action.


Which will mean that TOCXSMiles will generate SMILES if it does not contain stereo, co-ordinates, and will create cxsmiles when it does.


 


if you are interested in more Ribbon customization then please check further possibilities here:


http://www.chemaxon.com/jchem4excel/developerguide/customization_of_the_ribbon.html


 


Viktor