Skip to content

Instantly share code, notes, and snippets.

@tonigi
Last active March 8, 2024 08:10
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • 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
@tonigi
Copy link
Author

tonigi commented Nov 20, 2019

I would need some more information, like error messages and so on... can't debug from here.

@vasuphy
Copy link

vasuphy commented Nov 20, 2019 via email

@tonigi
Copy link
Author

tonigi commented Nov 20, 2019

@vasuphy
Copy link

vasuphy commented Nov 20, 2019

Kindly note that I am trying to install density_profile not diffusion. Can you please point out the error in the lappend statement which I used.
lappend auto_path /home/user/program/vmd_density_profile-master
Thanks

@tonigi
Copy link
Author

tonigi commented Nov 20, 2019

Try package require density_profile_gui; density_profile_gui::register_menu; and/or the other methods. At the worst, source the files manually.

@vasuphy
Copy link

vasuphy commented Nov 20, 2019

Thanks a lot, the problem is solved by adding the line which you mentioned and its working well.
Once again thanks for your timely help.

@YF97410
Copy link

YF97410 commented Mar 31, 2020

Hi, I tried the method 1 for a linux 18.04 distribution, density profile is the interesting tool for me. Actually I obtained a error message : can't find package density_profile_gui

My 2 lines typed in Vmd :
/usr/local/lib/vmd/plugins/LINUXAMD64 'this line corresponds to the path where I found plugins folder'
'typed in my new plugin'
package require density_profile_gui 'typed in density profile'

Please, I need some help.
Thank you in advance.

@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