olenz / vtfplugin

The VTF Plugin is a plugin for the VMD software that reads the VTF format.
http://www.ks.uiuc.edu/Research/vmd/plugins/molfile/vtfplugin.html
The Unlicense
7 stars 4 forks source link

Compilation #3

Open edvinmemet opened 7 years ago

edvinmemet commented 7 years ago

I'm trying to use this plugin to visualize particles with variable radius, but I'm encountering some trouble setting it up. I'm pasting the instructions you provided in the vmd mailing list at some point:

You have to compile the vtfplugin and load it into VMD. The usage is not exactly simple, but it gives you quite some power once you have understood it. The idea is as follows:

  1. The VTF format is extensible, i.e. a user can put arbitrary user data into the file without breaking the format. In particular, you can add arbitrary data after the coordinates, which I call "user data". In your case this would be the radius, others would be the dipole moment, or any other data that a user can think of.
  2. The VTF reader plugin reads all data that VMD can use directly from the file.
  3. Furthermore, the Tcl-plugin "vtftools" provides a function that can be used to load all user data from the file into Tcl variables.
  4. Once this is done, you can use Tcl scripting and traces to visualize the user data, e.g. you can set up a trace that updates the radii of all atoms when you change the frame. You can find my example for atoms with arbitrary radii in the files samples/userdata/radius.* in the above repository. To run it, execute vmd -e radius.vmd

I downloaded the plugin and ran make but encountered an error:

$ make
gcc -Wall -fPIC -pedantic -D _USE_TCL -D_USE_ZLIB -g -O0 -DDEBUG -I/usr/local/lib/vmd/plugins/include  -c -o vtfplugin.o vtfplugin.c
vtfplugin.c:30:17: fatal error: tcl.h: No such file or directory
olenz commented 6 years ago

I see this message only now. To be able to compile it, you will need to have Tcl (including its development files) and VMD installed. Then you have to adapt the Makefile to where these tools are installed. Have a look for the file "tcl.h" and "vmplugin.h". Both of them have to be in the CPPFLAGS.