VMD Remote is a App for Android-powered devices that allows remote control of a VMD session.

Requirements:

Installation:

Running and using the App:

On the VMD desktop/laptop computer:

You can set the current user in control by calling set activeClient like:

  mobile set activeClient "Kindle Fire" "192.168.0.1"
where the name (Kindle Fire) and IP (192.168.0.1) match the nickname and IP given for a specific user via the mobile get clientList command.

Want to automatically be able to connect to your VMD session without needing to remember to go the Extension menu every time? Just add:

  mobile mode move
to your VMD startup script.
On the Android device: On the main screen, the color of the area behind the buttons tells the current connection status:

If you have the VMD server plugin configured to move mode:

If you have the VMD server plugin configured to translate mode:

Android App Menu options:

Button Configuration:

The buttons at the top of the screen can be configured with VMD on the desktop via scripting. There are four default buttons: 0, 1, 2, and 3. Lets say you have created a TCL script, called button1Pressed that you wanted to be called whenever Button 1 (called Aux-1 in the mobile window) is pressed. Typing the following into the console will do this:

proc button1Pressed { } {
  puts "The Aux-1 button was pressed"
}

user add key Aux-1 { button1Pressed }
This script will then be called each time that Button 1 is pressed (and would print the above text to the VMD console). Similarly, you can add a script for Aux-0 or Aux-2, or Aux-3.

A more useful way to use the buttons is to create a button group for your desired activity.

To do this you add desired button commands to the group using 'addButton' and then you push the new buttons out to the mobile device by using 'sendButtonConfiguration'.

# -------------------------------------------------------------------------
proc ::remote::configureRepresentations {} {
   addButton Representations CPK { mol modstyle 0 0 CPK } 1
   addButton Representations VDW { mol modstyle 0 0 VDW } 1
   addButton Representations NewCar { mol modstyle 0 0 NewCartoon } 1
   addButton Representations NewRib { mol modstyle 0 0 NewRibbons } 1
   addButton Representations QuickSurf { mol modstyle 0 0 QuickSurf } 1

}
# -------------------------------------------------------------------------
proc ::remote::configurePlugins {} {

   # No spaces in names! for now

   # view change renderer
   addButton ViewChangeRenderer Prev { ::VCR::goto_prev } 1
   addButton ViewChangeRenderer Prev0.5 { ::VCR::goto_prev 0.5 } 1
   addButton ViewChangeRenderer Next { ::VCR::goto_next } 1
   addButton ViewChangeRenderer Next0.5 { ::VCR::goto_next 0.5 } 1

   # view master
   addButton ViewMaster Prev { ::ViewMaster::do_restore_prev } 1
   addButton ViewMaster Next { ::ViewMaster::do_restore_next } 1
   addButton ViewMaster SaveView { ::ViewMaster::do_save } 1

   sendButtonConfiguration

}
# ----------------------
If you wish to run these procedures to load these button groups you could type the following into the VMD console:
::remote::configureRepresentations
::remote::configurePlugins
Once you have pushed the new button configurations to the mobile device, on the device itself you can go to the menu and choose the button group that you wish to see on the screen.