张增明( Zengming Zhang ) wrote: > Hi, dear jmol-users: > > I am new to Jmol, and I have a question about Jmol applet. > > In my applications, I will show more than one molecular structures in one > Applet Viewer on my web page. > I will create a web server for protein binding site prediction, and > binding site data will be written into a *.pdb file, so if I want to see the > binding site on the protein surface, I have to display both the pdb file of > binding site and the pdb file of protein structure in one applet viewer on my > webpage, just like Pymol, which can display many molecular structures in its > viewer panel. > > Is Jmol can do this? I also have some try, just see the below: > > I know how to load one molecular structure, just using the script below: > > jmolApplet(500, "load 1DWD.pdb;"); > > But when I want to display the structure of 1CRN.pdb with 1DWD.pdb in one > applet viewer, I never got success. I tried many scripts like: > > jmolApplet(500, "load 1DWD.pdb,1DWD.pdb ;"); or jmolApplet(500, "load > 1DWD.pdb;1DWD.pdb ;"); or the two lines of scripts below: > > jmolApplet(500, "load 1dwd.pdb;"); > jmolApplet(500, "load 1CRN.pdb;"); > > But they didn't work, didn't make any sensce. > > Can you help me? Thank you very much !!! >
Yes, Jmol can load several structures in one viewer. You need to add the keyword "APPEND" to the load command of the additional structures. This is described in the interactive scripting documentation at http://chemapps.stolaf.edu/jmol/docs/#loadappend There are two different ways of appending additional structures: 1) The default is to load the additional structure independantly into a new frame. After loading two structures with the commands below only the second structure is visible initially. load 1dwd.pdb load append 1CRN.pdb You can display all loaded structures by adding the command "frame all". The frames for the different files are numbered sequentially and each structure can be adressed by this number. So "frame 1" will display only '1dwd' and "frame 2" will display only '1crn'. If a structure contains several models (like '1JM7') the model number can be appended to the frame number. So model 1 of file 2 would be addressed by "frame 2.1"; By using the "frame" command you can only switch between displaying a single frame (or a single model of a single frame) and all frames. But there exist two other commands that can display any combination of frames and models: display (http://chemapps.stolaf.edu/jmol/docs/#display) hide (http://chemapps.stolaf.edu/jmol/docs/#hide) So "display 1.2,2.3" will display model 2 of frame/file 1 and model 3 of frame/file 2. It will also automatically hide all other models of all other frames. The 'hide' command works oppositely. So "hide 1.2,2.3" will hide model 2 of frame/file 1 and model 3 of frame/file 2. And it will automatically display all other models of all other frames. To prevent that the others are displayed automatically add 'hidden' to the frame.model list ("hide 1.2,2.3,hidden"). For 'display' add 'displayed' to prevent that models that are currently displayed are hidden ("display 1.2,2.3,displayed"). But be aware that the 'display/hide' settings are completely independant from the 'frame' settings. Although the final result is affected by both settings. So if you first provide "frame 2" and then "display 1" nothing will be displayed at all. The 'frame' command determines what is displayable by the 'display/hide' command. So it would be necessary to add a "frame 1" or a "frame all" command to display frame 1 in this case. To avoid confusion it might be better to avoid a mixed usage of 'frame' and 'display/hide'. 2) The second way doesn't create a new frame for the additional structure. It is integrated into the existing frame instead. But this will presumably work only properly if there are no collisions in the residue and chain numbering. (I never tried this, but I would expect that it would at least be problematic.) The integration is only done if the appended file contains only a single model. Then it is appended to the currently displayed model. (I don't know what happens if several models are currently displayed.) To activate this mode provide the command "set appendNew false" before providing the "load APPEND..." command. The default behaviour can be restored by providing the command "set appendNew true". By the way, Bob, in the example of 'load APPEND' in the documentation there is missing a 'frame all;' command before the 'display 1.1,2.1' command. Regards, Rolf ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

