From: Axel Kohlmeyer (
Date: Tue Jun 30 2009 - 13:56:02 CDT

On Tue, 2009-06-30 at 13:27 -0400, Steve Jensen wrote:
> Hi Everyone,


> I am using VMD for analyzing VASP POSCARS and I notice that there are
> certain things that I have to every time that I load a file or start a
> new session. I tried looking around for how to change these presets,
> but I was curious if any of you could help.

default customizations in VMD are done by creating a .vmdrc file.
(or vmd.rc on windows)

> Change default file type to POSCAR

cannot be set right now without changing the source code
and recompiling.

however, you could write a custom file browser in Tk that
accepts only specific file types. i think i've posted a
template for something like this to the mailing list a while
ago. if there is sufficient demand, i could see if i find
the original code, clean it up a bit more and make it a
plugin (which can be make visible by default). also you
can specify filename and type on the command line.
ex: vmd -psf some.psf -pdb some.pdb

> Change default view to orthographic

put: display projection orthographic
into your .vmdrc

> Change default drawing method to VDW (w/ sphere resolution of say 14)

put a: mol default style VDW
in your .vmdrc. i usually also enable GLSL with:
display rendermode GLSL
and then resolution doesn't matter. you'll
always get perfect spheres and with a decent
graphics card it is faster, sometimes much faster.

> Make it periodic in +x and +y

cannot be don't directly right now. you could try
to use a variable trace in .vmdrc to have this done
automatically for the first n molecules. requires a
bit of tcl hacking, but is only moderately complicated.
before there was: mol default, i had posted a .vmdrc
script fragment to the list where one could set the
default style this way.

> Also, on another note, is there a way to specify my molecule as one
> unit so it could be easier to rotate/manipulate it or parts of it as a
> whole while leaving the surface alone? (group 10 atoms, leave the
> other 70 alone) Basically I am wondering if there is an easy way to
> try out different orientations of a molecule on a surface without
> having to apply tons of rotation and translation matricies in excel.

you can load the same "molecule" (i.e. system) twice and then
use different selections to show both parts of the system.
these you can rotate and translate independently. if you do this
via clicking on the "F" flag in the VMD main dialog, you should
keep in mind that this only changes the view port for this molecule,
but not the coordinates.

> Thank you so much for your help!
> Stephen
> PS- On a final note have people ever run into issues with clipping
> when running VMD on a cluster? I am on a redhat enterprise 4 x86 64
> bit cluster and when I load vmd all the graphics are constantly
> flashing.

using VMD remotely puts a severe load on your network and requires
a "perfect" OpenGL _and_ GLX (OpenGl over X) implementation. this is
rarely the case for linux and the performance can be pretty bad.
why not transfer the files (using rsync)? or if you do data processing,
you can do this in text mode.


Axel Kohlmeyer
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
If you make something idiot-proof, the universe creates a better idiot.