From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Sun Aug 10 2008 - 11:11:34 CDT

On Sun, 10 Aug 2008, shiladitya_at_jncasr.ac.in wrote:

S> Hello ,

hello,
 
S> i am using VMD to see configurations stored in .xyz file.
S> i want to put the see the configuration with the simulation box . i am
S> trying to use the 'pbctools' package.
S>
S> the commands given on tkconsole (after loading the single-configuration
S> xyz file) are:
S>
S> package require pbctools
S> set molid [molinfo top]
S> set cell {9 10 30 41 136 124}
S> molinfo $molid set {a b c alpha beta gamma} $cell
S> pbc box -on
S>
S> it does show both the configuration and the simulation box.
S>
S> but the problem is, the simulation box has different orientation than the
S> configuration, that is the atoms in the configuration are not inside the
S> box as they should be.
S>
S> how to fix this?

reorient your atoms.

the handling of PBC in VMD currently assumes that the a-axis of your
system is collinear with the x-axis, the b-axis in the xy-plane and
the c-axis forms a right handed coordinate system.

the orientation of a cell is not even stored internally (for historical
reasons). if you have a look at the source code of the molfile
plugins for .xsf and .cube file format, you see how the rotation is
done. both formats do it on-the-fly.

alternately, you could write a small tool to convert your .xyz
file (it would be easier to use a file format that contains the
cell infor to begin with) to, e.g., .xsf and thus bypass the mess.

cheers,
   axel.

S>
S>
S> thanks in advance,
S>
S> shiladitya
S>
S>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   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.