old jsmol notes

Setting up Jmol

  • Create Workspace
  • From there you should be good to go, however the method of running the program in eclipse provided by the wiki link does not work. If you want to runt he program in eclipse, find the file under the src folder and in the package.

Jmol App Tips and Commands

  • Multiple Structures:

*There are two ways to load in multiple structures.Option 1 is to load in multiple files using the console. Format as shown with the command: load files "filename.pdb" "filename.pdb". Option 2 is to open all of the pdb files you want to use in a text editor and to put all of the text into one of the text editor pdb files. When you open the single pdb file in Jmol, all of the structures will be there

  • Viewing all the structures:

Use the "frame all" command to view all the structures at once. you can view one structure at a time using the "frame #" Be careful though, some structures have multiple conformations.

  • Translating:
  • To translate all structures use the "select all" command and do "translateSelected{# # #}" To select a single structure use the "select */#" command and use the "translateSelected{# # #}" command.The same can be done with rotateSelected.
  • Coordinates:
  • To view coordinate use "write coords" command, also you can use the "write coords "fileName"" command to input the coordinates into a separate text file for later usage.
  • Saving a Frame:
  • To save a single frame of just one structure or all structures, use the command "write frames {#} "anyfilename"" instead of # you can yous * to get all the structures. As of now the structure will be at the saved coordinates when it's re-opened, however it will be re-centered in the universe
  • You can also save a complete file (all structures) by going under the drop down menu by doing File>Export>Write State...

Viewing all commands (in Jmol console) at this link: Viewing Jmol Class Tree:

Jmol Molecule Definition

  • In terms of the total structure, most of these classes seem to define this in the org.jmol.shapebio package.
  • In terms of a single molecule this seems to be defined in the org.jmol.shape package because it has classes pertaining to atoms, balls, axes, sticks, etc.

Further research is required.

Jmol Usage Notes

  • It is possible to load in multiple structures (pdb files) at once in a Jmol app.
  • It's possible to load in those multiple structures from separate pdb files or from a single pdb file that contains all structures (however having separate files per structure is much easier). Use the frame command to examine all the different structures together or separate.
  • It's possible to manipulate coordinates and save those coordinates of individual or multiple structuctures by saving a frame and writing the coordinates. (Look under Jmol App Tips and Commands to know how to do this in the console)
  • When saving the frame and coordinates of a structure, when that frame is opened by itself as a pdb, the structure will be re-centered in the middle of the universe, however do not fret, the structure still has the correct coordinates. When a second structure is loaded into Jmol with the structure that is supposed to have an altered position, both pdb will go to the correct locations in proportion to each other.

Our JMenu/Console

  • A separate GUI would not work because the Jmol application is all in one window.
  • I believe that We've decided to just have the console open upon launch (Which I figured out in Jmol source code under the class: JmolPanel?.java in the line vwr.getProperty("Data_API", "getAppConsole", Boolean.FALSE (or TRUE));
  • I also found that same line the Jsmol code and it can be changed to true as well. It can be found in the coreconsole.js file about mid-way down.
  • the Jmol and JSmol code, from what I've found aren't 1:1 because the console open automatically in my jmol, but not for JSmol.
  • Right now I'm trying to use Java2Script software: to convert Jmol code from eclipse to javascript.
  • could run into problems though cause Java2Script is onlyavaialble for Eclipse 3.5.* and 3.6.* and eclipse is at 3.8.* right now
  • As of now, I've downloaded an older version of eclipse in hopes it will work
  • Update: The Java2Script plugins now work, and with making code into htmls, but not with the jmol code. Not sure why, gives a series of errors when opening the html and in the jmol src files (when using a java2script project, but not a regular java project
  • Next is to figure out how to make the right click menu persistent and open without being right clicked.

Last modified 3 years ago Last modified on Nov 29, 2015, 6:52:20 AM