From: Jens Kaiser
Date: 31 January 2012 02:30
Hi all,
we encountered an odd behaviour of REINDEX.
Snip form logfile:
Data line--- reindex HKL (h+l)/2, -k, (h-l)/2
Data line--- end
Reflections will be reindexed, and unit cell recalculated
Reindexing transformation:
(h' k' l') = ( h k l ) ( 1.00000 0.00000 1.00000 )
( 0.00000 -1.00000 0.00000 )
( 0.50000 0.00000 -0.50000 )
Obviously, the first line of the matrix is not what we intended to
create.
inputting the transformation as HKL h/2+l/2, -k, h/2-l/2
produces the desired result:
Data line--- reindex HKL h/2+l/2, -k, h/2-l/2
Data line--- end
Reflections will be reindexed, and unit cell recalculated
Reindexing transformation:
(h' k' l') = ( h k l ) ( 0.50000 0.00000 0.50000 )
( 0.00000 -1.00000 0.00000 )
( 0.50000 0.00000 -0.50000 )
Admittedly, the documentation does not use any brackets in the examples,
but i would expect REINDEX either to throw an error or treat (h+l)/2
like (h-l)/2 but not treat them in the way encountered.
Cheers,
Jens
----------
From: Phil Evans
I had hoped that Pointless could replace Reindex, but doing some test it seems that it also has problems with the syntax of reindex operators. I need to look into this (but perhaps not immediately, sorry)
Phil
----------
From: Eleanor Dodson
Sorry, but it is a pain writing interpreters - at least it was in Fortran! and once you have one which recognises slashes as divisors, brackets can seem a step too far!
Eleanor
----------
From: Ian Tickle
Jens
Reindex is not treating (h+l)/2 any differently from (h-l)/2, they are
being treated identically, i.e. it is simply ignoring the brackets in
both cases (which is why expanding the expressions without brackets
works)..
So (h+l)/2 is being treated as though you had specified h+l/2 and
(h-l)/2 becomes h-l/2.
Don't forget that the rule for matrix multiplication is row-by-column,
not row-by-row!
Cheers
-- Ian
----------
From: Ian Tickle
Eleanor
Maybe the interpreter should at least throw an error if it encounters
a character (such as a bracket) that it can't interpret, as Jens
implied.
Cheers
-- Ian
----------
From: Phil Evans
Pointless does at least throw an error
----------
From: Eleanor Dodson
Agreed..
E
----------
From: Jens Kaiser
Ian,
Ah! the old the row is the column depiction of matrices in CCP4 - ha
had forgotten about that! Now at least the output makes sense and the
caveat is to never use brackets.
Thanks to all replies!!
Jens
Date: 31 January 2012 02:30
Hi all,
we encountered an odd behaviour of REINDEX.
Snip form logfile:
Data line--- reindex HKL (h+l)/2, -k, (h-l)/2
Data line--- end
Reflections will be reindexed, and unit cell recalculated
Reindexing transformation:
(h' k' l') = ( h k l ) ( 1.00000 0.00000 1.00000 )
( 0.00000 -1.00000 0.00000 )
( 0.50000 0.00000 -0.50000 )
Obviously, the first line of the matrix is not what we intended to
create.
inputting the transformation as HKL h/2+l/2, -k, h/2-l/2
produces the desired result:
Data line--- reindex HKL h/2+l/2, -k, h/2-l/2
Data line--- end
Reflections will be reindexed, and unit cell recalculated
Reindexing transformation:
(h' k' l') = ( h k l ) ( 0.50000 0.00000 0.50000 )
( 0.00000 -1.00000 0.00000 )
( 0.50000 0.00000 -0.50000 )
Admittedly, the documentation does not use any brackets in the examples,
but i would expect REINDEX either to throw an error or treat (h+l)/2
like (h-l)/2 but not treat them in the way encountered.
Cheers,
Jens
----------
From: Phil Evans
I had hoped that Pointless could replace Reindex, but doing some test it seems that it also has problems with the syntax of reindex operators. I need to look into this (but perhaps not immediately, sorry)
Phil
----------
From: Eleanor Dodson
Sorry, but it is a pain writing interpreters - at least it was in Fortran! and once you have one which recognises slashes as divisors, brackets can seem a step too far!
Eleanor
----------
From: Ian Tickle
Jens
Reindex is not treating (h+l)/2 any differently from (h-l)/2, they are
being treated identically, i.e. it is simply ignoring the brackets in
both cases (which is why expanding the expressions without brackets
works)..
So (h+l)/2 is being treated as though you had specified h+l/2 and
(h-l)/2 becomes h-l/2.
Don't forget that the rule for matrix multiplication is row-by-column,
not row-by-row!
Cheers
-- Ian
----------
From: Ian Tickle
Eleanor
Maybe the interpreter should at least throw an error if it encounters
a character (such as a bracket) that it can't interpret, as Jens
implied.
Cheers
-- Ian
----------
From: Phil Evans
Pointless does at least throw an error
----------
From: Eleanor Dodson
Agreed..
E
----------
From: Jens Kaiser
Ian,
Ah! the old the row is the column depiction of matrices in CCP4 - ha
had forgotten about that! Now at least the output makes sense and the
caveat is to never use brackets.
Thanks to all replies!!
Jens
No comments:
Post a Comment