From: Matt Watkins (mattwatkinsuk_at_gmail.com)
Date: Tue Oct 13 2009 - 11:48:27 CDT

Hi Axel,

Thanks for the suggestions. I managed to get vmd to see my modified plugin
(be careful to check all paths it searches for plugins!).

 At least in my case (not fully triclinic) just changing line 459 of
gromacsplugin.C to use the cosines of gamma rather than alpha fixes the
problem. I'll try and look more carefully for the general case.

cut
    box[3] = ts->B*ca; box[4] = ts->B*sa; box[5] = 0.0;
add
    box[3] = ts->B*cg; box[4] = ts->B*sg; box[5] = 0.0;

i don't think this is a good idea to begin with. VMD has only a very
> limited view on non-orthogonal cells, i.e. it doesn't store the cell
> vectors, but only the relative lengths and angles thus leaving the
> orientation of the cell undefined. so you only have support for
> triclinic cells in a specific orientation (a-vector along x-axis,
> b-vector in xy-plane, and c-vector chose to give a right handed
> coordinate system).
>
> no doubt you're right in general, but If I stick to .gro and .trr files I
should be OK, I think (by definition they're correctly orientated for VMD
only using lower triangle of cell vector matrix).

> the gromacs plugin has not been updated in quite a while and i have
> been thinking to rewrite it to use the libxdrfile library that has been
> split off of gromacs and put under BSD license.
>
> I was thinking of something similar for what I'm doing now (well just
writing some external code using this library), but wanted to keep the
flexibility of the atom selections in VMD.

Cheers,

Matt