aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/cell.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-09-27 12:28:57 +0200
committerThomas White <taw@physics.org>2012-10-02 15:02:12 +0200
commit487f375b726fd555ff0c7eab40499201fc2e1d7d (patch)
tree28721dbbada5e27e770a60fbae2cb45d0ec1f8f1 /libcrystfel/src/cell.c
parent7b31c8f41732b6ca5402afd8fe6cb4d6e185bc48 (diff)
Finishing tweaks for uncentering stuff
Today, I have mostly been having my life made difficult by the PDB's invention of "H centering".
Diffstat (limited to 'libcrystfel/src/cell.c')
-rw-r--r--libcrystfel/src/cell.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libcrystfel/src/cell.c b/libcrystfel/src/cell.c
index 7a62f51c..e7c9dace 100644
--- a/libcrystfel/src/cell.c
+++ b/libcrystfel/src/cell.c
@@ -260,6 +260,9 @@ UnitCell *cell_new_from_cell(UnitCell *orig)
cell_get_cartesian(orig, &ax, &ay, &az, &bx, &by, &bz, &cx, &cy, &cz);
cell_set_cartesian(new, ax, ay, az, bx, by, bz, cx, cy, cz);
cell_set_pointgroup(new, orig->pointgroup);
+ cell_set_lattice_type(new, orig->lattice_type);
+ cell_set_centering(new, orig->centering);
+ cell_set_unique_axis(new, orig->unique_axis);
return new;
}
@@ -691,12 +694,12 @@ UnitCell *cell_transform(UnitCell *cell, UnitCellTransformation *t)
if ( t == NULL ) return NULL;
- out = cell_new();
+ out = cell_new_from_cell(cell);
if ( out == NULL ) return NULL;
- cell_get_cartesian(cell, &ax, &ay, &az,
- &bx, &by, &bz,
- &cx, &cy, &cz);
+ cell_get_cartesian(out, &ax, &ay, &az,
+ &bx, &by, &bz,
+ &cx, &cy, &cz);
m = gsl_matrix_alloc(3,3);
a = gsl_matrix_calloc(3,3);