From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Apr 03 2013 - 15:56:28 CDT

Axel, Roberto,
  If you can both test this and agree together that it works, I will
apply the requested chang to the plugin source code. Since Axel wrote
this plugin and I'm not familiar with xcrysden myself, I would prefer that
he has a chance to comment on the proposed change before I take action
on putting it into VMD. If you both agree, then I am happy to put the
changes in place and it would then be part of one of the upcoming test
builds of VMD.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Sun, Mar 31, 2013 at 01:55:43AM +0100, Roberto Guerra wrote:
> Dear all,
>
> at present vmd does not visualize correclty the structure in a xsf file when the cell vectors don't form a simmetric matrix. You can verify this with the two simple examples attached, a.xsf and b.xsf, having monoclinic and fcc cells, respectively.
> In these, the atoms are aligned along the cell vectors, and you can see they are not correctly rotated by the xsfplugin. You can see the difference with xcrysden.
>
> It have fount that the bug was in the readbox routine of xsfplugin.C. This is the diff of original-vs-patched code:
>
> 167,169c167,169
> < box->cell[0][i] = x[i];
> < box->cell[1][i] = y[i];
> < box->cell[2][i] = z[i];
> ---
> > box->cell[i][0] = x[i];
> > box->cell[i][1] = y[i];
> > box->cell[i][2] = z[i];
> 908c910
> < plugin.minorv = 7;
> ---
> > plugin.minorv = 8;
>
> Clearly, for symmetric matrices one doesn't notice the difference.
> You can verify that the patched code visualizes correctly the attached examples.
>
>
> Best regards,
> Roberto Guerra

> CRYSTAL
> PRIMVEC
> 22.80 0.000 0.000
> 11.40 19.75 0.000
> 0.000 0.000 20.30
> PRIMCOORD
> 7
> Au 0.01 0.01 0.01
> Si 3 0.01 0.01
> Si 6 0.01 0.01
> C 2.28 3.95 0.01
> C 4.56 7.90 0.01
> Ge 0.01 0.01 3
> Ge 0.01 0.01 6

> CRYSTAL
> PRIMVEC
> -15.26 0.00 15.26
> 0.00 15.26 15.26
> -15.26 15.26 0.00
> PRIMCOORD
> 10
> Au 0 0 0
> Si -3 0.01 3
> Si -6 0.01 6
> Si -9 0.01 9
> C 0.01 3 3
> C 0.01 6 6
> C 0.01 9 9
> Ge -3 3 0.01
> Ge -6 6 0.01
> Ge -9 9 0.01

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/