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:
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.
could you please try out to switch off the 2D cleaning option when converting the SMILES?
please check the 4. point Misc:
- 2D clean during string conversion: It is possible to apply the 2D clean function automatically at converting strings to structures to calculate new 2D coordinates for molecules. The default value of this option is False and the original 2D coordinates of structures are kept at converting strings to structures in this case. If this option is set to True, new 2D coordinates are calculated automatically at converting strings to structures. The current geometry of the structure is used at reconverting it to string, so it can result differences in the reconverted string compared to the original string.
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.
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:
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?
Thank you for the positive words re warning or no warning topic,
we agreed then warning should be dropped in such a case!
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.
- 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).
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
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: