https://github.com/danmichaelo/crystallography
A VMD plugin for drawing crystallographic vectors and aligning the view to a crystallographic view direction
https://github.com/danmichaelo/crystallography
Last synced: 6 months ago
JSON representation
A VMD plugin for drawing crystallographic vectors and aligning the view to a crystallographic view direction
- Host: GitHub
- URL: https://github.com/danmichaelo/crystallography
- Owner: danmichaelo
- Created: 2011-04-06T08:38:15.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2022-10-19T17:03:39.000Z (about 3 years ago)
- Last Synced: 2025-03-24T00:58:36.123Z (10 months ago)
- Language: Tcl
- Homepage:
- Size: 1.58 MB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# About
[VMD](http://www.ks.uiuc.edu/Research/vmd/) plugin written primarily to make it
easier to align the view direction along specific crystallographic directions.
It also includes commands to convert vectors between crystallographic and cartesian
coordinates, and to draw arrows indicating the crystallographic axes arrows and/or
the current view direction.
The plugin can be used either from the command line or from a GUI, inspired in part
by the "Orientation" window of the program VESTA and the "Set View Direction" window
of CrystalMaker.
For the plugin to work, the loaded molecule must contain unit cell information.
If VMD can not read this from your file, it can be set manually using the
pbctools plugin. Note that pbctools also provide the nice command `pbc box' to draw
the unit cell.
# Installation
Put the crystallography folder in a folder searched by VMD, that is, a folder
listed in `auto_path`. For instance, you may put it in `~/vmd/plugins`, and add
set auto_path [concat "{$env(HOME)/vmd/plugins}" $auto_path] ;
to your `~/.vmdrc` (or `vmd.rc' on Windows) file. To add the plugin to the Plugins-menu, add the following
to your `~/.vmdrc` file (or just type it in VMD when needed):
vmd_install_extension crystallography cryst_tk "Crystallography"
# Example usage
To view along the [111] direction, type `view_along {1 1 1}` (list notation) or `view_along 111` (short-hand notation)
To view towards the (100) plane, type `view_towards {1 0 0}` or `view_towards 100`.
To show crystal axes, type `crystal_axes on -position lower-left`, say.
Similarly, type `view_vectors on` to show the vectors of the current viewing plane.
The plugin tries to show these as properly formatted Miller indices when a crystal plane is in focus.
The commands `cart2dir` and `cart2rec` transforms a vector from a cartesian basis {**i**,**j**,**k**} to a
real space lattice basis {**a**,**b**,**c**} and a reciprocal space lattice basis {**a**\*,**b**\*,**c**\*}, respectively.
And `dir2cart` and `rec2cart` transforms the other way around.
All the above can also be carried out using the GUI, that can be opened by using the menu item or by typing `cryst_tk`.
See `crystallography.tcl` for more information.

# GUI
The font rendering on Linux is probably better if VMD is built with Tcl 8.5 instead of 8.4.
Seems to be encoding issues on Windows.


