Selecting atoms and bonds

ChemAxon 43e6884a7a

24-10-2005 17:12:17

A user asked:





"...What we would like to do in a web-browser is to show a molecule (in black) and give the ability to the user to pick (highlight with read) or de-pick bonds (highlight with green) - see picture attached. When the user is finished, we would need to receive from this utility the list of bonds that were picked or de-picked. (note: the molecule comes as MOL file input)





So my questions are:


Can you guys implement this inside Marvin beens or applet ?


Any other suggestions you have ?"

ChemAxon 43e6884a7a

24-10-2005 17:13:54

1) Atoms can be selected in MarvinSketch using GUI and the API and you can get the selected atoms using JavaScript using the isAtomSelected method: http://www.chemaxon.com/marvin/doc/api/JMSketch.html. The color of selection is green.


2) Atoms can be selected in MarvinView using the API only (http://www.chemaxon.com/marvin/doc/dev/example-view5.html) and you can get the selected atoms using JavaScript using the isAtomSelected method: http://www.chemaxon.com/marvin/doc/api/JMSketch.html, http://www.chemaxon.com/marvin/doc/api/JMView.html


3) Bonds cannot be selected directly, but bonds between selected atoms may be considered selected.


4) Coloring atoms and bonds using the API is already supported in MarvinSketch and MarvinView: http://www.chemaxon.com/marvin/doc/dev/example-view6.html. You can access the colored atoms using the ...AtomSet... and ...BondSet... methods: http://www.chemaxon.com/marvin/doc/api/JMSketch.html, http://www.chemaxon.com/marvin/doc/api/JMView.html


5) Coloring atoms using the MarvinSketch GUI will be supported soon (from Marvin 4.2). This has not been planned for MarvinView.





Is this acceptable for you?





Would MarvinSpace be appropriate for this?

ChemAxon 12eab24e0a

25-10-2005 08:09:09

Comment to no. 5)


In the sketcher you will be able to set colors, font types, font sizes for selected atoms. Colors, bond thicknesses can be set for selected bonds. A new menu item is going to be available from the 'Edit' menu: 'Format...' There you can set any or all of these parameters.

ChemAxon 587f88acea

25-10-2005 16:44:15

Many thanks for the reply. A few more questions:





Once the user sets the color of a bond, how will that be reflected in the


output MOL file ? Can you show an example output ?





If I do not want the user to set anything else only the bond color, can that


be restricted from my application when invoking your been ?





And finally, if I do not want the user to click on the menu and set the bond


color, just to click on the bond and that becomes a set color, let's say red,


would it be possible to invoke your been / applet that way from an


application ? (note: for the particular application in mind we do not want


full sketcher functionality, just picking and coloring bonds)

ChemAxon 7c2d26e5cf

26-10-2005 12:50:30

Quote:
Once the user sets the color of a bond, how will that be reflected in the


output MOL file ? Can you show an example output ?
No, you can not save these infos into MOL file. Save your structure into MRV format to store atom/bond colors.
Quote:
If I do not want the user to set anything else only the bond color, can that


be restricted from my application when invoking your been ?
Marvin does not support font menu restriction. If you want to neglect these font-style/size infos (that the user specified) you should delete -manually- the proper attributes from the exported MRV source.
Quote:
And finally, if I do not want the user to click on the menu and set the bond


color, just to click on the bond and that becomes a set color, let's say red,


would it be possible to invoke your been / applet that way from an


application ? (note: for the particular application in mind we do not want


full sketcher functionality, just picking and coloring bonds)
Actually, you talk about the molecule selection. Now, the selection color is green. But we will consider to customize selection color. Would it be a suitable solution for you?

ChemAxon 7c2d26e5cf

28-10-2005 12:51:08

We have considered your requests.


We plan to add atom/bond selection functionality to MarvinView where the selection color will be customizable. The selection mode in MarvinView will be similar than in MarvinSketch.


Is this solution suitable for you?

ChemAxon 587f88acea

28-10-2005 14:44:19

Quote:
Marvin does not support font menu restriction. If you want to neglect these font-style/size infos (that the user specified) you should delete -manually- the proper attributes from the exported MRV source.
Does Marvin support menu restriction?
Quote:
Actually, you talk about the molecule selection. Now, the selection color is green. But we will consider to customize selection color. Would it be a suitable solution for you?
would this selection be an on/off selection, with all selected bonds coloured by the global color? or is this a multi tier selection where you can select bonds/atoms in different color to mean different things?

ChemAxon 43e6884a7a

30-10-2005 19:37:15

The next Monday and Tuesday are holidays in Hungary. We will respond on Wednesday.

ChemAxon 7c2d26e5cf

02-11-2005 16:44:36

Quote:
Quote:
Marvin does not support font menu restriction. If you want to neglect these font-style/size infos (that the user specified) you should delete -manually- the proper attributes from the exported MRV source.
Does Marvin support menu restriction?
In the current Marvin version, there is no global solution to set the availability of a menu option. But some menu options can be set to be disabled in Marvin (especially in MarvinView). E.g.: you can restrict the opening of the sketcher from MarvinView.
Quote:
Quote:
Actually, you talk about the molecule selection. Now, the selection color is green. But we will consider to customize selection color. Would it be a suitable solution for you?
would this selection be an on/off selection, with all selected bonds coloured by the global color? or is this a multi tier selection where you can select bonds/atoms in different color to mean different things?
It's a single selection. All selected bonds/atoms are colored with the same color. This global color will be customizable.