autoexpand groups in mview

User e9b312fb05

02-03-2010 12:36:16

Is there an option to autoexpand groups in mview.


Let's say someone created a MOL with a sulfone inside. My mview applet gives me SO2 as a group, but I want it to draw O=S=O.


I tried with the cleanOpts option but that didn't change anything.


Any ideas are welcome!


Paul

ChemAxon 5433b8e56b

04-03-2010 18:07:33

Hi,


you can use the Xsg import option of MOL format import, in MView applet.


Example in a table layout with more molecules:


mview_param("celli", "|path_to_mol_file_or_inline_mol_file{Xsg}");

or for a single MOL file or inline MOL string:


mview_param("mol", "../../../mols-2d/amphetamine_group.mol{Xsg}");

At the celli parameter the separator char that has to be placed into the param value as the first char is mandatory, i used | that is a good and simple choice but any character can be a separator.


Best regards,
Istvan

User e9b312fb05

13-03-2010 16:04:50

Thanks for the hint!


This almost does the job, e.g. SO2 is expanded to O=S=O. Unfortunately the O's go to the wrong direction (see attached image 1).


I tried to circumvent this issue by using the importConv option c. This, however, produces molecular structures that stretch way too much vertical space. I would need these cleaned up structures to stretch vertically, but can't get it working (see attached image 2).


Any ideas are welcome, Paul

ChemAxon 25dcd765a3

15-03-2010 08:10:48

As far as I understand your original molecules are molfiles.


It seems that the contracted sgroup coordinates are not correct, that is why it looks bad when you expand it. If you clean your molecules before depiction (with importConv option c) the sgroup coordinates are fixed also. So finally what you would like to have the molecules aligned horizontally. The clean function no such option. With API function you can rotate the molecule by 90 degrees to have the desired result.



Andras