[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ccp4bb]: problems with



***  For details on how to be removed from this list visit the  ***
***          CCP4 home page http://www.ccp4.ac.uk         ***

OnLineHelpForm wrote:
> 
> Dear All
> 
> A rather naive question, I'm  afraid. I'm trying to determine the inverse
> of a large number of rotation/translation operations for some
> coordinates, each operation represented as a 3x3 matrix and translation vector. I
> understand that if A -> A' by a particular operation, then the rotation
> matrix for A' -> A is the transpose matrix. But what how is the tranlation vector
> of the inverse operation calculated ? It is not simply the reverse
> vector. Also, are there any CCP4 programs which automate this procedure,
> rather than do them all by hand (or specifying INVERT in dm !)


 You are right:

 say [x_new] = [A] [x_old] +t

 Then [A] [x_old] = (x_new - t)

  and [x_old] = [A]**-1(x_new - t)

 In fact for orthogonal systems, [A]**-1 = [A]'

 so your inverse equation can be written 
 [x_old] = [A]'(X_new) - [A]'(t)


If you really want to move coordinates to overlap, then 
lsqkab xyzinw old.pdb  xyzinr ref.pdb xyzout new.pdb will move new old
to new or vice versa if you interchange xyzinw and xyzinr 
 

If you just want a table of matrices, 
then writing the augemted rotation matrix as this;then inverting it will
give the answer. R' and T'.


 R11 R12 R13   T1
 R21 R22 R23   T2
 R31 R32 R33   T3
  0   0   0    1

 There is a library SR minvn in $CLIBS/modlib.f which will do what you
want..
eleanor