The Pymol Viewer

In Jalview 2.11.2, support was added for viewing structures opened via the "View Structure Data.." dialog with Pymol (https://pymol.org/2/). Like with Chimera and ChimeraX, Pymol views can be saved and restored from Jalview Project files on any machine with it installed, and structures can be coloured and superimposed according to the alignment.

Configuring Jalview to use Pymol
You can configure Pymol as your preferred structure viewer in Preferences. Jalview will look for an existing installation, and will ask you to specify the installation's path if it cannot be found. You can also optionally specify the path to the Pymol program here if you want Jalview to use a specific installation.

Jalview requires Pymol V 2.5.0 (community edition) or later
Jalview requires Pymol's RPC interface, which is not available in older versions of the Pymol community edition.

Known Limitations

- Pymol does not support some forms of legacy structural data (e.g. the 1A70 C-alpha only PDB file included in the Jalview example project).
- Pymol to Jalview communication does not support transfer of properties or highlighting sequence regions corresponding to structure selections or mouse-overs in Pymol.

Basic screen operations (see Pymol Wiki at https://pymol.org/dokuwiki/doku.php?id=mouse for full details).

Action | Windows | Unix | Mac/OSX
Rotate View | Left Click and Drag | Left Click and Drag | Left Click and Drag
Zoom | Right Click drag mouse up or down | Right Click drag mouse up or down | cmd or Right + Click and drag mouse up or down, or use mouse scroll button
Move Origin | Middle Button + Drag | Middle Button and drag | alt + Click and drag
Select Residues | Ctrl + Click (and drag to select a region) | Ctrl + Click (and drag) | Ctrl + Click (and drag)

Jalview Controls

The Jalview Pymol View window has up to five menus:

- File
  - View Mapping
    Opens a text window showing the alignment between the residues corresponding to alpha-carbon atoms in the PDB structure and the residues in the associated sequence.
- View
  - Show Chains
    Select which of the PDB file's chains (if more than one) are to be displayed.
  - Colour by ..
    Submenu allowing specific alignment views to be selected for colouring associated chains in the structure display. This menu contains all the alignment views associated with the structure view, with those used to colour the view indicated by ticks. Addditionally, it contains the following menu entries:
    - Select many views
      When this option is enabled, selecting an alignment view adds it to the set used to colour the structures. Use this when colouring structures related to a number of alignments involving different domains or chains which are shown in the same structure view.
    - Select all views
      This is only enabled when Select many views is also enabled, and will add all associated views to the set used to colour the structure display.
    - Invert selection
      This is only enabled when Select many views is also enabled, and will replace the current set of views with any remaining views not currently used to colour the structure display.
- Colours
  - By Sequence
    Colours each residue in the structure with the colour of its corresponding residue in the associated sequence as rendered in the associated alignment views, including any UniProt sequence features or region colourings.
    Pick which of the associated alignment views are used to colour the structures using the View→Colour by .. sub menu.
    Residues which only exist in the PDB structure are coloured white if they are insertions (relative to the associated sequence in the alignment) and grey if they are N or C terminal flanks outside the region mapped to the alignment window's sequence.
  - By Chain
    Uses Pymol's 'spectrum(chain)' command to apply a different colour to each chain.
  - Charge & Cysteine
    Highlights cysteines in yellow, anionic (Aspartic Acid or Glutamic Acid) residues in red, and cationic (Lysine or Arginine) residues in blue.
  - Colour with Pymol
    Defers any colouring operations to Pymol. Select this if you want to use the Pymol scripting interface or menu to modify the view directly.
  - Standard and User Defined Jalview colourschemes.
    The remaining entries apply the colourschemes available from the standard and user defined amino acid colours.
- Pymol
  This pulldown menu provides access to Pymol's capabilities from Jalview.
  - Align
    When selected, the associated alignment will be used to superimpose all the structures in the view onto the first structure in the alignment via the pair_fit command. The regions used to calculate the superposition will be highlighted using the 'Cartoon' rendering style, and the remaining data shown as a chain trace. RMSD values are output in the Pymol log.
  - Write Jalview features
    Selecting this option will create new atom properties for any features currently visible in the associated alignment views. This allows those atoms to be selected and analysed in Pymol directly.
    - Feature transfer in Pymol is experimental.
    - To select by a particular feature use the string matching syntax:
      select foo,p.jv_helix in helix
    - To view transferred properties use Pymol's Properties Inspector
    - For more information see Property based selection in Pymol's Documentation.
- Help
  - Pymol Help
    Access the Pymol Help documentation in a new browser window. window.

Troubleshooting

Jalview will try to automatically configure itself according to the configured Pymol installation (or the first one it discovers in the standard installation locations). You can see which Pymol executable is being used by enabling DEBUG output in Jalview's Java console.
If Jalview raises warning messages about Pymol not being located or executed, or no structures appear when Jalview launches Pymol, please ask for help on Jalview's discussion forum.

Pymol and Windows Firewall

Jalview and Pymol communicate using the Pymol's XML-RPC over HTTP interface (https://pymolwiki.org/index.php/RPC).
Technically this requires both Pymol and Jalview to open ports on the local network, and this may be blocked by Windows Firewall with a warning message such as
"Windows Firewall has blocked some features of this program" (where the program may be java.exe or javaw.exe).
To allow Jalview and Pymol to interact, you may need to add permission for the program to communicate over the network. This can be done from the warning dialogue, or in Control Panel, Firewall settings.