Image Import in Marvin
OSRA software and integration into Marvin
OSRA is a utility designed to convert graphical representations of chemical structures.
Since Marvin version 5.3.0 images can be imported from files, and pasted into Marvin using the OSRA software.
Using OSRA in Marvin
To make OSRA run in Marvin:
-
Install the OSRA software (installers are available for Windows and Mac, and it can be installed from source for Linux, Unix). Please make sure that all the required softwares for OSRA is also installed. (The installer may install them also.)
-
Set the OSRA environment variable as the absolute path of the directory, where OSRA is installed, or add this path to the PATH environment variable.
Note: In 5.6.x version of Marvin it works only when it is set in the PATH, this is a known issue, that has been fixed in 5.7.0.
Two methods are available to import images into MarvinSketch:
-
Opening an image chosen by a file chooser. (Use the Open Image, or the Open menu item from the File menu. The simple Open item is usable to open images since 5.6.)
-
If there is an image on the clipboard, the default Marvin paste will paste the image using OSRA.
Common problems
Common problems quoted from OSRA home page:
"Note that any software designed for optical recognition is unlikely to be perfect, and the output produced might, and probably will, contain errors, so a curation by a human knowledgeable in chemical structures is highly recommended."
So OSRA sometimes can not recognize a chemical structure or does some mistakes, and there are issues easy to forget about OSRA. These are the most common of problems:
-
OSRA can not open small images, and molecules. If a molecule contains less than 6 atoms, or smaller than 20*20 pixels (depending also from resolution, and font size) OSRA will most likely fail to recognize the structure.
-
OSRA may need programs installed on the computer to process with special types. To open a pdf/ps file Adobe Acrobat Reader/Ghostscript has to be installed on the computer.
-
OSRA can not open all image file types perfectly. Converting the image in different formats and importing them shows that there are formats OSRA easier recognize. So in some cases conversion to png file format helps (png seems to be the most OSRA friendly format).
-
OSRA has to be installed on your computer and the OSRA environment variable be set as the absolute path of the install directory. (If the import menu item is not enabled surely this is the problem. After installing OSRA and/or setting the variable Marvin must be restarted to make image import available.)
Marvin uses OSRA software for image import by CADD Group Chemoinformatics Tools and User Services