From: Axel Kohlmeyer (
Date: Sat Jul 28 2007 - 17:24:08 CDT

On Sat, 28 Jul 2007, [iso-8859-7] Θωμας [iso-8859-7] Ευαγγελιδης wrote:

TE> Hi,

hi thomas,

TE> I am trying to write some code to make unit cell tranformations, so I
TE> have the following naive question about the orientation of hexahedrons
TE> parallelepipeds unit cells relative to x,y axes:
TE> Does at least one "a" unit cell edge start from point (0,0,0) and coincide with
TE> x axis in all hexahedrons parallelepipeds unit cells used in simulations? Do
TE> also the 2 "b" unit cell edges linked to that "a" edge always lie in the xy
TE> plane?

what you describe is what VMD currently _assumes_ for periodic display.
coordinates are loaded 'as is' and - when the file format and plugin
allow it - the box information is read/converted to
a/b/c/alpha/beta/gamma, since this is what VMD stores internally.

this way the orientation of the cell is lost and the assumptions
you describe are made to define the orientation of the cell in
the three dimensional lattice. this is not a big issue for orthogonal
boxes and also the orientation along the x/y/z-axis is the natural
choice and implemented by all relevant (classical) simulation codes.

because of this, some plugins (e.g. .cube, .xsf) actually rotate
the cell and coordinates to match VMD's assumptions and have
a working periodic display for volumetric data and coordinates.


TE> thanks in advance,
TE> Thomas

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.