On 07/22/2014 01:51 PM, bjoern wrote:
> Hey,
>
> I put it on our server.
> http://bioinformatics.charite.de/jsmol_test/comparison.php
>
I don't think that there is any need for the AJAX stuff.
The only things you need to do is load the new files and activate a 
specific view. You don't need to rebuild the buttons and checkboxes.

I guess the 'First_mol' and 'Second_mol' checkboxes are supposed to 
switch on or off the first and second molecule individually. And if both 
checkboxes are checked both molecules should be shown at the same time.
Currently this isn't possible because "frame 1" and "frame 2" within 
your 'script1' will prevent that the other molecule is displayed.
The "select not protein;" in your 'script2' doesn't make any sense for me.
And you shouldn't load the file again within 'script1'. Loading the 
files should be done after selecting a pair in the dropdown menu.
The buttons and checkboxes should just control the view. This way they 
will be completely independent of which pair of molecules is loaded. And 
you don't need to rebuild them for each new molecule combination.

I don't understand why there is a 'for' loop around the 'jmolCheckbox' 
calls.

I would suggest the following:

1) To be able to display both molecules at the same time you should add 
a "frame all;" at the end of the script Angel proposed for loading the 
files. (This way both molecules will be shown initially. If you wouldn't 
want that you should either add "display 1.1" or "display "2.1" to 
display only the first or only the second molecule.)

2) For the checkboxes try this:
jmolCheckbox("display displayed and 1.1; zoom 100;", "display displayed 
and not 1.1;", "First_mol: ", true);
jmolCheckbox("display displayed and 2.1; zoom 100;", "display displayed 
and not 2.1;", "Second_mol: ", true);

I guess what is still missing in the current version is the name/number 
of the molecules loaded. You could add them in a 'span' tag with id and 
then exchange the names after loading new molecules:

a) to build the interface
jmolCheckbox(...); jmolHtml('<span id="firstMolName">10017099</span>');
jmolCheckbox(...); jmolHtml('<span id="secondMolName">11231829</span>');

b) to change after loading new molecules
var newFirstMolName = "nnn";
var newSecondMolName = "mmm";
document.getElementById("firstMolName").innerHTML = newFirstMolName;
document.getElementById("secondMolName").innerHTML = newSecondMolName;

Regards,
Rolf

-- 

Rolf Huehne
Postdoc

Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany

Phone:   +49 3641 65 6205
Fax:     +49 3641 65 6210
E-Mail:  rhue...@fli-leibniz.de
Website: http://www.fli-leibniz.de

           Scientific Director: Prof. Dr. K. Lenhard Rudolph
        Head of Administration: Dr. Daniele Barthel
Chairman of Board of Trustees: Dennys Klein

VAT No: DE 153 925 464
Register of Associations: No. 230296, Amtsgericht Jena
Tax Number: 162/141/08228


------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to