VMD Remote is a App for Android-powered devices that allows remote
control of a VMD session.
More and then click on Device. From the Device menu,
make sure that the option to Allow Installation of Applications is
ON. On other devices, on the home screen, go to Settings |
Applications and make sure that "Unknown sources" is checked/enabled to
allow the installation of non-Market applications.
On the VMD desktop/laptop computer:
Alternatively, there is a text command, mobile, that you use to mobile-enable VMD.
If you just type 'mobile' into the console you will be presented
with usage instructions:
vmd > mobile mobile usage: mobile mode <mode> modes: off, move, animate, tracker, user mobile port <incoming network port number> mobile get <mode/port/clientList> mobile set activeClient NickName IPMode descriptions:
By default, VMD will listen on port 3141. If you need to change this, you can do so.
get can be used to retrieve, for use in a script, the currently set mode,
port, and list of clients that are connected.
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 moveto your VMD startup script.
Menu | Settings and set Nickname to a
descriptive 16 character (or less) name for your device. The Nickname will show
up in the VMD mobile plugin window.
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:
Once you have the image on the mobile screen you can pinch to zoom and drag the viewport around. Remember that this is just a static image. No rotating! You can, however, choose to share the image. By pressing the 'share' button you can use any app on your mobile device that supports JPEG images. This will typically include, at a minimum, your email program and any social media sites that you might have an app for.
=') key from within VMD. If you somehow manage to 'lose' the
molecule, this is handy.
You can turn on additional debugging statements that will show on the second line of the main display, and you choose whether or not you wish to see the VMD remote message in the background of the touchpad area.
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::configurePluginsOnce 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.