export options

User 870ab5b546

25-10-2014 03:05:27

With the following line:


marvinSketcherInstance.exportStructure('mrv:PS').then(function(source) {

I get this error message:


Molecule export failed:Class$S23: format cannot be null

Shouldn't the export options work? If use just 'mrv' for the export format, then the selections don't appear in the MRV, e.g.,


<cml><MDocument><MChemicalStruct><molecule molID="m1"><atomArray><atom id="a1" elementType="C" x2="-5.658240000000001" y2="-0.11666666666666668"/><atom id="a2" elementType="C" x2="-4.324693333333334" y2="0.6533333333333334"/><atom id="a3" elementType="C" x2="-2.9909600000000007" y2="1.4233333333333333"/><atom id="a4" elementType="C" x2="-1.6572266666666668" y2="0.6533333333333334"/><atom id="a5" elementType="O" x2="-2.9909600000000007" y2="2.9633333333333334"/></atomArray><bondArray><bond atomRefs2="a1 a2" order="3"/><bond atomRefs2="a2 a3" order="1"/><bond atomRefs2="a3 a5" order="2"/><bond atomRefs2="a3 a4" order="1"/></bondArray></molecule></MChemicalStruct></MDocument></cml>

ChemAxon 996dedebe0

25-10-2014 07:23:07

Dear Bob,


Currently there is no way to use these options. Selection can be set through setSelection(selection) function, and you can get it via getSelection(). To see how important thses options are for you, please tell us:


- In the last 6 month how many times can you remember that you needed this feature?


- You need the selection export option or any other options aswell?


- Can you provide us a list about the needed export options tagged with their priorities and their usage count in the past 6 months , please?


Awaiting for your answer. All the best,


 


Janos

User 870ab5b546

25-10-2014 14:44:59

Hi Janos,


We use the selection function often. We use it to highlight atoms that have an incorrect valence and electron-flow arrows that may be drawn incorrectly. I can't give you usage numbers, but students make both of these errors frequently.


The server decides what needs to be selected, and we transmit the selections to the client. The most recent versions of MarvinSketch made this procedure incredibly easy by storing the selections as part of the MRV; previously, we used a molecule property to store the selections. If Marvin4JS can't read the selections directly out of the MRV, then we could go back to the old code, but I was hoping to avoid that. 


We use the reverse procedure, sending selections from the client to the server, less often, but we do still use it sometimes, for questions like, "Select the most acidic atom in the molecule." Here, our old code wouldn't be a suitable workaround, because we used to use JavaScript to set the selections as a molecule property before sending the drawing back to the server, and I don't think Marvin4JS allows you to set molecule properties at this time, does it? So we would have to do some reprogramming. I was hoping to have code that would work equally well with MarvinSketch or Marvin4JS.


I don't care much about the P option. It makes debugging easier, but it's not urgent.


Even if you don't use the output options, you should at least just ignore them, not throw an error!


-- Bob

ChemAxon 996dedebe0

25-10-2014 16:07:46

Hi Bob,


Ok, i will talk about it with my team, until then please consider all the options as not supported until our documentation says otherwise. Thank you for your feedback.