-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Labels
Description
The str representation of a Crystal shows matrix elements with "% 5.4f" format, like this:
>>> print(Crystal((0.02,0,0,0,0.02,0,0,0,0.02), "P1"))
Crystal:
Unit cell: 50.000, 50.000, 50.000, 90.000, 90.000, 90.000
Space group: P 1
U matrix: {{ 1.0000, 0.0000, 0.0000},
{ 0.0000, 1.0000, 0.0000},
{ 0.0000, 0.0000, 1.0000}}
B matrix: {{ 0.0200, 0.0000, 0.0000},
{-0.0000, 0.0200, 0.0000},
{-0.0000, -0.0000, 0.0200}}
A = UB: {{ 0.0200, 0.0000, 0.0000},
{ 0.0000, 0.0200, 0.0000},
{ 0.0000, -0.0000, 0.0200}}
If we construct a Crystal that differs from this by the least significant digit of the displayed A matrix values we get a rather notable change in the unit cell:
>>> print(Crystal((0.0201,0,0,0,0.0201,0,0,0,0.0201), "P1"))
Crystal:
Unit cell: 49.751, 49.751, 49.751, 90.000, 90.000, 90.000
Space group: P 1
U matrix: {{ 1.0000, 0.0000, 0.0000},
{ 0.0000, 1.0000, 0.0000},
{ 0.0000, 0.0000, 1.0000}}
B matrix: {{ 0.0201, 0.0000, 0.0000},
{-0.0000, 0.0201, 0.0000},
{-0.0000, -0.0000, 0.0201}}
A = UB: {{ 0.0201, 0.0000, 0.0000},
{ 0.0000, 0.0201, 0.0000},
{ 0.0000, 0.0000, 0.0201}}
Other tests show that a difference of 1 in the least significant digit of the "% 5.4f" representation of a rotation matrix appears to equate to approximately a 0.01° error, which isn't so bad. But imprecision in the B matrix is more problematic.
Reactions are currently unavailable