Frequently Asked Questions

1. Does JyMol support stereo within browser mode?

Yes! This is now possible if the client's hardware supports stereoscopic rendering. (see jymol_stereo)

2. Can JyMol be embedded into a browser as a plugin?

JyMOL deployment in a browser must be done through the HTML “Applet” tag or JNLP using JavaScript. Java does not offer any other type of plugin for this (see the JyMOL Applet Deployment page).

3. What browsers have been tested for embedding JyMol into a webpage?

We have tested on Internet Explorer, FireFox, Safari, Chrome, and Opera. We do have some issues with Macs (see the JyMOL Applet Deployment page for which browsers can be used on what Operating Systems).

4. Since JyMol is a developer's component, are the API's available to use directly?

Yes. The see the JyMOL 1.1 Online API Documentation (Download).

We give you the JavaDoc API and you use it just like you use any other Java class. You make a new JyMOL instance and use the API against that instance. For example, here's an excerpt of demo code (here we don't extend JyMOL, but we use it as an aggregate in the “Simple” class:

public class Simple extends JFrame {
  // declare jymol as a private  member variable
  private JyMol jymol;
  // constructor
  public Simple(String pdb) {
    // initialize the JyMOL member variable
    jymol = new JyMOL();
    // init the rest of your class and containers
    // use JyMOL -- the API directly mirrors that of PyMOL
    jymol.cmd.load(pdbString, "string", "pdb", "demo");
    jymol.cmd.load(pdb, "string", "pdb", "demo");
    jymol.cmd.hide();
    jymol.cmd.show("sticks");
    jymol.cmd.show("surface");
    jymol.cmd.set("surface_mode","1");
    jymol.cmd.set("surface_color","white");
    jymol.cmd.set("transparency","0.5");
    // ...
  }
}
5. Since JyMol is a developer's component, is it further customizable?

JyMOL is defined as a public class and not “final”. Therefore, you can subclass it as much as you like.

6. Is all PyMol functionality available through JyMol?

Currently, a lot of functionality is available through the JyMol API interface, but not all PyMol functionality is available. If you have a particular feature in mind that you would like to be added to JyMol, write an email to the developers.

7. Are there capabilities built in to support some model building functions? (e.g. Mutating residues and building compounds)

A few–through the API and mouse functions. But, we need improve it and make it more mature. One of our customers has done a great job at deploying JyMOL in a modeling environment. For example, in one simple function, you click on two atoms and click “ring” and using Java/JyMOL a ring is built between the two atoms.

8. Is there a way to save a session for use in a stand-alone application? For example, saving a session that is then readable in PyMol?

JyMOL does not yet support PyMOL sessions. We're working on it. You currently have to save your files individually.

9. I want to color multiple labels different colors, is there a way to do that?

Yes, the label() function is used to label selected atoms with a string, but the set() function can be used to set the label_color for the labels. The 3rd argument of set() is a selection which can be used to set the label color for a particular selection of labels. For example:

jymol.cmd.label( selection1, "Red Label" );
jymol.cmd.set( "label_color", "red", selection1 );
jymol.cmd.lable( selection2, "Blue Label" );
jymol.cmd.set( "label_color", "blue", selection2 );

will set the atom labels of selection1 to Red and the atom labels of selection2 to blue.