next up previous contents index
Next: Molecular Drawing Methods Up: Description of each VMD Previous: Tracker Form   Contents   Index


Sim Form

Interactive Molecular Dynamics

VMD has the capability to work with a molecular dynamics program running on another computer, in order to display the results of a simulation as they are calculated; we refer to this capability as Interactive Molecular Dynamics (IMD). As new atomic coordinates are generated by the simulation process, they can be transferred directly over the network to VMD, which can then animate the molecule. A major feature in VMD is the ability to add perturbative steering forces to a running simulation, which are incorporated directly into the dynamics calculation.

In order for VMD to work in this fashion as a graphical front end and control console for a remote molecular dynamics simulation, it is necessary to have a version of a molecular dynamics program configured for IMD communication. The program NAMD, developed the the University of Illinois Theoretical Biophysics Group, will support IMD beginning with release 2.1. See the NAMD WWW home page for information on obtaining a copy of NAMD. NAMD is a parallel molecular dynamics program written in C++, which implements the CHARMM energy function. It is compatible with X-PLOR style PSF files, but can use either X-PLOR or CHARMM parameter files. The rest of the discussion in this chapter assumes you are using NAMD.

IMD works by establishing a TCP connection between VMD and NAMD. NAMD, or whichever molecular dynamics program is being used, acts as the server. In order to prepare NAMD to accept VMD's connection request, NAMD must be instructed at the time the program starts to listen for incoming connections on a particular port. Once NAMD has started up, it will wait for the user to connect through VMD through that port. VMD and NAMD perform a handshake sequence to determine things such as the relative endianness of the machines, then the simulation commences.

Before connecting to the remote simulation, the VMD user must first load a molecule corresponding to the system being simulated. This can be done within the Load Files form by selecting "IMD" as the molecule type, then choosing a psf and pdb file for loading. It is not necessary that the coordinates in the pdb file bear any relation to the simulation coordinates, since they will immediately be replaced when VMD starts receiving coordinates from NAMD. However, the psf file should be the same file used in the NAMD configuration file. The pdb and psf files can also be loaded at the command line in the VMD console, using the command "mol load imd <psffile> pdb <pdbfile>". Note that a molecule must be loaded in one of these two ways for a connection to be established.

Once the molecule is loaded and NAMD has been started and is listening for a connection, the user is ready to connect to the simulation and start receiving coordinates. To establish a connection, open the Sim form, enter the hostname on which NAMD is running and the port on which NAMD is listening for incoming connections, then press the Connect button to establish the connection. If NAMD is running on several distributed nodes, VMD must connect to the root node on which NAMD initially started out.

Using the Sim form

The Sim form allows you to control the behavior of a molecular dynamics simulations which has been previously connected to through use of the Remote form. This form contains controls to change parameters for the simulation and to affect how VMD displays the results of the simulation. The form also contains informative displays, which show the current status of the simulation connection, and such things as the current energy, temperature, and timestep of the molecular system being simulated.

At the top of the form are two entry fields and a button for establishing a connection to a running MD simulation. Enter both the hostname on which the simulation is running, and the port on which the simulation is listening, then press the Connect button to establish the connection. See the text console for possible error messages and status updates.

Below the connection display is a browser used to set some connection parameters. These include:

To change a parameter, select the line with the relevant parameter, and in the text entry area that appears enter the new value and press <return>. After you enter a new value, a command will be sent to the remote simulation to change it, and there may be some delay between when the simulation gets the command, acts on it, and the results propagate back to VMD.

In the central portion of the form is shown a status message for the chosen connection. A large browser near the bottom of the Sim form displays the different energy values for the system being simulated (kinetic, electrostatic, etc.), as well as the current timestep and the temperature. It is automatically updated each time a new atomic coordinate set (timestep) is received and stored in the VMD animation loop.

At the bottom of the Sim form are two buttons:

next up previous contents index
Next: Molecular Drawing Methods Up: Description of each VMD Previous: Tracker Form   Contents   Index