1
$\begingroup$

Not sure whether this might be a Superuser or StackOverflow question... but I hope some Chemist can help me with this.

I have an Excel table with cells which contain comments "by Cambridge Soft". I assume that these comments somehow contain the ChemDraw data of the structure. It seems to be ASCII-characters only.

enter image description here

How can I get these comments into a .cdx file?

I tried to save these comments as a text file, renamed it to test.cdx and tried to open it with ChemDraw... no success. I don't have ChemOffice available, which possibly might handle this. So far, I haven't found any useful information about this on the web. The CambridgeSoft pages are not very informative.

Since these are quite a few structures I don't want to do this manually, but in an automated process. Python would be available. Any hints or ideas?

$\endgroup$
2
  • 1
    $\begingroup$ What is the source of the Excel file? $\endgroup$ – Andrew Oct 15 '20 at 13:05
  • $\begingroup$ @Andrew, I guess it was an export from some database via Spotfire, but I don't know details. $\endgroup$ – theozh Oct 15 '20 at 15:41
4
$\begingroup$

Because you find these entries in a Excel workbook, it is likely that this spreadsheet was created with Chemdraw's add-in for Excel (company's demo) to embed chemical formulae:

enter image description here

(source).

to provide a bridge between the two worlds to display chemical libraries (promotional example, or manual chapter 13). To use it, you need both access to Excel as well as ChemDraw.

The (part of the) string shown by you does not look like the typical content of the binary .cdx, nor the human readable .cdxml file which would be understood by openbabel, a program written in the intent to interconvert structure files used in chemistry (it may read .cdx; but read and write .cdxml) on a one-by-one basis (e.g., in a GUI), or programmatically (e.g., C, Python).

Maybe you may identify the author of the spreadsheet. Or find support by the software's authors (for some years now by PerkinElmer) / add-in maintainers (e.g., on GitHub). It is not obvious their format were readable by similar products (e.g., ChemAxon's JChem).

$\endgroup$
3
  • $\begingroup$ Thank you for your answer. I know OpenBabel. Yes, as you say, it doesn't look like .cdx or .cdxml. I don't have ChemOffice and this Excel-add-in. I have Exel and ChemDraw and I can copy&paste ChemDraw OLE-objects from ChemDraw to Excel, but this is different. I guess the origin of the Excel file was an export from some database via Spotfire, but I don't know details. I will try to find out more. $\endgroup$ – theozh Oct 15 '20 at 15:49
  • $\begingroup$ @theozh Some additional ideas were put into the chat, chat.stackexchange.com/rooms/3229/the-periodic-table. Good luck! $\endgroup$ – Buttonwood Oct 15 '20 at 21:21
  • $\begingroup$ thank you for sharing your thoughts and listing different options. My hope and idea was to have SMILES and ChemDraw OLE objects in the same Excel table. Apparently, the database has ChemDraw objects in it but no SMILES and I don't know how to get the ChemDraws out. I guess an unnecessary lengthy workaround would be to export to SDFs, then batch convert these SDFs into SMILES and/or InChI (for this I have a ChemDraw+Python solution :-), further generate CDX, but then the last missing bit would be how to get the CDX in the Excel table again... $\endgroup$ – theozh Oct 16 '20 at 18:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.