next up previous contents index
Next: Display Form Up: Labels Form Previous: Modifying or deleting a

Plotting a label's value

       

If the label has a numeric value (such as a bond length geometry monitor), it is easy to graph the change of the value over time (for multiple frames in an animation). The Graph button creates a temporary file for use by a graphing program, then optionally starts such a program to display the data. Each line of the file contains the frame number (starting at zero and expressed as a floating point number) followed by the value of the label for that frame.

Once the file is created, the text in Graph Command is executed to plot the data. By default, the text is xmgr %s, where the %s is automatically replaced with the appropriate temporary file name. When the graphing program finishes, the temporary file is deleted.

The default setup causes VMD to freeze until the graphing program finishes. It is possible to get around this by including an & at the end of the graph command, as in:

        xmgr %s &
This may sometimes cause a problem because VMD might delete the file before the program finishes reading it. If this is a problem, try:
        csh -c "xmgr %s &; sleep 4"
to cause VMD to wait a few seconds before deleting the file. You may have to increase the delay depending on the file size and type of program used. You may also try variations on the theme; for instance
        csh -c "xterm -e vi %s ; sleep 4"
will bring up a vi window with the data file.



Justin Gullingsrud
Tue Apr 6 09:22:39 CDT 1999