controlling the visibility of individual ligands

User 35f81bd810

03-10-2007 13:28:20

MarvinSpace (IE 6.0)





How do you control the visibility of individual small molecules within the MarvinSpace applet? After loading the file, I can make them all visible or invisible using a javascript function like





function hideMol()


{


document.MSpaceApplet.setProperty("Ligand.Visible" , "false" );


}





but I want to be able to cherry-pick which molecules are visible. I've been blindly trying things like





function hideMol()


{


document.MSpaceApplet.setProperty("Ligand[1].Visible" , "false" );


document.MSpaceApplet.setProperty("Ligand(1).Visible" , "false" );


}





without success. I also couldn't figure out how to translate the log file commands for doing this from the MarvinSpace application to the applet.





If it is to be done, it has to be within the framework of html/javascript as it has to be coordinated with other types of views and data presentations on the same page, and I don't have the luxury of redesigning the service.





Thanks.

ChemAxon efa1591b5a

03-10-2007 14:57:06

Hi John,





Judit, the developer of MSpace will respond to your particular questions soon.





In the meantime let me make some remarks. Even if it is possible to access individual ligands in the the applet (to hide/show them, that Judit will explain), this may not be a feasible solution for you as loading some 1000 structures would take a while in mspace.


This is because all internal objects in mspace are created in a synchronuous manner which means that a large number of objects are built even when onlz one structure is loaded. This time overhead may be negligible when one molecule is loaded and displayed, but it adds up to a significant amount of time when >1000 mols are imported.


Also the downside of this approach is its significant memory consumption.





I suggest to consider another sw architecture in which you take care of your molecules and your application controls the picking mechanism too. Your framework just passes one structure (or a small set of selected ones) to mspace. You can integrate the draw canvas of mspace in a panel that has a component similar to the selection panel but is more suitable for the particular task. What do you think about this solution? I understand that it requires some custom development but I reckon all components needed are readily available.





Another remark is that we do not intend to enable mspace to deal with couple of 1000s structures in the future, instead, we plan to integrate mspace in Instant Jchem which has strong ability to deal with large number of structures (database and file connectors, smart caching mechanism, grid view of molecules and related properties etc.). You may wish to follow this link http://www.chemaxon.com/product/ijc.html to find out more about IJC.





Finally, if you insist on deploying mspace the way you described in your post, ie. to support efficient handling and showing/hiding of >1000 structures, you can convince us to develop it for you. :-)





Regards,


Miklos

ChemAxon 909aee4527

05-10-2007 17:46:27

Dear John,





an example of controlling the structure visibility with log processing is available here: http://www.chemaxon.com/marvin/examples/applets/example-mspace11.html





In the example the structures are stored in the same input file, but of course they can be handled similarly in case of multiple input files.





We can make this process easier by adding extra applet parameters by the next release.





Kind regards,


Judit

User 35f81bd810

05-10-2007 17:59:12

Both suggestions are helpful.





Thanks.