Re: [ccp4bb] The mystery of the S-tensor WAS: re-indexing, re-orienting and TLS-tensors

2008-09-23 Thread Ian Tickle
Clemens

Sorry my last 2 e-mails probably weren't so clear, because the software
may not actually write out S11 & S22 explicitly.  Unfortunately there's
no consistency on what the programs do write out, so you may need to
solve some linear equations for the unknowns S11, S22 & S33 needed to
construct the complete S tensor.

For example Refmac writes out (see
http://www.ccp4.ac.uk/dist/html/refmac5/files/tls.html) S22-S11 and
S11-S33 as the first 2 elements of the S matrix (8 elements in all), so
let:

x = S22-S11
y = S11-S33

and we also have:

S11+S22+S33 = 0

Therefore the solution is:

S11 = (y-x)/3
S22 = (y+2x)/3
S33 = -(2y+x)/3

You can satisfy yourself that this is the solution by substitution in
the original equations.

The reason that Refmac writes out the differences between the diagonal
elements, and not the elements themselves, is simply that only the
differences are involved in the calculation of the atomic Uaniso
tensors, and the third difference needed is expressible in terms of the
other two, i.e. S33-S22 = -(x+y).

Hope this is clearer now!

-- Ian

> -Original Message-
> From: Clemens Grimm 
> [mailto:[EMAIL PROTECTED] 
> Sent: 23 September 2008 16:41
> To: CCP4BB@JISCMAIL.AC.UK
> Cc: Ian Tickle
> Subject: The mystery of the S-tensor WAS: re-indexing, 
> re-orienting and TLS-tensors
> 
> Dear all,
> 
> a few weeks ago I was wondering how to apply a rotation matrix to 
> TLS-tensors and Ian was so kind to supply us with the corresponding 
> formulas.
> After looking a bit into it, however, the whole matter seems to be 
> complicated by the fact that one value of S is undefined,
> however, after the transformation it appears within S' at 
> several places.
> Did we miss something obvious? Or is this actually more 
> complicated than 
> it looked like in the first place?
> 
> Thanks
> Clemens
> 
> Ian Tickle schrieb:
> > Clemens,
> >
> > One thing I should have pointed out, though you may have realised it
> > already: you will most likely want to keep the same 
> relative origins for
> > the new TLS groups so this means that the translational 
> component of the
> > transformation (vector p or matrix P) will always be zero.  
> This is true
> > even if your desired transformation of the co-ordinates contains a
> > non-zero translation component, because this translation is 
> then also
> > applied to the local origin of the TLS group, hence there is no
> > resultant translation *relative* to that origin.  In other words the
> > translational component p is only relevant if you want to change the
> > relative origins of the TLS groups (e.g. from COG to COR or 
> vice versa),
> > which is unlikely if all you are doing is re-indexing.
> >
> > Having p=0 (and P=O) of course considerably simplifies the 
> equations,
> > i.e.:
> >
> > T' = RTR~
> >
> > and the same transformation is applied separately to L and S.
> >
> > Cheers
> >
> > -- Ian
> >
> >   
> >> -Original Message-
> >> From: Clemens Grimm 
> >> [mailto:[EMAIL PROTECTED] 
> >> Sent: 09 July 2008 14:20
> >> To: Ian Tickle
> >> Subject: RE: [ccp4bb] re-indexing, re-orienting and TLS-tensors
> >>
> >> Hi Ian,
> >>
> >> thanks for the formulas! I'll probably give Mthematica a try.
> >>
> >> Clemens
> >>
> >> Quoting Ian Tickle <[EMAIL PROTECTED]>:
> >>
> >> 
> >>> Hi Clemens
> >>>
> >>> The relevant matrix algebra is all there in TLSANL, i.e. 
> >>>   
> >> you could put
> >> 
> >>> some code together based on that to do what you want, 
> however there
> >>> isn't an option (even an undocumented one!) to do exactly 
> >>>   
> >> what you want
> >> 
> >>> and I don't know of any program which will do that.  The 
> math isn't
> >>> actually all that difficult, all you need is a routine for 
> >>>   
> >> 3x3 matrix
> >> 
> >>> multiplication, or you could use something like R or Mathematica.
> >>>
> >>> -- Ian
> >>>
> >>>   
>  -Original Message-
>  From: [EMAIL PROTECTED]
>  [mailto:[EMAIL PROTECTED] On Behalf Of Clemens Grimm
>  Sent: 09 July 2008 12:24
>  To: [EMAIL PROTECTED]; Eleanor Dodson
>  Cc: CCP4BB@jiscmail.ac.uk
>  Subject: Re: [ccp4bb] re-indexing, re-orienting and TLS-tensors
> 
>  this was a difficult case due to poor convergence behaviour
>  during the TLS
>  refinement. At the moment I'm not sure what would be more 
>  
> >> complicated,
> >> 
>  re-creating the tensors from scratch or writing a script.
>  What about TLSANL? Is there an (undocumented ?) feature that
>  could be used for
>  things like that?
> 
>  Clemens
> 
>  Quoting Eleanor Dodson <[EMAIL PROTECTED]>:
> 
>  
> > I would run the TLS again!
> >   Eleanor
> >
> >
> > Clemens Grimm wrote:
> >   
> >> Dear all,
> >>
> >> after re-indexing a dataset I had to re-orient my coordinates
> >> accordingly. Th

Re: [ccp4bb] The mystery of the S-tensor WAS: re-indexing, re-orienting and TLS-tensors

2008-09-23 Thread Ian Tickle
Hi Clemens

The element of S you are referring to is not undefined: the value of one
of the diagonal elements of S can be chosen arbitrarily because it makes
no difference as far as the individual atomic motions are concerned.
The software normally chooses the value for the arbitrary element so
that the sum of the diagonal elements of S (i.e. the trace) is zero, but
it wouldn't make any difference if any other value were chosen.

HTH

-- Ian

> -Original Message-
> From: Clemens Grimm 
> [mailto:[EMAIL PROTECTED] 
> Sent: 23 September 2008 16:41
> To: CCP4BB@JISCMAIL.AC.UK
> Cc: Ian Tickle
> Subject: The mystery of the S-tensor WAS: re-indexing, 
> re-orienting and TLS-tensors
> 
> Dear all,
> 
> a few weeks ago I was wondering how to apply a rotation matrix to 
> TLS-tensors and Ian was so kind to supply us with the corresponding 
> formulas.
> After looking a bit into it, however, the whole matter seems to be 
> complicated by the fact that one value of S is undefined,
> however, after the transformation it appears within S' at 
> several places.
> Did we miss something obvious? Or is this actually more 
> complicated than 
> it looked like in the first place?
> 
> Thanks
> Clemens
> 
> Ian Tickle schrieb:
> > Clemens,
> >
> > One thing I should have pointed out, though you may have realised it
> > already: you will most likely want to keep the same 
> relative origins for
> > the new TLS groups so this means that the translational 
> component of the
> > transformation (vector p or matrix P) will always be zero.  
> This is true
> > even if your desired transformation of the co-ordinates contains a
> > non-zero translation component, because this translation is 
> then also
> > applied to the local origin of the TLS group, hence there is no
> > resultant translation *relative* to that origin.  In other words the
> > translational component p is only relevant if you want to change the
> > relative origins of the TLS groups (e.g. from COG to COR or 
> vice versa),
> > which is unlikely if all you are doing is re-indexing.
> >
> > Having p=0 (and P=O) of course considerably simplifies the 
> equations,
> > i.e.:
> >
> > T' = RTR~
> >
> > and the same transformation is applied separately to L and S.
> >
> > Cheers
> >
> > -- Ian
> >
> >   
> >> -Original Message-
> >> From: Clemens Grimm 
> >> [mailto:[EMAIL PROTECTED] 
> >> Sent: 09 July 2008 14:20
> >> To: Ian Tickle
> >> Subject: RE: [ccp4bb] re-indexing, re-orienting and TLS-tensors
> >>
> >> Hi Ian,
> >>
> >> thanks for the formulas! I'll probably give Mthematica a try.
> >>
> >> Clemens
> >>
> >> Quoting Ian Tickle <[EMAIL PROTECTED]>:
> >>
> >> 
> >>> Hi Clemens
> >>>
> >>> The relevant matrix algebra is all there in TLSANL, i.e. 
> >>>   
> >> you could put
> >> 
> >>> some code together based on that to do what you want, 
> however there
> >>> isn't an option (even an undocumented one!) to do exactly 
> >>>   
> >> what you want
> >> 
> >>> and I don't know of any program which will do that.  The 
> math isn't
> >>> actually all that difficult, all you need is a routine for 
> >>>   
> >> 3x3 matrix
> >> 
> >>> multiplication, or you could use something like R or Mathematica.
> >>>
> >>> -- Ian
> >>>
> >>>   
>  -Original Message-
>  From: [EMAIL PROTECTED]
>  [mailto:[EMAIL PROTECTED] On Behalf Of Clemens Grimm
>  Sent: 09 July 2008 12:24
>  To: [EMAIL PROTECTED]; Eleanor Dodson
>  Cc: CCP4BB@jiscmail.ac.uk
>  Subject: Re: [ccp4bb] re-indexing, re-orienting and TLS-tensors
> 
>  this was a difficult case due to poor convergence behaviour
>  during the TLS
>  refinement. At the moment I'm not sure what would be more 
>  
> >> complicated,
> >> 
>  re-creating the tensors from scratch or writing a script.
>  What about TLSANL? Is there an (undocumented ?) feature that
>  could be used for
>  things like that?
> 
>  Clemens
> 
>  Quoting Eleanor Dodson <[EMAIL PROTECTED]>:
> 
>  
> > I would run the TLS again!
> >   Eleanor
> >
> >
> > Clemens Grimm wrote:
> >   
> >> Dear all,
> >>
> >> after re-indexing a dataset I had to re-orient my coordinates
> >> accordingly. The
> >> model contains some 24 TLS-tensors.
> >> Now my question is how to apply the rotation matrix also
> >> 
>  to the TLS-tensors.
>  
> >> What is the mathematical operation and is there a 
> >> 
> >> program that can
> >> 
> >> do the job
> >> for me?
> >>
> >> Thanks,
> >> Clemens
> >>
> >>
> >>
> >> 
> >   
>  
> >>> Disclaimer
> >>> This communication is confidential and may contain privileged 
> >>> information intended solely for the named addressee(s). It 
> >>>   
> >> may not be 
> >> 
> >>> used or disclosed except for