MarvinSketch selectAtom problem

User d727ff5bc5

22-12-2010 14:16:48

Hi,


I've been trying to use the MSketch.selectAtom command, but without success; I also tried to use the setAtomExtraLabel command, but no luck either. I also didn't manage to use the atomSet together with atomSetColor: either everything is displayed or nothing (however the molecule is there but not visible: I can see it while modifing the molecule). Do I miss something? My intend is to highlight an atom or a group of atoms interactively (either by selecting or by coloring), in a MarvinSketch applet (and not a MarvinView).


What is working is the isAtomSelected command, and deselecting atoms with selectAtom(atom, false).


I'm using Marvin 5.3.7.


Thanks for any help!


Best,
Grégori 

ChemAxon 0a9e2a55e1

23-12-2010 22:48:19

Hi,


We will check this, and answer after Christmas.


Best Regards,


Peter

ChemAxon 7c2d26e5cf

12-01-2011 17:13:56

Dear Gregory,


Sorry for the late answer, holidays and sick leaves are delayed answering of this topic.


We have checked the reported issues.


chemaxon.marvin.applet.JMSketch.selectAtom(int,boolean): Indeed, this is not working perfectly. In some cases, canvas is not updated although selection is commited. In other cases, not the right atom or nothing is selected.


We will debug it.


chemaxon.marvin.applet.JMSketch.setAtomExtraLabel(int,String): This method works fine. The given label is displayed immediately on the proper atom. The label is removed when an empty string is specified for the atom.


atomSet, atomSetColor: These applet parameters are not implemented for the MarvinSketch applet, the documentation does not mention them. Only atomSetColor0, atomSetColor1 parameters are available for MarvinSketch. If you specify atomSetColor0, you can overwrite the default color of atoms/bonds. Although you can specifies colors for other atomsets, there is no sence because there is no way to insert atoms/bonds programaticaly by the MarvinSketch applet.


Originally, atom/bond sets are designed for MarvinView. Later, this feature is partially implemented in MarvinSketch too. In sketcher, generally, the coloring of atoms/bonds are done by user via the formats popup menu at drawing.


Can you describe what you would like to do? Do you want annotate certain atoms? Would you like highlight substructure?