Skip to content

Instantly share code, notes, and snippets.

@tonigi
Last active May 5, 2025 18:55
Show Gist options
  • Select an option

  • Save tonigi/a9cfaf7642a7fbc13293 to your computer and use it in GitHub Desktop.

Select an option

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
@Sbabaei
Copy link

Sbabaei commented Sep 18, 2024

Hi,
The Diffusion Coefficient Tool computes the mean MSD at various lag times (τ). According to Einstein's relation, the MSD is expected to grow linearly with τ. Therefore, using the default interval of trajectory length divided by 10 to 50 for calculating the MSD may not be the most appropriate choice. Instead, it seems necessary to analyze the log-log plot to identify the linear section of the MSD curve.

Could you please clarify the best approach for this? Should we calculate the MSD for the entire trajectory (from start to end) using the plugin, export the results to a CSV file, and plot a log-log graph to determine if the segment is visually linear (slop=1)? Once identified, we could select this interval in the plugin to calculate the diffusion coefficient.

I would greatly appreciate your guidance on this matter.

@tonigi
Copy link
Author

tonigi commented Sep 18, 2024

See if http://www.utkstair.org/clausius/docs/che548/pdf/selfd.pdf helps. That's pretty much it.

@izaheyward
Copy link

izaheyward commented May 5, 2025

Linux user here.

I used VMD Preference Panel:
Custom > New> Added code:
lappend auto_path /home/vmd_density_profile-master/
menu main on

source /home/vmd_density_profile-master/load.tcl

And then Update > Write Settings to VMDRC
Close VMD and re-open it.

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