One of the attractions of Applescript is that it helps with the automation of repetive tasks.I was recently asked if I could help with a script to convert ChemBioDraw .cdx files to .png, whilst you can open the file in ChemBioDraw and then choose 'Save As' and then choose 'PNG' from the dropdown menu this is rather laborious if you have a folder of files your want to convert. The script below automates this task, I actually wrote it as a droplet so you can drop a bunch of cdx files on it and it will convert all to PNG format saving all the new files in the same location as the original, keeping the same file name but changing the extension to .png.If you wan to see the display dialogs that I have commented out simply remove the '--' and recompile, it is perhaps easier to undertand what is happening.
With a list of source files the repeat loop takes each file and determines the file name, extension, type and kind. These are not all needed for this script but it is helpful to know what is what. The 'trimmedname' is the file name without the extension, trimmedpath' is the full path minus the extension. We then construct the new file name and path.Since ChemBioDraw scripting only seems to support saving to an alias we create an empty file using writetofile.
Now we can tell ChemBioDraw to open the .cdx file and Save As 'PNG'.
Download ChemDraw program - basic associations of ChemDraw program with the file extensions, conversion, and the information on where to download the application from.
It is perhaps easier to see the script in action.
ChemBioDraw 12.0 supports importing and exporting the file formats listed below all of which can be used in the script, you should note however not all retain the chemical information if imported back into ChemBioDraw.
Format | Import | Export |
---|---|---|
ChemDraw XML (CDXML) | YES | YES |
ChemDraw 3.5 (CHM) | YES | YES |
ChemDraw 2.0 and ChemDraw 2.1 (CHM) | YES | NO |
ChemDraw Template (CTP)a | YES | YES |
ChemDraw Template Style Sheet (CTS)a | YES | YES |
ChemDraw Stationary Pads (CDS) | YES | YES |
Connection Table (CT)a | YES | YES |
Chemical Markup Language (CML)a | YES | YES |
Encapsulated PostScript (EPS) | NO | YES |
Graphic Image Format (GIF) | YES | YES |
ISIS (SKC, TGF, RXN)a | YES | YES |
JCAMP (JDX, DX)a | YES | NO |
JPEG (JPG, JPEG) | YES | NO |
MDL V3000 MolFile (MOL) | YES | YES |
MDL MolFile (MOL)a | YES | YES |
MDL RGFile (RGF)a | YES | YES |
Accelrys MolFile (MSM) | YES | YES |
PICT | YES | YES |
Portable Network Graphics (PNG) | YES | YES |
Standard Molecular Data (SMD)a | YES | YES |
Structure-Data file (SD)a | YES | YES |
Galactic Industries (SPC)a | YES | NO |
TIFF file (TIF) | YES | YES |
a Available in ChemBioDraw Ultra 12.0, ChemDraw Ultra 12.0, and ChemDraw Pro 12.0 only
Note apparently there is a bug in older versions of ChemBioDraw that prevents save to PNG, updating to the latest version solves the problem.
The droplet can be downloaded from here scriptPNGapp.zip.
Developer(s) | PerkinElmer |
---|---|
Stable release | |
Operating system | macOS, Microsoft Windows |
Type | Scientific |
License | Proprietary |
Website | ChemDraw on PerkinElmer site |
ChemDraw is a molecule editor first developed in 1985 by David A. Evans and Stewart Rubenstein[1] (later by the cheminformatics company CambridgeSoft). The company was sold to PerkinElmer in the year 2011.[2] ChemDraw, along with Chem3D and ChemFinder, is part of the ChemOffice suite of programs and is available for Macintosh and Microsoft Windows.
Features of ChemDraw 12.0[edit]
![Chemdraw ultra Chemdraw ultra](http://s3.studylib.net/store/data/008362586_1-134697ce740d8f9753892eb6e2539e88.png)
- Chemical structure to name conversion
- Chemical name to structure conversion
- NMR spectrum simulation (1H and 13C)
- Mass spectrum simulation
- Structure cleanup
- An extensive collection of templates, including style templates for most major chemical journals.
- Export to SVG
- Export to PDF (Mac Version only)
File format[edit]
The native file formats for ChemDraw are the binary CDX and the preferred XML-based CDXML formats.ChemDraw can also import from, and export to, MOL, SDF, and SKC chemical file formats.
Plugins[edit]
SDK for ChemDraw enables third-party developers to write plugins. For example, - Quick HotKey helps to set up HotKeys in interactive mode, instead manually editing of text file. The Plugin siteappears to have been abandoned.
References[edit]
- ^Halford, Bethany (2014). 'Reflections On ChemDraw'. C&EN. 92 (33): 26–27. Retrieved 20 August 2014.
- ^Announcing CambridgeSoft from Perkin Elmer
- Mills, N. (2006). 'ChemDraw Ultra 10.0'. J. Am. Chem. Soc.128 (41): 13649–13650. doi:10.1021/ja0697875.
- Li, Z.; Wan, H.; Shi, Y.; Ouyang, P. (2004). 'Personal Experience with Four Kinds of Chemical Structure Drawing Software: Review on ChemDraw, ChemWindow, ISIS/Draw, and ChemSketch'. J. Chem. Inf. Comput. Sci.44 (5): 1886–1890. doi:10.1021/ci049794h. PMID15446849.
- Strack, Dieter (2001). 'ChemOffice Ultra 2000'. Phytochemistry. 57 (1): 144. doi:10.1016/S0031-9422(00)00503-3.
- Madlung, Andreas (1999). 'Digital Chemical Intelligence'. Science. 285 (5435): 1866–1867. doi:10.1126/science.285.5435.1866.
- David A. Evans (2014). 'History of the Harvard ChemDraw Project'. Angewandte Chemie International Edition. 53 (42): 11140–11145. doi:10.1002/anie.201405820.
See also[edit]
![File File](/uploads/1/2/5/7/125712796/732315142.png)
Retrieved from 'https://en.wikipedia.org/w/index.php?title=ChemDraw&oldid=917266667'