From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Sep 21 2011 - 11:06:17 CDT

Hi,
  Thanks for your comments, I will have a look at this soon.
We just finished writing a large funding proposal to continue
VMD development, so I'm way behind on emails currently.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Sat, Sep 17, 2011 at 12:33:49AM +0900, KM Tu wrote:
> Hello,
>
> I believe I have found a bug about the Tcl "trans" command.
> Fortunately, it should be easy to resolve, by modifying either the
> source code or the VMD User???s Guide.
>
> On the VMD User???s Guide Version 1.9 (March 9, 2011) page 166, it is
> written that:
> ??? center {x y z} ??? Sets the centering matrix so that point x y z is
> brought to the origin
> ??? offset {x y z} ??? Sets the offset matrix so that the origin is brought to x y z
> ??? origin {x y z} ??? Sets both the centering and offset matrices to x y z
>
> In other words, the User's Guide claims that:
> setting origin = setting center + setting offset
>
> But I found that it is not the truth. The truth should be:
> setting center = setting origin + setting offset
>
> We do not need any complex mathematics to verify this. Only some
> simple logical tests are needed.
>
> Relation test
> ============================
> a)
> vmd > coordtrans [trans origin {1 0 0} axis z 90] {0 0 1}
> 0.0 -1.0 1.0
>
> vmd > coordtrans [trans center {1 0 0} offset {1 0 0} axis z 90] {0 0 1}
> 1.0 -1.0 1.0
>
> b)
> vmd > coordtrans [trans center {1 0 0} axis z 90] {0 0 1}
> 1.0 -1.0 1.0
>
> vmd > coordtrans [trans origin {1 0 0} offset {1 0 0} axis z 90] {0 0 1}
> 1.0 -1.0 1.0
> ============================
> >From a) we know, setting origin /= setting center + setting offset.
> >From b) we get, setting center = setting origin + setting offset.
>
>
> Furthermore, we can do the following test:
>
> Dependency test
> ============================
> c) center and offset are incommutable
> vmd > coordtrans [trans center {1 0 0} offset {2 0 0} axis z 90] {0 0 1}
> 2.0 -1.0 1.0
>
> vmd > coordtrans [trans offset {2 0 0} center {1 0 0} axis z 90] {0 0 1}
> 1.0 -1.0 1.0
>
> d) center and origin are incommutable
> vmd > coordtrans [trans center {1 0 0} origin {2 0 0} axis z 90] {0 0 1}
> 1.0 -2.0 1.0
>
> vmd > coordtrans [trans origin {2 0 0} center {1 0 0} axis z 90] {0 0 1}
> 1.0 -1.0 1.0
>
> e) origin and offset are commutable (independent)
> vmd > coordtrans [trans origin {1 0 0} offset {2 0 0} axis z 90] {0 0 1}
> 2.0 -1.0 1.0
>
> vmd > coordtrans [trans offset {2 0 0} origin {1 0 0} axis z 90] {0 0 1}
> 2.0 -1.0 1.0
> ============================
>
> Therefore, it is obvious that it is "setting center" should include
> "setting origin" and "setting offset". Either the User???s Guide or the
> VMD program itself is wrong.
>
> It took me a whole night to figure all this mess out. Please correct
> me if I am wrong. Thank you.
>
> KM Tu

-- 
NIH Resource 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/       Fax: 217-244-6078