The Copy/paste of structures to MS Word or PowerPoint

User f68cece6e2

20-08-2008 08:34:40

I would like to address the ability of copy a structure from Marwin to MS Word or Powerpoint.


In the attached file I present a few examples of pasting in different formats.


The vector graphics paste works and gives scalable pictures. But the picture can not be edited.


Most often an OLE object paste would be preferred.


Any changes of the structures or the text could be done without having to save lot of drawing files.


The quality of the OLE paste is, as seen on the last slides, poor when the size is increased.


Are you planning to make the OLE paste work better with scaling?


Or is it possible to make the pasted picture larger as it arrives to Word from the start?





I use MarwinSketch 5.0.1, XP with SP2 and MS Office 2003.





Regards LarsT

ChemAxon 2db1f4037e

21-08-2008 09:38:46

Dear LarsT,





Since the Marvin 5.0 release, OLE has been redesigned. The Marvin 5.1 OLE has an improved image quality.


Please, try the new release, and check if those improvements suit your needs.





Best regards,


Istvan Cseh

User f68cece6e2

21-08-2008 11:54:07

Got the 5.1 version and it behaves much much better.


But I noticed that terminal alkyl-groups how their hydrogens after the paste.


Like propene is copied as H2C=C-CH3.


On the canvas it looks as =- but during the OLE process the terminal hydrogens are added.


I would like the canvas picture to look the same as the MS Office pasted one.





LarsT

ChemAxon 2db1f4037e

21-08-2008 13:37:41

Dear LarsT,





Unfortunately there are some display options not passed correctly to the OLE server, including the display of implicit hydrogens. We are working on that issue.





Best regards,


Istvan Cseh

User f68cece6e2

16-10-2008 06:10:36

You probably noticed this already.


But the MarwinSketch 5.1.2 actually shows the terminal hydrogens on all terminal alkyl-groups directly after the OLE paste.


If I can make a suggestion, I would prefer if MarwinSketch opens if I double-click on a pasted structure, and not as an embedded editor.


Maybe that is more complicated to make but it feels as more stable solution.





LarsT

ChemAxon 0e37943a96

17-10-2008 13:56:42

Dear Lars,





thanks for you suggestion. We will implement this feature in the next releases.





Best regards,


Tamas Pelcz.

ChemAxon 990acf0dec

17-11-2009 08:30:25

Dear Lars,


We investigated your suggestion regarding to change the default behavior of double-click on Marvin OLE objects in MS Office document, but with the OLE2 techology (which was actually about to provide the inline editing capability of OLE objects) it seems to be not an obvious modification, and probably takes much more effort as we expected.


We have further developed our OLE object editing behaviour; the improvements will be released in version 5.3.0, coming very soon. Please, if you have time, evaluate the OLE editing functionality in it, and tell us if you still feel it important to change the default behavior to Open instead of Edit.


Thank you in advance.


Best regards,


Akos

User 870ab5b546

31-12-2009 02:06:50

Have you made any progress on Mac users being able to paste a Marvin picture into a Word document, copy it back later, and paste it back into Marvin for further editing?  See this discussion.  I see here that Marvin 5.3 will be able to convert images into SMILES, but, the SMILES structure will lose all spatial information and all graphical objects, so it's not a very good solution.  Storing the MRV code as metadata in the image is a much better solution.  

ChemAxon 5433b8e56b

05-01-2010 15:27:10

Hi Bob!


Currently there is one possibility that will be included into the 5.3 release. We have integrated OSRA with Marvin, and if you install OSRA in your environment, Marvin will be able to import an image as an editable structure.


Further updates on this will be available in 5.4 where we will implement image related features in import and export, and we will be able to export images that can be imported as a structure inside Marvin again without third party applications.


Regards,
Istvan

User 870ab5b546

05-01-2010 15:32:02

OSRA does not meet my needs, because it won't handle graphical objects and because it will convert structures to SMILES, which does not contain geometrical information.  In other words, the picture that I import back into Marvin will look nothing like the picture I originally drew.  If I am wrong about this, please correct me.  Otherwise, I look forward to using Marvin 5.4 to write Word documents, and meanwhile I will stick to ChemDraw.

ChemAxon 5433b8e56b

08-01-2010 04:05:14

It is bad news, but currently OSRA was the only new thing i could suggest in 5.3, but i will keen on to implement image meta data usage in export and import untill 5.4.


I will ask my collagues to answer your OSRA specific questions, because i can neither confirm nor falsify your information.


Regards,
Istvan


 

ChemAxon 0a9e2a55e1

08-01-2010 21:26:40

Dear Bob,


OSRA is an image recognizer program, that tries to find structures on the image and converts them into a molecule format.


As it is written on the 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 if it's important for You that the imported structure is like the one You have drawn, than the errors in recognition will be the biggest problem for You, rather than the loss of geometrical information. (You are right: we convert pictures into smiles with OSRA.)


 


Best Regards,


Peter

User 81c70b5951

21-01-2010 21:46:58










bobgr wrote:

OSRA does not meet my needs, because it won't handle graphical objects and because it will convert structures to SMILES, which does not contain geometrical information.  In other words, the picture that I import back into Marvin will look nothing like the picture I originally drew.  If I am wrong about this, please correct me.  Otherwise, I look forward to using Marvin 5.4 to write Word documents, and meanwhile I will stick to ChemDraw.



I'm the developer of OSRA, I would like to correct this misunderstanding. OSRA can output SD file which will contain all the geometric information present in the image (bar the possible recognition errors of course). OSRA outputs SMILES by default but it by no means limited to SMILES. Using "-f sdf" command line option will give you SDF formatted output.

ChemAxon 0a9e2a55e1

22-01-2010 14:52:43

Dear Igor,


Thanks for the correction. I've seen the option for sdf output in the documentation while adding the OSRA support to Marvin, but I've read somewhere that it is a conversion from smiles, so the we lose the geometry in that case too. We will improve our OSRA support in the next minor release with reading the sdf output of OSRA.


Best regards and thank You for help in the integration,


Peter

User 870ab5b546

24-01-2010 00:29:50

OSRA is a great tool for converting images into structures, but if an image has been produced by MarvinSketch, it should be possible to paste it back into MarvinSketch for editing with *exact* reproduction of the original data (on a Mac as well as on a PC).  If CambridgeSoft can do it, so can ChemAxon.  

ChemAxon 5433b8e56b

26-01-2010 14:15:39

Yes, of course we can do it, and we will keen on to impement it in 5.4.


Best regards,
Istvan

User 20323f6e60

27-02-2010 20:14:31

Hello, i'm new on using MarvinSketch. I want to use it as an alternative of ChemDraw, which i got feed up with.


Im using a Mac (SLeopard), and i'm having the issue of only being able to paste a bitmap picture in apps like keynote, which are not scalable and transparent.


 


I read about a copy tab in the preferences dialog, but it is not in mine app, just "display, bonds, structure, checkers and save/load".


 


I dont care about reopening structures after pasting them, but i do care about pasting them in a resizable format.


 


Is there any workaround or solution??


 


Thank you very much

ChemAxon 5433b8e56b

02-03-2010 15:12:28

Hi,


the copy tab in the Preferences dialog had been deleted in the 5.3.0 release, and we don't plan to recreate it. Altough it had not contain any option that can help you in this situation.


I can only suggest the following workaround: save the molecule in svg format to a file, and insert the image file to the target application from that. SVG is the only vector graphics format in Marvin that is currently being supported on Mac, and only in this way as far as i know.


We can implement a copy as option to copy SVG format to the clipboard, but we have ran into problems with this before. We were not able to investigate any application that is capable to copy svg format to the clipboard, so we have not any idea about its native clipboard name (neither the standard one nor any application specific), so if we put the svg data to the clipboard, the target application won't be able to recognize and paste it. If you know about the native name we can use, then we can build the option into the next release immediately.


Other formats can also be implemented, if there is a suitable format, but that will take more time.


Best regards,
Istvan

User 870ab5b546

20-05-2011 13:56:33










ifajth wrote:

Yes, of course we can do it, and we will keen on to impement it in 5.4.


Best regards,
Istvan



I know this is an old thread, but here we are at Marvin 5.5.  Is it yet possible on a Mac to copy a structure from Marvin to Word, displaying it as an image in Word, then copy it in Word and paste it back into Marvin for editing?  If so, I don't see it....

ChemAxon 7c2d26e5cf

26-05-2011 15:04:14

Theoretically, the source should be inside the PNG image. Probably, the host application can not support PNG.


Can you describe it how you tried transfer it?

User 870ab5b546

26-05-2011 18:03:19


  1. I went to your Marvin 5.5 page with iCab 4.8.

  2. I drew pyrrole and highlighted it.

  3. I chose Edit -> Copy As ... -> PNG image.

  4. I pasted the PNG image into an MS Word 2004 document.

  5. I copied the picture from the Word document.

  6. I went back to Marvin 5.5 and pressed the Paste button.  Nothing happened.


Also:



  1. I chose File -> Save As Image... 

  2. I chose a name for the file and the PNG format and pressed Save.  An Image Export Options dialog box appeared.  I ascertained that the box next to Save molecule source into image comment was checked, and I pressed OK.

  3. I opened the resulting file in GraphicConverter.  It showed nothing in the Comment window.

  4. After copying the picture from either GraphicConverter or Preview, I went back to Marvin 5.5 and pressed the Paste button.  Nothing happened.


Then:



  1. I went to your Marvin 5.5 page with iCab 4.8.

  2. I drew pyrrole and highlighted it.

  3. I chose Edit -> Copy As ... -> JPG image.

  4. I pasted the JPG image into an MS Word 2004 document.  The picture that appeared had TWO pyrrole molecules in it (in a single picture).

  5. Copying this picture and pasting it back into Marvin had no effect.


Then:



  1. I chose File -> Save As Image... 

  2. I chose a name for the file and the JPG format and pressed Save.  An Image Export Options dialog box appeared.  I ascertained that the box next to Save molecule source into image comment was checked, and I pressed OK.

  3. I opened the resulting file in GraphicConverter.  The MRV source showed in the Comment window!  The picture appeared normal (not doubled).

  4. After copying the image from either GraphicConverter or Preview, I went back to Marvin 5.5 and pressed the Paste button.  Nothing happened.

  5. I could paste the image from GraphicConverter into Word.  The picture appeared normal (not double).  Copying this image from Word into Marvin had no effect.



User 870ab5b546

31-05-2011 16:08:51

Using the information in this post, I successfully launched MarvinSketch 5.5.0.1 on MacOS 10.5.8.


I drew pyrrole and copied it as JPG.


Opening the structure in GraphicConverter, there was no information in the comment field.


Same result with PNG.


I could paste either picture into MS Word 2004, but copying it and pasting it back into MarvinSketch was unsuccessful.


However, I could save the image to a file.  Opening it with GraphicConverter showed the comment field.  I could use MarvinSketch to open the image file again for editing.


So, there are two remaining issues:



  1. Why doesn't Copy As... save the MRV to the comment field?

  2. How to save the comment information when the picture is pasted into MS Word?  (Maybe this is a Word 2004 problem, and I need to upgrade to a more recent version of Word.  I hate upgrading.  I have heavily customized my version of Word 2004, and I am worried they won't carry over to Word 2008 or whatever the most recent version is.)

ChemAxon 5433b8e56b

31-05-2011 19:25:39

Hi Bob,


sorry for answering so late, i was ill last week, and just get to your post to answer it.


So the problem is the following:


- The copy as operation uses the imageflavor defined in java, that means there are not only a png image on the clipboard, but other formats also, but all the formats are generated based on the png generated by Marvin.
- The png image on the clipboard contains the molecule source, but the host application has the right to choose which data format it imports, therefore other formats my be imported instead of png.
- As i discovered most of the image viewer applications do not read the comment field from a png or jpg file, actually i do not know why, since i am useing the standard comment place of comments to store the source.
- The main problem with the paste back from a host application is the following: the host application has the right to choose the format of the data, and it seems office apps even on windows platform and maybe all of the host applications simply put back the image in some format from the image object they use to store the picture data inside, and they do not care about the data from which they imported the image. This is also true when you place a picture from an image file into a word document and copy it, the host application does not use the data in the file, but the image object that was created insied the document.


So currently marvin stores the molecule source in images, but this is not help when you want to copy images back and forth between marvin and office or other apps.


I have to admit that, currently i have no idea what to do, so i have to further investigate the possibilites on the mac platform because the original idea is not working. This is why it was not highlighted in the release notes, and this is why i currently can not give you an estimation about when will this feature be implemented.


Regards,
Istvan

User 870ab5b546

31-05-2011 20:04:03

It must be doable, because ChemDraw does it.


Could the MRV data be stored within the data of the image itself, rather than as a comment attached to the image?

ChemAxon 5433b8e56b

31-05-2011 23:23:18

I think this is not the case with chemdraw... It is possible to encode the data into the image in a way that does not really modify the visible picture, but i assume that, there is a more easier way to do that.


And i also think it is not realistic... let's take a small picture about a benzene, it could be very small for example  25x25 pixel, in this case there is 625 pixel, that means maximum 2500 unit of color  information. if we use one bit from each unit, which means 1 bit per color per pixel, the lowest means the lest significant in the value of the color. In this case we have 312 byte, and even the mol file format representation is bigger then this, so it is not realy a safe way, at least there can be a lot of cases when data will be lost with this algorithm.


This is why i think this solution can not be good and this is why i feel that, the solution is somewhere else. I will try to figure out what ChemDraw does.

ChemAxon d44f555baf

23-08-2011 16:27:56

Hi, 


I am a new developer in marvin project. Now I focuse on Mac OSX issues.


Can you tell me what do you mean on editing the picture copied from MS Office, because I cannot reproduce this functionality (I cannot add bonds, atoms etc. to the pictured Molecule). The picture in ChemDraow acts as a raster, when I resize it.


I used:


MacOSX 10.5.8


ChemDraw Pro 12.0.3


Please tell me how can I reproduce this act step by step.


Best Regards,


Erneszt Kovacs

User 870ab5b546

23-08-2011 17:42:22

I copy a picture from ChemDraw and paste it into MS Word.


When I copy it in Word, then paste it back into ChemDraw, it is editable.


There may be a preference you need to set.  Under General, see if Add PDF to Clipboard is checked.


Also see this page.

ChemAxon d44f555baf

27-08-2011 12:57:44

Hi,


Chemdraw write the molecule structrure to the pdf's metadata. Metadata is supported by the MSOffices you talked about, thats why you can copy from Chemdraw to Office and back the molecule structure.


I'm sure that Chamdraws's gui was written with one of OSX 's native frameworks (Cocoa/Carbon). These frameworks support PDF export/ import in an easy way.


With java it is a bit difficult to generate/read  pdf, so until we cannot find a pdf library that suits to us, this feature will not supported in marvin.


Best Regards,


Erneszt