aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-03-08 18:45:47 +0100
committerThomas White <taw@physics.org>2010-03-08 18:45:47 +0100
commite8de19bdf531faa2e759ffd40fa54b033f2936d5 (patch)
tree160052bc38fbfac289201a5a693518762c66378f /src
parentb0d9e336b936e730296d3219069fb07f629eb6b0 (diff)
Fix a serious problem with the cartesian unit cell transformation
Diffstat (limited to 'src')
-rw-r--r--src/cell.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cell.c b/src/cell.c
index 6054bf04..fb621911 100644
--- a/src/cell.c
+++ b/src/cell.c
@@ -49,9 +49,9 @@ static void cell_update_cartesian(UnitCell *cell)
cell->bz = 0.0;
tmp = cos(cell->alpha)*cos(cell->alpha)
- - cos(cell->beta)*cos(cell->beta)
- - cos(cell->gamma)*cos(cell->gamma)
- + 2.0*cos(cell->alpha)*cos(cell->beta)*cos(cell->gamma);
+ + cos(cell->beta)*cos(cell->beta)
+ + cos(cell->gamma)*cos(cell->gamma)
+ - 2.0*cos(cell->alpha)*cos(cell->beta)*cos(cell->gamma);
V = cell->a * cell->b * cell->c * sqrt(1.0 - tmp);
cosalphastar = cos(cell->beta)*cos(cell->gamma) - cos(cell->alpha);