From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Thu Apr 11 2013 - 11:59:11 CDT

On Thu, Apr 11, 2013 at 6:50 PM, Roberto Guerra <robguerra_at_unimore.it> wrote:
> afaik cube files treat only orthorhombic cells. If so, cube plugin shouldn't be affected by the bug.

no, they can handle any kind of lattice. many plane wave
pseudopotential DFT codes produce non-orthogonal cube files. i worked
on some of that stuff myself back in the time. but the bug doesn't
show.

axel.

>
>
> Roberto
>
>
> On 11 April 2013, Axel Kohlmeyer <akohlmey_at_gmail.com> wrote:
>> john, roberto,
>>
>> i just double checked the patch and example files with xcrysden (which
>> is *the* authoritative reference for the file format) and can confirm
>> that the change is correct. since the xsf and the cube plugin share a
>> lot of code, we need to double check whether the same problem exists
>> for cubefiles as well. will look into this now.
>>
>> thanks for the patch.
>>
>> axel.
>>
>> On Wed, Apr 3, 2013 at 10:56 PM, John Stone <johns_at_ks.uiuc.edu> wrote:
>> > 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/
>>
>>
>>
>>

--
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
International Centre for Theoretical Physics, Trieste. Italy.