VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Fri Nov 19 2010 - 14:49:31 CST
- Next message: Jérôme Hénin: "Re: rgyr calculation problem"
- Previous message: Axel Kohlmeyer: "Re: rgyr calculation problem"
- Maybe in reply to: Axel Kohlmeyer: "Re: .xsf triclinic cell contents"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Fri, 2010-11-19 at 12:18 -0800, Erin L. wrote:
> Hi Axel,
hi erin,
please always keep the list in cc: so that people see
how this is resolved.
> Thanks for the prompt reply and pointing me in the right direction. I
> took a look at the xsfplugin.C, and I've found a bug or two that would
> only show up when the angles aren't 90 degrees. I'm going to play
interesting. please send me any kind of (small!) test files
that show this and i can help to correct the problems and
add them to the collection of test files. i would also have
to check several other plugins (cube, abinit, vasp...)
that use the same approach to have proper periodic atom display.
> with the .C file a bit and hopefully figure out how to update the
> library to see the differences in VMD.
if you send me the changes, then i can easily test and
integrate them into the VMD cvs and build updated plugins.
as i mentioned before, this would not only affect the xsf
plugin, but potentially others as well (unless they were
fixed and the fix not propagated to the xsfplugin).
> This problem has been bugging me because my crystal vectors are in the
> standard orientation, so the rotation matrix should be the identity
> matrix, and the particles should stay put. ;)
i did quite a lot of tests when writing the code many, many
years ago. but there is the saying that no (large) program
is completely bug-free. there always those bugs that have
not been found, yet. ;)
cheers,
axel.
> Thank you,
> Erin
>
> On Thu, Nov 18, 2010 at 1:41 PM, Axel Kohlmeyer <akohlmey_at_gmail.com>
> wrote:
> On Thu, 2010-11-18 at 12:23 -0800, Erin L. wrote:
> > Hello,
>
> hi erin,
>
> > I'm new to VMD and having trouble with particle positions in
> triclinic
> > unit cells. I've written my own program and make output in
> both .xsf
> > (using www.xcrysden.org/doc/XSF.html as a guide) and .xyz
> file format.
> >
> > My problem is that the two files, when loaded into VMD, give
> me
> > different visualizations of the crystal. I've narrowed down
> the
> > problem to the .xsf file coordinate positions are not
> consistent from
> > input to visualization, but I'm not sure why. How can I fix
> or
>
> but i am. ;-)
>
> the reason lies in the xsf plugin: it rotates all the data
> after reading, if the cell vectors are not conforming to the
> assumptions that VMD makes. the internal storage in VMD for
> the
> periodic cell does not contain information about the
> orientation,
> so for getting the correct periodic visualizations. the whole
> data set will have to be rotated, so that the a vector is
> collinear with the x-axis, the b-vector in the xy-plane and
> the z-vector so that you get a right-handed coordinate system.
>
> unfortunately, there is no easy way to work around this.
> when i adjusted to .cube reader for it (and later wrote the
> .xsf reader) i had to make a choice between keeping the
> coordinates
> consistent and getting correct periodic display. i chose the
> latter. if you would like it the other way around, my
> suggestion
> would be to compile your own copy of the .xsf file molfile
> plugin where this rotation is disabled. for as long as you
> have
> a higher (minor) version number in the plugin as the one that
> ships with the VMD binary, your .so file will override the
> plugin shipped with VMD (you have to be careful with loading
> files from the command line, here the reading usually starts
> before the plugin is overridden).
>
> i hope that explains matters. let us know, if you have
> additional questions on this subject. we'd been pondering
> better solutions on and off, but they require quite a bit
> programming in VMD, and there is a shortage of people with
> the experience and enough free time at their hands... :-(
>
> cheers,
> axel.
>
> > reconcile this? I would prefer to keep using the .xsf
> format because
> > the files are much smaller.
> >
> > I've made up a minimal example with only one non-orthogonal
> angle.
> > The .xsf and VMD Query results are below. I should note
> that the unit
> > cell vectors in the .xsf seem to work just fine. The
> command "pbc
> > box" in the Tk Console draws the unit cell as specified and
> it matches
> > the lattice from the .xyz file. I'm using VMD 1.8.6 (Linux,
> 64 bit),
> > but have also checked it on VMD 1.8.7 (Linux, 32 bit). Any
> thoughts
> > or pointers would be appreciated.
> >
> > Thank you for your time,
> >
> > Erin
> >
> > ------------
> >
> > sample .xsf file:
> >
> > -------------
> > CRYSTAL
> > PRIMVEC
> > 5.000 0.000 0.000
> > 0.000 5.000 0.000
> > 0.000 2.500 4.330
> >
> > # 5.000 5.000 5.000 (a, b, c lengths)
> > # 60.000 90.000 90.000 (alpha, beta, gamma
> angles)
> >
> > PRIMCOORD
> > 4 1
> > 12 0.000 0.000 0.000
> > 12 2.500 0.000 0.000
> > 12 0.000 2.500 0.000
> > 12 0.000 1.250 2.165
> > --------------
> >
> > VMD Coordinate Query results on the .xsf unit cell
> particles:
> >
> > --------------
> >
> > 0.00 0.00 0.00
> > 2.50 0.00 0.00
> > 0.00 2.50 1.25
> > 0.00 5.00 4.665
> >
> > -------------
> >
>
> --
> Dr. Axel Kohlmeyer
> akohlmey_at_gmail.com http://goo.gl/1wk0
>
> Institute for Computational Molecular Science
> Temple University, Philadelphia PA, USA.
>
>
-- Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0 Institute for Computational Molecular Science Temple University, Philadelphia PA, USA.
- Next message: Jérôme Hénin: "Re: rgyr calculation problem"
- Previous message: Axel Kohlmeyer: "Re: rgyr calculation problem"
- Maybe in reply to: Axel Kohlmeyer: "Re: .xsf triclinic cell contents"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]