JyMOL Examples

These examples can be run using the “make -f Makefile.demo DEMO_NAME=<demo-name>” command from the JyMOL distribution.

For example, to run the first demo, you can type in:

make -f Makefile.demo DEMO_NAME=align.Align

Note: You will also need to make sure the JAVA_HOME variable is set properly.

Example Description
align.Align loads in proteins, aligns a couple of them together, and prints the outputs of align.
cardbug.CardBug sets up a combobox with two settings that change JyMol's view when changed.
cgo.CGO creates a CGO, sets it with different types of objects, and loads it into JyMOL.
figure.Figure Shows two buttons off to the right that calls ray() and draw(). resulting images are shown in a separate window.
gpcr.GPCR Load a PDB, and show protein in yellow and ligand as sticks
isomesh.Isomesh Load a PDB, an XPLOR map file, and generate an isomesh
isosurface.Isosurface Load a PDB, an XPLOR map file, and generate an isosurface
jardata.JarData reads an input protein directly from a Jar file and loads it into JyMOL.
jymolign.JyMolign Interface with GUI widgets to show how control objects and do simple commands with JyMOL.
measure.Measure Load in example molecule and add/get measurements distances, angles, dihedrals, and change parameters for visual elements.
misc.Misc Load in example molecule and label carbons.
pseudoatom.Pseudoatom Load in a small molecule and add some atoms using pseudoatom in a couple of ways. Also, hooks up a ClickConsumer to show how to capture a click event with picking information.
select.Select Loads a small molecule and selects 3 atoms using selectList().
setting.Setting Goes through different settings and shows the results as the user presses a key.
simple.Simple Loads a simple molecule and shows the surface.
views.Views Shows how to get and change the view calling getView() and setView()