Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For registration and login issues contact website support.

Support Ticket System is replacing forum

This forum was converted into a searchable archive. You cannot add posts here any more. For support please use our new Ticket System.

Create your first ticket
Mrv export of more than one structure
To watch this topic for replies  Register (enables digests) or give email address:
This topic is locked: you cannot edit posts or make replies.
Display posts from previous:   
    View previous topic :: View next topic    
Author Message
Martin

Joined: 23 Sep 2016
Posts: 8

View user's profile

Back to top
Link to postPosted: Fri Feb 17, 2017 3:11 pmPost subject: Mrv export of more than one structure Reply with quote

Hello,

when I draw more than one structure in MarvinJS (means these two structures anŕe not connected with any bond) there is only one "molecule" element in the exported MRV.

Is there a chance to tell marvin to export it as two molecules? I have seen examples of mrv exports with more molecule elements (molecule id="m2")

Students are supposed to draw resonance structures and I really need them to draw these in one editor.¨

Thanks

Martin

Eszter
ChemAxon personnel
Joined: 05 May 2014
Posts: 141

View user's profile

Back to top
Link to postPosted: Mon Feb 20, 2017 11:25 amPost subject: Reply with quote

Dear Martin,

In Marvin JS only reactions are exported with separate reactant, agent, product lists, which contain all the molecules in separate molecule tag.
Marvin JS considers structures as a reaction, if there is one arrow on the canvas. 

If you can draw structures with one arrow, this could work.

The other way to export molecules separately is to export these into  MDL SDfile (CTAB v2000) format, but, please consider that in this case the order of the molecules depend on their position on the canvas, and Marvin JS only imports the first molecule from the list. (Also, SDfile do not handle arrows, so in this case the arrow will be lost, but if I understood your purpose well, this will not be a problem.)

I hope this will help.
If you need more information, please do not hesitate to contact us.

Best regards,
Eszter 

Martin

Joined: 23 Sep 2016
Posts: 8

View user's profile

Back to top
Link to postPosted: Mon Feb 20, 2017 12:50 pmPost subject: Reply with quote

Dear Ezster,

thank you for your helpful answer. I guess I have to split the molecule tag into separate molecules by looking at the bonds.

Martin

Eszter
ChemAxon personnel
Joined: 05 May 2014
Posts: 141

View user's profile

Back to top
Link to postPosted: Mon Feb 20, 2017 5:13 pmPost subject: Reply with quote

Hi Martin,

I consulted with my colleagues in JChem Web Services team, and it seems that if you have JChem Web Services set in your environment, there is a workaround:
With this, you can get the mrv-s containing the molecules in separate molecule tags, even if there is no reaction on the canvas.

What you need to do:

Send a POST request to JChem Web Services with the following parameters:

url:
<webs service base URL>/rest-v0/utilext/convertStream/mrv

body:

{
    "fragmented": "true",
    "data": [
        {
            "structure": source
        }
    ]
} 

You can get the molecule source if you call exportStructure() function on the editor.

 

I hope this will help.

Best regards,
Eszter 

Martin

Joined: 23 Sep 2016
Posts: 8

View user's profile

Back to top
Link to postPosted: Tue Feb 21, 2017 9:26 amPost subject: Reply with quote

Thank you for your effort... I'll definitely try this method. 

Martin

Eszter
ChemAxon personnel
Joined: 05 May 2014
Posts: 141

View user's profile

Back to top
Link to postPosted: Wed Feb 22, 2017 9:20 amPost subject: Reply with quote

Hi Martin, 

If you need further help, let us know.

Best regards,
Eszter 

Martin

Joined: 23 Sep 2016
Posts: 8

View user's profile

Back to top
Link to postPosted: Fri Feb 24, 2017 11:07 amPost subject: Reply with quote

Thanks Eszter,

I would use your help one more time, if you don't mind. The webservice you proposed works fine, but the export combines all atoms into an atomArray element, which is different from the classic mrv export, where there's an atomArray element with subelements(atom) for each atom in molecule.

I've tried to find the docs about this webservice, but it seems to be undocumented. I'm sure that there's going to be an option to export atoms individually as atom-elements. Did I miss something?

Thank you Martin

Eszter
ChemAxon personnel
Joined: 05 May 2014
Posts: 141

View user's profile

Back to top
Link to postPosted: Fri Feb 24, 2017 12:41 pmPost subject: Reply with quote

Hi Martin,

In JChem Web Services, the usage of array format for the description of atoms is decided automatically upon the content of the molecule and Marvin JS exports MRV always with it. These MRVs however are exported in slightly different ways, both of these are valid MRV formats, and represent the same structure.

Could you give more details about why you would need the atomArray with atoms in separated atom tags?

That would be a great help. We might find an easy solution for the original problem.

Thank you in advance.

Best regards,
Eszter 

Martin

Joined: 23 Sep 2016
Posts: 8

View user's profile

Back to top
Link to postPosted: Fri Feb 24, 2017 1:00 pmPost subject: Reply with quote

Thank for your quick response. I understand, that both formats are correct.

It just means, that I need to tweak my code a bit to support this new format, but it should not be an issue.

Martin

This topic is locked: you cannot edit posts or make replies.
Page 1 of 1


To watch this topic for replies   Register (enables digests) or give email address  
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum