Skip to content

Instantly share code, notes, and snippets.

@tonigi
Last active March 8, 2024 08:10
Show Gist options
  • Save tonigi/a9cfaf7642a7fbc13293 to your computer and use it in GitHub Desktop.
Save tonigi/a9cfaf7642a7fbc13293 to your computer and use it in GitHub Desktop.
Install a VMD plugin

Installation of VMD plugins

These are common instructions for my VMD plugins.

Before you begin. Download the latest release and extract it in a directory of your choice.

Quick-and-dirty, no-installation method

If the package has a load.tcl file, just source load.tcl it in VMD console.

Method 1: use VMD's preference manager (VMD 1.9.2 and higher)

If you are using VMD 1.9.2's new preference manager, .vmdrc can not be edited by hand. Please refer to the following figure, adjusting the plugin name, location and script.

    lappend auto_path /WHERE/YOU/EXTRACTED/THE/TOOL

Note: this method is not suitable to replace plugins distributed with VMD by newer versions. Also, some plugins may require a second line like package require plugin_name_gui to register them in VMD's menus.

fig

Alternatively, if the plugin has a load.tcl file, use the line

source /WHERE/YOU/EXTRACTED/THE/TOOL/load.tcl

Method 2: set the TCLLIBPATH environment variable

This is suitable e.g. if you use modulefiles. Note that, unlike other Unix paths, multiple path components should be space-separated.

    export TCLLIBPATH="/PATH/TO/EXTRACTED/VMD_PLUMED $TCLLIBPATH"

VMD before 1.9.2: edit VMD's startup file

You may download and extract the plugin in any directory. Then add the following lines to your .vmdrc startup file. Note that name and location differ under Windows !

    lappend auto_path /PATH/TO/EXTRACTED/PLUGIN
    menu main on
@flashshreyas
Copy link

Hi,

I tested Method 1 on Windows10. This may be an example for the path:

lappend auto_path C:/PATH/TO/EXTRACTED/PLUGIN
menu main on

It worked using '/' instead of backslash
Hopefully it may help other users!

Regards

Gerardo

Hi!
I tried this thing on Windows 10. Didn't work. I can't see density profile under Extentensions>Analysis. Need help!

@flashshreyas
Copy link

Hi!
I tried 1st method on Windows 10. It isn't working.
Can someone please help? Thanks!

@tonigi
Copy link
Author

tonigi commented Jul 1, 2020 via email

@flashshreyas
Copy link

@tonigi Thanks!

I have used,

lappend auto_path C:/Users/flash/vmd_density_profile-master (This is where the downloaded density profile folder exists)
package require density_profile_gui

Not working. Did I make any mistake?

@tonigi
Copy link
Author

tonigi commented Jul 1, 2020 via email

@flashshreyas
Copy link

Yes, tried this too,

lappend auto_path C:/Users/flash/vmd_density_profile-master
package require density_profile_gui; density_profile_gui::register_menu;

No luck.

@tonigi
Copy link
Author

tonigi commented Jul 1, 2020 via email

@flashshreyas
Copy link

Thanks much. Let me try that and see.

@jiroegbu
Copy link

I have tried method 1 for my windows computer and added every extra line but still it does not work. Please help.

@tonigi
Copy link
Author

tonigi commented Dec 13, 2020

Which tool?

@jiroegbu
Copy link

@tonigi the density profile tool

@tonigi
Copy link
Author

tonigi commented Dec 13, 2020

Try this package require density_profile_gui; density_profile_gui::register_menu;

@jiroegbu
Copy link

Tried that, did not work. This is the line I used

lappend auto_path/C:/Users/jreiy/Desktop/MNE/vmd_density_profile-master/vmd_density_profile-master
package require density_profile_gui; density_profile_gui :: register_menu;

@tonigi
Copy link
Author

tonigi commented Dec 13, 2020

Run the command in the command line prompt. Make sure the spacing is right (no spaces around :: )

@jiroegbu
Copy link

image

@tonigi
Copy link
Author

tonigi commented Dec 13, 2020

Sorry, you'll need to find somebody familiar with vmd and tcl to guide you.

@jiroegbu
Copy link

Finally figured it out

Apparently for Windows 10 this works - Just simply download the plugin, extract, and copy the vmd_density_profile-master folder to C:\Program Files (x86)\University of Illinois\VMD\plugins\noarch\tcl

Then start VMD and you will see the Density Profile Tool in Extension>Analysis

Hope this helps anyone else who encounters the problems I did!

@tonigi
Copy link
Author

tonigi commented Dec 13, 2020

👍

@rarensu
Copy link

rarensu commented Aug 12, 2021

I discovered by reading the VMD source code that if you wish to do a molfile plugin, the only method I found that even remotely works is a variant of #2 but with a different variable.
export VMDPLUGINPATH=/path/to/dir
where /path/to/dir is the parent directory of a directory named molfile

@arpitsingh1409
Copy link

INSTRUCTIONS for WINDOWS:

  1. Download and extract the tool zip file.
  2. Copy the plugin folder and go to the path '\VMD\plugins\noarch\tcl' and paste the folder there.
  3. If the plugin has a load.tcl file, then go to '\VMD\scripts\init.d' and just paste that load.tcl (or a file named something similar) there.
  4. If the init.d folder is not present, just create a new folder and name it init.d and paste the load file there.
    Hope this helps. :)

@farshadrostami
Copy link

please write instructions in linux.

@Muhriz123
Copy link

Finally figured it out

Apparently for Windows 10 this works - Just simply download the plugin, extract, and copy the vmd_density_profile-master folder to C:\Program Files (x86)\University of Illinois\VMD\plugins\noarch\tcl

Then start VMD and you will see the Density Profile Tool in Extension>Analysis

Hope this helps anyone else who encounters the problems I did!

i couldnt find noarch in plugins

@wamweresamuel254
Copy link

I have tried Method 1 by typing: lappend auto_path/home/sam/Downloads/density_profile.tcl , in the code section of VMD Preference Panel. Checking comments, nobody seems to be doing that. Was I supposed to use Tk Console or here? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment