Immersive Visualization / IQ-Station Wiki

This site hosts information on virtual reality systems that are geared toward scientific visualization, and as such often toward VR on Linux-based systems. Thus, pages here cover various software (and sometimes hardware) technologies that enable virtual reality operation on Linux.

The original IQ-station effort was to create low-cost (for the time) VR systems making use of 3DTV displays to produce CAVE/Fishtank-style VR displays. That effort pre-dated the rise of the consumer HMD VR systems, however, the realm of midrange-cost large-fishtank systems is still important, and has transitioned from 3DTV-based systems to short-throw projectors.

Difference between revisions of "VMD"

From IQ-Station Wiki
Jump to navigation Jump to search
m (Preparations for a section on HPC usage.)
(Beginning the HPC system instructions)
Line 130: Line 130:
This section describes specific usage and compiling issues related the VMD
This section describes specific usage and compiling issues related the VMD
on HPC systems such as the Indiana University [http://kb.iu.edu/data/bcqt.html BigRedII supercomputer].
on HPC systems such as the Indiana University [http://kb.iu.edu/data/bcqt.html BigRedII supercomputer].
==Interactive Running VMD on BigRedII==
Presently, the VMD installed on BigRedII can be used interactively via the TCL command language.
Once running in an interactive shell, a molecule can be loaded and rendered with this simple
commands:
#Load the <CODE>vmd</CODE> module:
#:<CODE>% module load vmd</CODE>
#Start VMD:
#:<CODE>% vmd</CODE>
#Load an example molecule:
#:<CODE>vmd &gt; mol new &lt;path&gt;/brH.pdb</CODE>
#Render the current "view" to an image file:
#:<CODE>vmd &gt; render TachyonInternal &lt;filename&Ggt;.ppm</CODE>
#Quit VMD
#:<CODE>vmd &gt; quit</CODE>
==Batch VMD on BigRedII==

Revision as of 16:19, 7 April 2014

Visual Molecular Dynamics (VMD)

VMD is a good visualization tool for visualizing large molecular systems (typically used for large biomolecular systems). VMD has a long history of being interfaced to immersive technologies, including haptic devices and CAVE VR displays. There is also a section on the usage of VMD for HPC systems.

Immersive Mode VMD

Information specific to the usage and setup of VMD for immserive systems such as the CAVE virtual reality display.

How to Run VMD in Immersive Mode

If VMD with the FreeVR interface is installed and properly configured, follow these steps to run in immersive mode:

  1. % vmd -dispdev freevrforms ../proteins/brH.pdb
  2. In order to grab and move an object, the grab tool must be initialized:
    1. GraphicsTools
    2. Create a grab style tool
    3. set Position to FreeVRTracker
    4. set Buttons to FreeVRButtons
    The wand avatar will now appear in the scene
  3. Now touch an object with the wand avatar and press Button-1 to move it.


How to Build VMD w/ Immersive features

This section specifically instructs on how to compile VMD using the FreeVR immersive interface library.

  1. Install missing dependencies
    Commonly needed packages include:
    • tcl-devel (8.x -- perhaps 8.4 or greater)
    • tk-devel (8.x -- perhaps 8.4 or greater)
    • fltk-devel
    • netcdf-devel
  2. Download the latest source (version 1.9.1 as of this writing [04/09/12])
    http://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=VMD
    NOTE: there is a (free) registration process required
    NOTE: the pre-built packages may not contain the Immersive features
  3. Untar the source ball
    E.g. % tar -zxf vmd-1.9.1.src.tar.gz
  4. Compile the plugins
    % cd plugins
    % make <architecture> — E.g. LINUXAMD64
    % export PLUGINDIR=`pwd`/../vmd-<version>/plugins
    % make distrib
  5. Configure VMD
    % cd ../vmd-<version>
    % $EDITOR configure.options
    Enter a list of desired options -- make sure to include FREEVR
    A sample list is:
    • LINUXAMD64 OPENGL FREEVR FLTK TK TCL PTHREADS
    % ./configure
  6. Compile VMD
    % export PLUGINDIR=`pwd`/plugins — only if you're in a different shell from where this happened in step 4
    % cd src
    % $EDITOR Makefile
    NOTE: you will need to edit the values for INCDIRS and LIBDIRS to point to the correct directory for the FreeVR includes and library.
    * make veryclean
    % make -j 8
    NOTE: you will get several compiler warnings. As long as they are only warnings, you should be fine.
  7. Install VMD
    % sudo make install

At this point you can now run VMD in standard desktop mode.

  • For example:
    % vmd ../proteins/brH.pdb


How to Configure VMD for Immersive displays

There are two stages of configuration required for the overall configuration of VMD for immersive displays. The first step is to configure FreeVR for the specific hardware setup of the immersive facility. This is explained in the FreeVR documentation. The second stage is to link the FreeVR inputs to VMD "sensors devices".

VMD "sensor devices" are specified in the .vmdsensors file. The format of this file is described in the VMD User's Guide: Tool Window documentation.

  • Create a .vmdsensors file:
    Here is a sample .vmdsensors file for use with FreeVR:
###     
### Configuration for the FreeVR trackers
###     
device freevrtracker freevrtracker://local/freevr
scale 0.5
offset 0.9 -4.0 -1.0
device freevrbuttons freevrbuttons://local/freevr:0,1,2,3
## if you have more than one wand..
#device vrtracker2 freevrtracker://local/freevr:1
#scale 1.0
#offset 0.9 -4.0 -1.0

General Usage

Usage Tidbits

  • To change the overall world transformation via the Tcl command shell, try these options:
    • scale to .5
    • translate to 0 0 -3
  • To place the FLTK menu interface on a screen separate from the immersive displays, use the DISPLAY environment variable.


Usage Issues

[NOTE: these issues are from tests with VMD version 1.9.2a15.]

  • I still need to figure out the proper scale and offset (this would/will be easier if we can avoid the use of Euler angles in P_GrabTool.C).
  • The grab tool only grabs one molecule object at a time, so multiple molecules won't stay together.
  • The grab tool requires that the wand avatar be touching an object before it can be moved.
  • The rotate tool does not work
  • I don't know how to use the joystick tool — does it work with the VR interfaces?
  • I need to learn whether (and if so what) the command-line and/or tcl-shell options for setting up the graphics tools w/o the need for the interactive menu.
  • There are gimble lock issues when the wand points up or down.
  • The material colors of some/all of the objects in the scene are not always present.
  • Changes in representations seem to only have an effect on a single screen.


Development Issues

This section is for issues that are of interest to those working directly on the VMD code-base as it relates to immersive interfaces.

  • DONE: Need to figure out how to pass RenderInfo * argument to FreeVRScene::draw() in order to add the navigation controls to where the virtual world is rendered.
  • Need to go over the source code in P_GrabTool.C so that I can know how to improve it (and I'll add comments as we go.) My goal is to avoid the use of Euler angles, since there are gimble lock issues in the interface.
  • Consider adding a grab-world tool that allows the entire world to be grabbed with the wand. An alternative was done — an always active "Grab-World" operation.
  • Determine whether there is a mechanism to enable an X11 window always-on-top property for the FLTK control menu.

HPC Usage of VMD

This section describes specific usage and compiling issues related the VMD on HPC systems such as the Indiana University BigRedII supercomputer.

Interactive Running VMD on BigRedII

Presently, the VMD installed on BigRedII can be used interactively via the TCL command language. Once running in an interactive shell, a molecule can be loaded and rendered with this simple commands:

  1. Load the vmd module:
    % module load vmd
  2. Start VMD:
    % vmd
  3. Load an example molecule:
    vmd > mol new <path>/brH.pdb
  4. Render the current "view" to an image file:
    vmd > render TachyonInternal <filename&Ggt;.ppm
  5. Quit VMD
    vmd > quit

Batch VMD on BigRedII